-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DefaultCredentialsProvider is broken for java8 app engine #228
Comments
If you look farther down, you'll see this:
|
@neozwu, do you have any thing to add to this issue? |
I'm having the same problem. Although it falls in this condition the method I'm using AppEngine with Java 8 |
@ajaaym, can you please have someone take a look at this? |
@romulets can you please check whether you have this env variable set GCE_METADATA_HOST to "http://metadata.google.internal"? If not can you set that? In mean time I will create a PR to update default metadata url. |
I didn't work :/ I configured the environment variable through <env-variables>
<env-var name ="GCE_METADATA_HOST" value="metadata.google.internal"/>
</env-variables> I got the error
Is this host available? I think it should be internal host of google, so I can't be sure it's up |
@romulets are you running on GCP? |
Yes, AppEngine GCP |
@romulets are you using flexible env? |
@ajaaym No, I'm using standard environment, java8 runtime. |
@romulets Thanks, I tried with standard java8 runtime and its working fine with me. Is it possible to provide the sample that you are using? |
I'm retrieving a PubSub Publisher through this code:
|
@romulets I also used pubsub publisher to test, below is my code. You dont need to provide default credential, client discovers that automatically.
|
@ajaaym I wasn't providing credentials and had the same error. I don't know if it is relevant, but my project runtime was java7 and then we migrated it to java8. Anyway, I solved my problem by providing a hard-coded service account. |
@romulets which version of pubsub are you using? |
@ajaaym 0.33.0-beta |
@romulets I tried with 0.33.0-beta and it worked fine. Below is my code: Code:
<sduskis: removed sensitve data> |
I ended up using a hard coded service account as well. I don't have problems with other services like Cloud Storage or KMS, but PubSub was a nogo |
This was reported by a bigtable customer:
The text was updated successfully, but these errors were encountered: