Failed to fetch default config version for service

1,731 views
Skip to first unread message

marcus....@apegroup.com

unread,
Mar 22, 2017, 10:04:52 AM3/22/17
to Google Cloud Endpoints

Hi,


The project I'm working on was just upgraded to Cloud Endpoint Framework 2.0. A colleague of mine did the migration, and everything went smoothly. For him...

However, when I try to run the local devserver for the project on my machine, it fails during start-up with the following error:


[INFO] GCLOUD: endpoints.repackaged.com.google.api.config.ServiceConfigException: Failed to fetch default config version for service '<SERVICE-NAME>'. No versions exist!


Trying everything, I added ENDPOINTS_SERVICE_VERSION to my appengine-web.xml (my colleague does not have this config) and get a different error: 


[INFO] GCLOUD: endpoints.repackaged.com.google.api.config.ServiceConfigException: Failed to fetch service config (status code 403)


As far as we can see, we are both running the latest versions of both App Engine (1.9.50) and Google Cloud SDK (147.0.0) (with same components installed), also same version of Java and same version of Maven. I am owner of the App Engine project.


We have three more projects where I get the exact same behaviour, which means that there is probably something not properly configured on my machine related to this.


I have seen in some examples that the deployed version of the API spec (like 2017-03-22r2) has to be inserted somewhere but my colleague haven't, and none of us can find where to add it in a Java / Maven project.

Someone else on Stack Overflow have the same issue: http://stackoverflow.com/questions/42421042/com-google-api-config-serviceconfigsupplier-failed-to-fetch-default-config-ver

Please, anyone with some pointers on where to continue looking?

Thanks,


Marcus

Brad Friedman

unread,
Mar 22, 2017, 2:18:38 PM3/22/17
to marcus....@apegroup.com, Google Cloud Endpoints
Hi Marcus, thanks for reaching out!

Before you ran the local devserver with mvn appengine:run, did you set the local environment variable ENDPOINTS_SERVICE_NAME to your service's name? There are more details on running the app locally in the quickstart for Java.

Let me know if that helps!

Thanks,
Brad on behalf of the Google Cloud Endpoints team

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/651baf2e-cca4-4c46-9097-a88af82e8854%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

marcus....@apegroup.com

unread,
Mar 22, 2017, 2:46:51 PM3/22/17
to Google Cloud Endpoints, marcus....@apegroup.com
Hi Brad!

Thanks for answering.

Unfortunately, I have set the environment variable.

[home-dir]$ env | grep ENDPOINTS_SERVICE_NAME

ENDPOINTS_SERVICE_NAME=<module-name>.endpoints.<project-id>.cloud.goog


(I replaced the actual values above)


I also have it in my appengine-web.xml:

    <env-variables>

        <env-var name="ENDPOINTS_SERVICE_NAME" value="${application.module}.endpoints.${application.id}.cloud.goog"/>

    </env-variables>


The properties resolve correctly in my targets folder.

As I mentioned, my actual project source code is no different from what my colleague has and he runs the application locally without issues. Also, he has not set the environment variable.


Thanks!

Marcus

D. T.

unread,
Apr 5, 2017, 3:19:42 PM4/5/17
to marcus....@apegroup.com, Google Cloud Endpoints
What's the output when you run: gcloud service-management configs list --service=<module>.endpoints.<project>.cloud.goog?

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/93bc2f96-6b9c-48cc-acd8-19c7fc1323a0%40googlegroups.com.

Saurabh Srivastava

unread,
Jul 15, 2017, 3:50:42 AM7/15/17
to Google Cloud Endpoints, marcus....@apegroup.com
Hi Marcus,

Did you find a solution ?
I am facing the same error.



On Thursday, April 6, 2017 at 12:49:42 AM UTC+5:30, Daniel Tang wrote:
What's the output when you run: gcloud service-management configs list --service=<module>.endpoints.<project>.cloud.goog?

On Wed, Mar 22, 2017 at 11:46 AM <marcus....@apegroup.com> wrote:
Hi Brad!

Thanks for answering.

Unfortunately, I have set the environment variable.

[home-dir]$ env | grep ENDPOINTS_SERVICE_NAME

ENDPOINTS_SERVICE_NAME=<module-name>.endpoints.<project-id>.cloud.goog


(I replaced the actual values above)


I also have it in my appengine-web.xml:

    <env-variables>

        <env-var name="ENDPOINTS_SERVICE_NAME" value="${application.module}.endpoints.${application.id}.cloud.goog"/>

    </env-variables>


The properties resolve correctly in my targets folder.

As I mentioned, my actual project source code is no different from what my colleague has and he runs the application locally without issues. Also, he has not set the environment variable.


Thanks!

Marcus

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.

Dan Ciruli

unread,
Jul 17, 2017, 9:09:03 PM7/17/17
to Saurabh Srivastava, Google Cloud Endpoints, marcus....@apegroup.com
sobu -

What's the output when you run: gcloud service-management configs list --service=<module>.endpoints.<project>.cloud.goog?

DC


On Saturday, July 15, 2017, <sob...@gmail.com> wrote:
Hi Marcus,

Did you find a solution ?
I am facing the same error.


On Thursday, April 6, 2017 at 12:49:42 AM UTC+5:30, Daniel Tang wrote:
What's the output when you run: gcloud service-management configs list --service=<module>.endpoints.<project>.cloud.goog?

On Wed, Mar 22, 2017 at 11:46 AM <marcus....@apegroup.com> wrote:
Hi Brad!

Thanks for answering.

Unfortunately, I have set the environment variable.

[home-dir]$ env | grep ENDPOINTS_SERVICE_NAME

ENDPOINTS_SERVICE_NAME=<module-name>.endpoints.<project-id>.cloud.goog


(I replaced the actual values above)


I also have it in my appengine-web.xml:

    <env-variables>

        <env-var name="ENDPOINTS_SERVICE_NAME" value="${application.module}.endpoints.${application.id}.cloud.goog"/>

    </env-variables>


The properties resolve correctly in my targets folder.

As I mentioned, my actual project source code is no different from what my colleague has and he runs the application locally without issues. Also, he has not set the environment variable.


Thanks!

Marcus

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsubscri...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
DC

Saurabh Srivastava

unread,
Jul 18, 2017, 6:16:06 AM7/18/17
to Dan Ciruli, Google Cloud Endpoints, marcus....@apegroup.com
Thanks for replying DC.
Got it working now, the issue was a missing dependency in my pom.xml file.
Because of that I got the error while serving the API request.
Once I added below to pom.xml, and deployed again it resolved the error.

<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>endpoints-framework-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<!-- plugin configuration -->
<hostname>reenakirasoi.appspot.com</hostname>
</configuration>
</plugin>





--
DC




--
Regards,
Saurabh Srivastava
----
"Hope is a good thing. Maybe the best of things, and no good thing ever dies."
Reply all
Reply to author
Forward
0 new messages