R
Railway

✋|help

Npgsql.npgsqlException (0x80004005) Failed to connect to 76.76.21.21:5432

Nnandoaracena8/23/2023
Hi! im trying to connect to an ASP.Net core 6 to railway.app for the first time and i receive the indicated error message. can somebody help me? Npgsql.npgsqlException (0x80004005) Failed to connect to 76.76.21.21:5432
Nnandoaracena8/23/2023
a19b97b8-4fef-403c-afd7-4ce7f8a5b775
TThallesComH8/23/2023
is your database hosted on Vercel?
Nnandoaracena8/23/2023
i dont know
im using postgreSQL
TThallesComH8/23/2023
that errors mean you're trying to connect to an IP from Vercel on the 5432 port, you probably don't want that
did you created a postgres database in railway?
Nnandoaracena8/23/2023
yes
is empty
TThallesComH8/23/2023
did you set the enviroment variables correctly?
Nnandoaracena8/23/2023
no, i didnt set anything
i followed a youtube tutorial and they dont explained there
i supossed was not necessary
TThallesComH8/23/2023
ok so after you create a database on railway, you can reference the environment variables from there
TThallesComH8/23/2023
and in your code you use that enviroment variables to start the connection.
Nnandoaracena8/24/2023
ok, i will try
Hi! I don't understand how to do it. Is there some video to help with this?
AAdam8/24/2023
the variables referenced above are available in your database. share those variables to your other services and reference them to connect
Nnandoaracena8/24/2023
So, for example PGPORT = 3000 and fill out all the variables?
TThallesComH8/24/2023
No, by reference we mean that the Postgres database fill out those for you automatically.
So, if you choose PGPASSWORD from the dropdown above
TThallesComH8/24/2023
When your service is deployed, an environment variable called PGPASSWORD (process.env.PGPASSWORD) can be used inside your service which will have your Postgres password.
And the value of it will not be the literal string ${{Postgres.PGPASSWORD}} it's just a reference, just like javascript's template literal.
See this for more docs https://docs.railway.app/develop/variables#reference-variables
Nnandoaracena8/24/2023
so, should i add which variables? DATABASE_URL and something more?
TThallesComH8/24/2023
by the look of asp.net core 6, you should use a DATABASE_URL and pass that to the LibraryContext class
Nnandoaracena8/24/2023
is this way correct?
Nnandoaracena8/24/2023
TThallesComH8/24/2023
i'm not a C# expert but it looks correct
Nnandoaracena9/4/2023
So, i dont understand what can be the problem
i think it could be very usefull some explainatory videos for the new to programming
Hi! my app doesnt work i dont know what happen
https://tangokultura.up.railway.app/
MMedim9/4/2023
Describe 'Doesn't work', your app is loading fine for me.
Jjosh9/4/2023
looks good to me as well 👍
BBrody9/4/2023
me three

Looking for more? Join the community!

Recommended Posts
Deploying for the first timeHi, I am new to railroad and I am trying to deploy my flask app. I am getting this error: ``` DockI can't seem to be able to use the mariadb app i'm running in my PHP projectI want to be able to connect my mariadb app deployed on railway in my PHP script but when I try to uRailway too slowI have an issue with my railwat app. The app is too slow once update my github project. Making it alTrying to communicate over private network and not workingI have a service that has just private networking enabled and listens on ipv6 (http server). When I How is Redis instance pricing calculatedDoes the per vCPU and per GB memory pricing apply to a Redis database? Would like to know before I svolume permissionsMy docker run script is trying to install as a user owned file into volume mount point but getting pDeployment Issue: ModuleNotFoundError for Flask with Poetry-based ProjectHello, I'm having trouble deploying a Flask app on Railway using Poetry for dependency management. DDoes HTTP response count towards egress quota?I just want to check an external endpoint a few times a day but the response is quite big.Hosting a Directus + NuxtJs project service availableI'm trying to host a Directus service and NuxtJs service but I'm having some trouble getting the froDB StorageHello all, I have a question. How much storage does Railway have when building a server or databaseLogs broken?Hello is there a problem with logs? I am not seeing any build or deploy logs at all, I just see the Minecraft Server isn't working?When I use the minecraft server template and leave everything it will give this error in the logs anFormbricks Template error (upon redeployment w/ SMTP setup)``` error getting environment TypeError: fetch failed at Object.fetch (node:internal/deps/undicPayload CMS + Nextjs Deployment Failed during build processUsing the template courtesy of @Brody with Next.js added [as seen here](https://github.com/payloadcmHosting a modded Minecraft serverHi guys! I'm trying to host a modded minecraft server through Railway using the `Minecraft Server` tCan't connect to RedisThis is the error I am getting. What I have checked so far * Made sure I used the env variables provHello everyone, i'm trying to make a python websocket using websockets library also flaskso basically i have this -> ```py async def main(): url = os.environ.get('RAILWAY_URL', 'localExtension of Payment Due Date for SubscriptionIs there a way I can request for a brief extension of a few days for my upcoming payment?Hello Everyone! I am facing some problem related to deploying my nodejs application.I have deployed my nodejs application using github, but do not know how can I connect phpmyadmin so RedeployHey there, is there away to start a redploy using the Railway API