ghotiphud / rust-web-starter

Rust (Rocket & Diesel) + React (w/ Typescript) + PostgreSQL starter pack. Currently serves my need for a nice Dev Environment.
MIT License
293 stars 39 forks source link

API server exited with code 126 #6

Closed phrohdoh closed 6 years ago

phrohdoh commented 6 years ago
$ git rev-parse HEAD
6a876934ac927d15783dc6be93b76133394eac15

$ docker-compose up
Starting myproject_db_1 ... done
Starting myproject_api_server_1 ... done
Starting myproject_web_1        ... done
Attaching to myproject_db_1, myproject_api_server_1, myproject_web_1
db_1          | LOG:  database system was interrupted; last known up at 2018-05-04 17:32:51 UTC
db_1          | LOG:  database system was not properly shut down; automatic recovery in progress
db_1          | LOG:  invalid record length at 0/14EE5B8: wanted 24, got 0
db_1          | LOG:  redo is not required
api_server_1  | bash: ./wait-for-it.sh: Permission denied
db_1          | LOG:  MultiXact member wraparound protections are now enabled
db_1          | LOG:  autovacuum launcher started
db_1          | LOG:  database system is ready to accept connections
myproject_api_server_1 exited with code 126

When navigating to the index I see the following rendered:

Proxy error: Could not proxy request /api from localhost:3000 to http://api_server:3001/ (ENOTFOUND).

ghotiphud commented 6 years ago

It looks like a permissions issue on the ./wait-for-it.sh script. Does docker have the correct permissions to access that file?

Edit: Looks like you'll need to set the execute flag on ./api_server/wait-for-it.sh https://stackoverflow.com/questions/38882654/docker-entrypoint-running-bash-script-gets-permission-denied

chmod +x wait-for-it.sh
phrohdoh commented 6 years ago

Ah of course, thanks @ghotiphud that solved this issue.