R
Railway12mo ago
Dem

I'm getting 'Application failed to respond' but no error shows up in my logs, how should I debug?

The application works locally. Deploy log says successfully built.
20 Replies
Dem
Dem12mo ago
I'm using hypercorn and am running hypercorn main:app --reload in my terminal This is what shows up on my terminal: INFO:hypercorn.error:Running on http://127.0.0.1:8000 (CTRL + C to quit)
Brody
Brody12mo ago
use hypercorn main:app --bind [::]:$PORT as your start command for railway
Dem
Dem12mo ago
I ran this and it worked: hypercorn main:app --bind 0.0.0.0:8000 but my application is still failing to respond Your command as fails like this: in <module> sys.exit(main()) ^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/hypercorn/main.py", line 287, in main run(config) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/hypercorn/run.py", line 38, in run sockets = config.create_sockets() ^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/hypercorn/config.py", line 203, in create_sockets insecure_sockets = self._create_sockets(self.bind) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/hypercorn/config.py", line 266, in _create_sockets sock.bind(binding) socket.gaierror: [Errno 8] nodename nor servname provided, or not known
Brody
Brody12mo ago
please take my advice, I've done this many hundreds of times how are you settling my start command
Dem
Dem12mo ago
Hmm not sure what I mean are there things I need to do before running your command to set it up? Also the application works until I push a json + .py file to the application maybe that's the cause?
Brody
Brody12mo ago
you don't run the command, you use that as the start command for your service
Dem
Dem12mo ago
Oh
Brody
Brody12mo ago
I assume you have a Procfile?
Dem
Dem12mo ago
I do not
Brody
Brody12mo ago
how are you currently settling your hypercorn start command on railway?
Dem
Dem12mo ago
I'm not sure what that means... So I just create Profile with your command in it and push? Procfile
Brody
Brody12mo ago
I need to know how you are currently telling railway to run the start command you showed me
Dem
Dem12mo ago
I was just running it in terminal
Brody
Brody12mo ago
we are talking about railway here, local doesn't apply please send me both your build and deploy logs https://bookmarklets.up.railway.app/log-downloader/
Dem
Dem12mo ago
My deploy log: [2023-11-16 07:47:55 +0000] [11] [INFO] Running on http://[::]:6639 (CTRL + C to quit)
Brody
Brody12mo ago
use the bookmarklet please
Dem
Dem12mo ago
Sorry, I looked it up and it's unsafe to use Do you mind if I just send you the logs?
Brody
Brody12mo ago
the source code is available for you to verify if it was unsafe Railway would have taken it down long ago
Dem
Dem12mo ago
That's true, but I'm a newbie and don't have the judgement for it yet :/ sorry about that Adding a procfile worked for me! Thanks so much for the help
Want results from more Discord servers?
Add your server