Able to make request to public URL but not private
I have a rest API deployed as a service in the same environment as my main service - i can send requests to it over the public network using requests, but if i try to use the private network link I get the following trace: https://pastebin.com/1a2Tkrt1
Pastebin
2024-01-30 17:09:52,994 django.request ERROR Internal Server Err...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
41 Replies
Project ID:
6ec4e69f-153c-42b1-8399-d4fbd6db04fb
6ec4e69f-153c-42b1-8399-d4fbd6db04fb
what kind of app is the app you're trying to make a request to?
I have a flask-restful API
that is being requested by a django app
what's your current start command for the flask app
running off a dockerfile
try changing it to
from django:
https://pastebin.com/fk5A0rY8
Pastebin
2024-01-30 17:28:19,228 django.request ERROR Internal Server Err...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
tl;dr looks the same
show me the logs of the flask service, but use this https://bookmarklets.up.railway.app/log-downloader/
weasyprint_rest is flask api
tkd-manager is django main app
I see what's wrong this time
do you have a PORT variable set in your flask service variables? if not, set one
This is what i use to run it, so it just uses the one railway randomly generates - do i just pull a number from anywhere and use that?
if you like 5000 then set 5000 as a PORT variable
twas the default in the railway provided flask template, don't really care
alrighty go ahead and set that
so just set environment var 'PORT' to '5000'?
a service variable
what's a service variable?
this?
the variables you set on a service
yep
can you explain why while i wait for the redeploy please?
this is an internal network, so you have to specify the port in the url for the request the same way you have to when developing locally
and since you have set that PORT variable, now internally your service runs an http server and listens on port 5000, unlike the public url that is https and port 443
ah ok
looks the same to me
although it still thinks port 80 for some reason
right but you have yet to specify port 5000 in your request url
just add :5000 to the end of the url?
yep, the same way you would when running locally
you can think of the services in the private network as computers on the same network, no firewalls no proxys, no nothing, just domains for your convenience
cheers!
all works?
mhm
awesome
well the pdfs that can only be fetched as a response from a POST request exist
and have contents
I don't see any issues there
@Brody im having the same issue, im getting the private url from a env variable i put
I thought you had a thread for this?
the other one was for a different issue
okay it was another recent thread with connection refused https://discord.com/channels/713503345364697088/1206265894016131172/1206283628762370139
should i move there?
seems to be an uno server something something, mine is a fastapi app
same exact concept applies
alright thank you