Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Unable to Run Exposure Notification Service Locally #956

Closed
Goclipse27 opened this issue Sep 4, 2020 · 7 comments
Closed

Unable to Run Exposure Notification Service Locally #956

Goclipse27 opened this issue Sep 4, 2020 · 7 comments
Labels
kind/question Questions about the project

Comments

@Goclipse27
Copy link
Contributor

Goclipse27 commented Sep 4, 2020

Hi,
Based on the "exposure-notifications-server/blob/main/CONTRIBUTING.md" , when I try to run Exposure Notification Server locally , I am getting below error at step 5 while all the above steps looks success.

go run ./cmd/exposure/...
{"severity":"INFO","timestamp":"2020-09-04T13:55:28.090641-05:00","caller":"setup/setup.go:96","message":"configuring secret m
anager","build_id":"unknown","build_tag":"unknown"}
{"severity":"EMERGENCY","timestamp":"2020-09-04T13:55:28.091019-05:00","caller":"exposure/main.go:48","message":"setup.Setup: 
unable to connect to secret manager: secretmanager.NewClient: google: error getting credentials using well-known file (/Users/
raghvendersundarjee/.config/gcloud/application_default_credentials.json): open /Users/raghvendersundarjee/.config/gcloud/appli
cation_default_credentials.json: permission denied","build_id":"unknown","build_tag":"unknown","stacktrace":"main.main\n\t/Use
rs/raghvendersundarjee/Downloads/exposure-notifications-server-main/cmd/exposure/main.go:48\nruntime.main\n\t/usr/local/go/src
/runtime/proc.go:203"}
exit status 1

And Do we have any where option to see the list of services or endpoints available (Local End points)

Thanks,
Raghv

@Goclipse27 Goclipse27 added the kind/question Questions about the project label Sep 4, 2020
@sethvargo
Copy link
Member

Do you have the gcloud command line tool installed? That error seems to indicate you have a permissions issue.

@Goclipse27
Copy link
Contributor Author

Thanks @sethvargo - I did gcloud installed and after i have had permission give ~/.config , permission related error is not coming.But still facing below
{"severity":"EMERGENCY","timestamp":"2020-09-04T15:02:03.627184-05:00","caller":"exposure/main.go:48","message":"setup.Setup: unable to connect to secret manager: secretmanager.NewClient: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information."

@Goclipse27
Copy link
Contributor Author

How About rather running as in-memory , do we really need one?

@sethvargo
Copy link
Member

You can use the local in-memory secret manager by setting SECRET_MANAGER=IN_MEMORY in your environment variables.

@Goclipse27
Copy link
Contributor Author

Thanks Sethvargo.Able to run admin tools locally and configure exposure server.
By the way , i saw some changes around moving away from in memory KMS to fileSystem Issue #957 .Is that for local?

I am facing some issues around running v1/publish local yet which i am trying to make it work in local.

@sethvargo
Copy link
Member

Hi @raghvenders - yea that's for local dev. We strongly recommend using a managed key management system like Google Cloud KMS, AWS KMS, Azure KeyVault, or HashiCorp Vault in production.

For local development, the in-memory key manager has some issues because it loses state if the server is stopped. The filesystem key manager won't have these same issues, but it should not be used in production.

Since you noted it's working for you now, I'm going to close out this issue. If you run into other things, please open a new issue with the details. Thanks!

/close

@google-oss-robot
Copy link

@sethvargo: Closing this issue.

In response to this:

Hi @raghvenders - yea that's for local dev. We strongly recommend using a managed key management system like Google Cloud KMS, AWS KMS, Azure KeyVault, or HashiCorp Vault in production.

For local development, the in-memory key manager has some issues because it loses state if the server is stopped. The filesystem key manager won't have these same issues, but it should not be used in production.

Since you noted it's working for you now, I'm going to close out this issue. If you run into other things, please open a new issue with the details. Thanks!

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/question Questions about the project
Projects
None yet
Development

No branches or pull requests

3 participants