Bug #486

Java AppServer fails to get instanceID using Service API

Added by Anton Leonov over 2 years ago. Updated 4 months ago.

Target version:
% Done:


Estimated Time:
Deployment type:
AppScale - self deployed


I believe stack trace should be enough for a further investigation:

WARNING: /modules/versions-details No valid instance id for this instance.
        at com.appscale.hawkeye.modules.GetVersionDetailsHandlerServlet.doGet(
        at javax.servlet.http.HttpServlet.service(
        at javax.servlet.http.HttpServlet.service(

Java code can be found here:

Related issues

Related to AppScale - Bug #484: Incorrect version details provided by services API New


#1 Updated by Anton Leonov over 2 years ago

  • Related to Bug #484: Incorrect version details provided by services API added

#2 Updated by Chris Donati over 2 years ago

  • Status changed from New to In Progress

My goal was to generate a fake instance ID like the Python AppServer does.

I first tried modifying the LocalHttpRequestEnvironment, where this property is set, but since each request generates a new environment, the instance ID would change for each request.

I then tried passing in the dummy instance ID from the JettyContainerService in handleImpl. This made the instance ID consistent across requests, but it turns out that the main SDK process calls the runtime's getCurrentInstanceId API, so it did not function correctly when the API call did not raise an exception. (The main SDK process expects the instance ID to be -1).

I tried modifying DevAppServerModulesFilter to always return -1 instead of calling the runtime's API, but I got quite a few missing class errors from the packages that it imports, and I'm not sure if any other places call that user API.

I may continue looking into this if I have time, but I don't think it should be a blocker for the release.

#3 Updated by Graziano Obertelli over 2 years ago

  • Target version deleted (3.4)

#4 Updated by Nicolas Denutte 4 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF