Service running on 0.0.0.0:$PORT but cannot connect to it
I'm running a gradio app on 0.0.0.0:7860 and have set PORT variable to 7860, but still cannot connect to the app
Solution:Jump to solution
that's good, but you don't have
server_port
set to the environment variable PORT
13 Replies
Project ID:
d6fa70bc-e4b0-4499-9acb-e45ca2cad6a4
d6fa70bc-e4b0-4499-9acb-e45ca2cad6a4
what kind of app is this?
Gradio
Build & Share Delightful Machine Learning Apps
what have you set for
server_name
?0.0.0.0
(it works locally and on other cloud platforms)
Solution
that's good, but you don't have
server_port
set to the environment variable PORT
the default port is 7860, and the deployment log (1st screenshot at the top) confirms that it's listening on 7860, so it's weird and I couldn't figure out why it just won't work on railway
please see my above message, gradio is not listening on
PORT
wow it worked now when I specify PORT in the code, thank you Brody!
but I still don't understand why that's necessary, since it's listening on 7860 by default already
seems it wasnt, you always want to be listening on the
PORT
environment variable when running apps on railwaybut the log shows 7860?
thats not the auto generated port railway expects your app to listen on