Async API not working from Dockerized Streamlit project

ProjectID: ac828fce-6f54-43e9-825c-ac4871d226ba This might be more related to my particular docker installation, but I'm having issues connecting to an async API (deployed as a separate Railway service) from my Dockerized Streamlit app (another Railway service, both in the same project).
I can access the sync services from the docker streamlit service, and I can access the async service with the local (undockerized) Streamlit instance.
This is the error message: ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Any ideas what's wrong? thanks!
9 Replies
Percy
Percy2y ago
Project ID: ac828fce-6f54-43e9-825c-ac4871d226ba
Brody
Brody2y ago
even though the two services are in the same project you will still need to access them over their public domians
p1gp3n
p1gp3nOP2y ago
yes- i do call it from its public api, which is weird that i'm seeing the localhost i can see in the logs that i've called it from its url that i'm using locally
Brody
Brody2y ago
that is werid, you will need to do some debugging
p1gp3n
p1gp3nOP2y ago
any idea why the sync services (same url, different endpoint) work from the docker container? again, both are services on railway, so not sure if you've seen this
Brody
Brody2y ago
because you are trying to connect to localhost, as your error messages says
p1gp3n
p1gp3nOP2y ago
yeah not sure how. i pull the url from a config file, i verified i'm hitting the url correctly on the server. i can continue to troubleshoot to see why the localhost is being called
Brody
Brody2y ago
yeah you would need to debug this, nothing I can really do here
p1gp3n
p1gp3nOP2y ago
ok thanks for the time. let me continue to check things
Want results from more Discord servers?
Add your server