Skip to content
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

Error 503 When requesting REST API endpoints #48

Open
gabrielbenavidez opened this issue Feb 8, 2022 · 6 comments
Open

Error 503 When requesting REST API endpoints #48

gabrielbenavidez opened this issue Feb 8, 2022 · 6 comments

Comments

@gabrielbenavidez
Copy link

Hi,
I'm having some trouble getting my ePAD lite server started and I would really appreciate some feedback as to what may be causing the issues as well as how I may go about resolving it.

My issue seems to be similar if not the same as issue number 5 from https://github.com/RubinLab/epad-dist/issues/26#issuecomment-959420948

Environment

WSL Ubuntu (20.04.1)
Latest epad-dist version

Steps to reproduce

  1. Clone epad-dist repo: git clone https://github.com/RubinLab/epad-dist.git
  2. Generate epad_lite_dist directory and files: ./configure_epad.sh ../epad_lite_dist ./epad.yml
  3. Start all containers: docker-compose up

Errors

1. mariaDB

Error
Access denied for user 'admin'@'localhost' (using password: YES)

Fix

  • Create mariadb user "admin" in epad_mariadb container: CREATE USER 'admin'@'localhost' IDENTIFIED BY 'manager'
  • Grant admin user permissions: GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost'; FLUSH PRIVELEGES;

2. epad_lite

Error
"Cannot connect to mariadb (err:afterDBReady. Error: Lite2thick data migration. Error: Cannot parse '( )': Encountered \" \")\" \") \"\" at line 1, column 2.\nWas expecting one of:\n <NOT> ...\n \"+\" ...\n \"-\" ...\n <BAREOPER> ...\n \"(\" ...\n \"*\" ...\n <QUOTED> ...\n <TERM> ...\n <PREFIXTERM> ...\n <WILDTERM> ...\n <REGEXPTERM> ...\n \"[\" ...\n \"{\" ...\n <NUMBER> ...\n <TERM> ...\n \"*\" ...\n ), shutting down the server"}

Fix
N/A: Not sure if this error has any significance.

3. epad_js

Error
"GET /api/users/admin HTTP/1.1" 503 80 "http://localhost/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36" "

Fix
If REACT_APP_API_URL environmental variable in the docker-compose.yml file is changed from http://localhost/api to http://localhost then the request request doesn't fail and returns a 200 OK.

So far this only fixes the login error but I'm still not able to perform any other tasks such as uploading DCM files.

Thank you in advance
Gabriel Benavidez

@acavit
Copy link
Contributor

acavit commented Feb 14, 2022 via email

@gabrielbenavidez
Copy link
Author

Thank you @acavit I'll try your suggestion and let you know if it resolved the issue. If I'm still getting errors maybe we can look at it together as you said.

@gabrielbenavidez
Copy link
Author

@acavit Thank you for the suggestion, I updated the docker-compose.yml file to use the rubinlab/mariadb:20200308 image. This resolved the first error I was getting from the mariadb container stating: Access denied for user 'admin'@'localhost' (using password: YES). I performed steps 1 and 3 from your suggestion and skipped step 2 because the docker-compose.yml is set to use an image rather than build an image from mariadb/Dockerfile. I still seem to be getting the second and third error in my original post which is the epad_lite container cannot connect to mariadb, and the epad_js container is returning a 503 for API requests. Please let me know if you have any suggestions as how I can resolve the epad_lite to mariadb connection issue. I am also available to video chat sometime soon if we're still having trouble resolving the errors.
Thank you again.

@acavit
Copy link
Contributor

acavit commented Feb 15, 2022 via email

@gabrielbenavidez
Copy link
Author

@acavit After trying your last suggestion I'm still having trouble getting the ePAD server running properly. I changed the host parameter in the epad.yml file from "localhost" to my actual IP address and regenerated the epad_lite_dist directory. I also tried adding a hostname to my etc/hosts file called "indiana" (which points to my IP address) and using that hostname. Could you please clarify if this is along the lines of what you suggested in your last message.

Note: I also tried using the "thick" mode and changing epadlite and epadjs to use tag v0.5 instead of master as suggested from a closed issue thread for this repo by a user who get their ePAD server working making these changes, but I didn't have much luck with this.

Here's a Gist link to my docker-compose.yml file incase it can be of help:
https://gist.github.com/gabrielbenavidez/78bd998d1fbb766fbc79d942513e00d4

@emelalkim
Copy link
Contributor

Hi @gabrielbenavidez, it seems like you couldn't resolve the issue. could we have a zoom call? please reach out to me at ealkim@stanford.edu with your availabilities
Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants