Question

I've deployed a worker role with Tomcat 7 and a very simple test servlet which should simply display the ID of the serving instance (I want to test a session management solution across multiple instances).

I'm using the Azure SDK for java (github.com/WindowsAzure/azure-sdk-for-java)

Problem is that Tomcat throws an error when I call the following:

RoleEnvironment.getCurrentRoleInstance().getId()

The actual error thrown is:

com.microsoft.windowsazure.serviceruntime.RoleEnvironmentNotAvailableException
com.microsoft.windowsazure.serviceruntime.RoleEnvironment.initialize(RoleEnvironment.java:77)
com.microsoft.windowsazure.serviceruntime.RoleEnvironment.getCurrentRoleInstance(RoleEnvironment.java:331)
com.anubex.test.TestSessionServlet.doGet(TestSessionServlet.java:35)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

java.lang.RuntimeException: java.io.FileNotFoundException: \\.\pipe\WindowsAzureRuntime (The system cannot find the file specified)
com.microsoft.windowsazure.serviceruntime.FileInputChannel.getInputStream(FileInputChannel.java:33)
com.microsoft.windowsazure.serviceruntime.RuntimeVersionProtocolClient.getVersionMap(RuntimeVersionProtocolClient.java:41)
com.microsoft.windowsazure.serviceruntime.RuntimeVersionManager.getRuntimeClient(RuntimeVersionManager.java:48)
com.microsoft.windowsazure.serviceruntime.RoleEnvironment.initialize(RoleEnvironment.java:74)
com.microsoft.windowsazure.serviceruntime.RoleEnvironment.getCurrentRoleInstance(RoleEnvironment.java:331)
com.anubex.test.TestSessionServlet.doGet(TestSessionServlet.java:35)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

java.io.FileNotFoundException: \\.\pipe\WindowsAzureRuntime (The system cannot find the file specified)
java.io.FileInputStream.open(Native Method)
java.io.FileInputStream.<init>(FileInputStream.java:120)
java.io.FileInputStream.<init>(FileInputStream.java:79)
com.microsoft.windowsazure.serviceruntime.FileInputChannel.getInputStream(FileInputChannel.java:30)
com.microsoft.windowsazure.serviceruntime.RuntimeVersionProtocolClient.getVersionMap(RuntimeVersionProtocolClient.java:41)
com.microsoft.windowsazure.serviceruntime.RuntimeVersionManager.getRuntimeClient(RuntimeVersionManager.java:48)
com.microsoft.windowsazure.serviceruntime.RoleEnvironment.initialize(RoleEnvironment.java:74)
com.microsoft.windowsazure.serviceruntime.RoleEnvironment.getCurrentRoleInstance(RoleEnvironment.java:331)
com.anubex.test.TestSessionServlet.doGet(TestSessionServlet.java:35)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

Problem seems to be that the following named pipe cannot be found:

\\.\pipe\WindowsAzureRuntime

Not sure how/where this gets created. Any ideas?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top