GoogleCloudPlatform / healthcare-federated-access-services

Apache License 2.0
25 stars 9 forks source link

Getting 404 error on button "Auth for Resources" in damdemo. #41

Closed shuklashashank closed 4 years ago

shuklashashank commented 4 years ago

I have deployed the GA4GH by using deploy.bash. It deploys SQL, GAE services easily but while clicking the "Auth for Resources" button getting 404 not found error (host-link https://damdemo-staging-dot-health-246205.uc.r.appspot.com/test). Are there any Oauth keys needed to be set up first. There is also a 502 Bad Gateway error after clicking the log-in button in the icdemo-test link. (https://icdemo-staging-dot-health-246205.uc.r.appspot.com/test) Also, if you can share the whole process doc it would be helpful.

chaopeng commented 4 years ago

Please go through this doc https://github.com/GoogleCloudPlatform/healthcare-federated-access-services/blob/master/deploy.md

shuklashashank commented 4 years ago

@chaopeng I deployed the application with the above shred link, getting 404 and 502 errors as mentioned in the question.

chaopeng commented 4 years ago

I think your ic and dam not actually running, see https://dam-staging-dot-health-246205.uc.r.appspot.com/dam. Did you go run prepare_project.bash to setup the project? other than that a log from stackdriver may help to see why ic/dam crash on start.

shuklashashank commented 4 years ago

It is showing the error: level=fatal msg="Unable to instantiate service registry." error="could not ping SQL connection: failed to connect to host=172.17.0.1 user=hydra database=dam-staging: dial error (dial tcp 172.17.0.1:1234: connect: connection refused)"

I've seen a few variables are defined in entrypoint.bash. Do I need to update those?

chaopeng commented 4 years ago

It seems like the cloudsql does not setup, you will need to run prepare_project.bash to setup the gcp project

shuklashashank commented 4 years ago

dam-demo is showing the below error: ERROR: (gcloud.beta.app.deploy) Error Response: [4] Your deployment has failed to become healthy in the allotted time and therefore was rolled back. If you believe this was an error, try adjusting the 'app_start_timeout_sec' setting in the 'readiness_check' section. How can I check the logs or do I need to increase the timeout_sec?

shuklashashank commented 4 years ago

@chaopeng cloud SQL is set up, but there is not any DB created with the name of dam-staging. May I know from where it is getting created?

SQL connection: failed to connect to `host=172.17.0.1 user=hydra database=dam-staging`: server error (FATAL: database \"dam-staging\" does not exist (SQLSTATE 3D000))
chaopeng commented 4 years ago

Please run prepare_project.bash, or read the script for howto

shuklashashank commented 4 years ago

I've gone through the prepare_project.bash there are only two databases getting created. https://github.com/GoogleCloudPlatform/healthcare-federated-access-services/blob/b5db0b7ca103613add626bb5d5fd9dbf514a2135/prepare_project.bash#L106

shuklashashank commented 4 years ago

@chaopeng I've created the DB.

Now getting the new errors, log

''' F0709 17:55:17.363760 18 dam.go:263] cannot load adapters: error creating AWS key warehouse: NoCredentialProviders: no valid providers in chain. Deprecated For verbose messaging see aws.Config.CredentialsChainVerboseErrors '''

chaopeng commented 4 years ago

@mbarkley I have never seen this before, it seems like @shuklashashank config has asw adapter, do you know what is related?

mbarkley commented 4 years ago

@chaopeng the AWS adapter does some initialization that fails fast if no AWS credentials are configured in the deployment environment. To solve this problem, we'd need to make one of the following code changes:

  1. Lazy initialize the AWS adapter (this means we'd fail late for users that do want to use AWS)
  2. Add configuration to disable the AWS adapter so that it is not initialized at all in adapters.go
shuklashashank commented 4 years ago

@chaopeng Hi getting OAuth2 request resulted in an error. Can you help me with it, how can I configure this. where are the keys getting initialized?