90 Replies
Project ID:
691265c1-a324-4034-8288-642c7ab38ebc
691265c1-a324-4034-8288-642c7ab38ebc
I am using
amqp://<user>:<password>@rabbitmq.railway.internal:5672
from another service.what specific error do you get?
Just error. NestJS doesn't seem to give much more
But it works locally. I am sure it just doesn't connect
send it anyway? lol
oh wow you weren't kidding when you said "just error"
yup
I assume you can connect just fine when on railway if you where to swap to the public url?
If I open a tcp proxy and use that?
I can try
yes please do
Deploying right now, 1 sec
No I can't use the public uri either apparently
same vague error?
Yes
now you say it works locally, that means you are running rabbitmq locally too?
Yes
Using a dev container and docker compose with the same docker image for rabbitmq
and environment variables too
same image running locally as you run on railway?
Yes
can you run your app locally but connect to the rabbitmq hosted on railway?
I'll get back to you on that in 15 mins, quick break
sounds good
Doesn't seem to work either.. I can't seem to figure out why
same error?
Yes
Tried everything, not sure
can you send the logs from your rabbitmq service? https://bookmarklets.up.railway.app/log-downloader/
its in the active state right?
yes
are you deploying from an image or a repo, i know you said image but people have said image before when they meant repo
Repo > Dockerfile
yeah gotcha, not a direct image deploy
yes
are you using the rabbitmq template?
I do kinda, but only kept the base image. I removed the quickstart
show me how you run rabbitmq locally?
Dockerfile
same as with the template.
docker-compose.yml
run within a dev container
show me your in code client?
make sure to set ENABLE_ALPINE_PRIVATE_NETWORKING=TRUE in environment variables
if you are using alpine image so you can access internal services
they cant even connect to the public url of rabbitmq locally
only variable is that I am using Bun. But I can connect locally using bun runtime so it shouldn't really make a difference. It could though
So that variable should be set in the rabbitmq env?
you can connect to rabbitmq thats hosted on railway from your locally running app?
I can't
I can connect to my local rabbitmq using bun runtime
i dont know how tcp proxy works but i think you also need to make sure the service listens on ipv6 address too
nope the public tcp proxy is ipv4
the internal one is ipv6
i am aware, but they cant use either
if you are using template then i dont think you need to change anything
make sure to wait >100ms before connecting
because private network takes time to be available
they cant connect to it locally, please read through this thread
I am. It's been up for hours
locally within the internal network is what I want. But yes, I can't even connect locally using a public tcp tunnel
update: i can
So it must be bun
thats what im thinking too
but use this url
amqp://brody:[email protected]:59808
to run a connect test locallyThat works, using the same environment as before
So I am doing something wrong then
what is your public url you are testing with
and please do yourself a favor, remove the repo from the service and deploy directly from the image
rabbitmq:management-alpine
(like i have)Sure let me try that. That's the only difference right now I think
want me to make a new template that deploys from an image and has all the needed variables preconfigured like a
RABBITMQ_URL
and RABBITMQ_PRIVATE_URL
?Nah it's okay I am doing that right now
i mean id still like to so i know its done correctly
Got it working
So the issue was either the username or password was too long. But there was no error and I didn't even know that was possible
Using simple user and pass like app:app works
my username and passwords were no more than 16 chars
Works
awsome
That's stupid though. To be stuck on this because of a username or password
I've never seen that
it do be dumb
I used the same username and generated another secret using the railway utils from the cmd menu and it works
So it is the same length as before
And it works
I swear I used the inline shared variable feature before this too. So I think it's railway's fault not parsing it correctly. Maybe something failed to save internally
you deployed the template and then changed the username and password variables right?
yeah just tested, those two variables are single set only, so after you changed the username and password and used the new credentials in the connection url you where using the wrong credentials since the original username and passwords where still set
After retrying it doesn't work anymore. I've set the variables before deploying but when trying to connect it says 'PLAIN login refused: user 'app' - invalid credentials'
So the variables weren't used for some reason
I had it working, but I wanted to recreate it again because it's very inconsistent
i just tested with my own template and it works perfectly
When changing the password and prompting a redeploy it will have 0 build logs
you cant change the credentials without wiping the volume afterwards, those variables are single set only
Let me try that
sorry didn't see you say that
Alright thanks
I didn't know single set variables were a thing
That makes things moving forward so much easier
I thought it would just rebuild. But apparently the passwords are stored in the volume?
yep thats how rabbitmq works
iirc same with postgres
Quick question. Is there a way to depend on other services?
like deploy this service after this service becomes healthy type thing you can do in compose?
Yes
nope ðŸ˜
My postgres services are running fine but for some reason my prisma deploy gives me a " FATAL: the database system is starting up". It sometimes goes through, and sometimes it doesn't.
Maybe for another thread
you can only do work arounds like
wait-for-it.sh
, nc
, pg_isready
, sleep 3
in the start commandthe ui for dashboard makes you think you can create links between services lol
elaborate?
i spent minutes clicking on service and then trying to join it with other.
interesting
because the ui gives whiteboard like feel
nope, not possible beyond just grouping stuff, it has no effect on the order that stuff is deployed
https://community.railway.app/discuss/thread/service-groups-c1faed81
yes I know but imagine being able to create a graph for your services
a graph?
something like this
add that to https://community.railway.app/feedback
but lets not hijack OP's thread any longer please
the framework railway is using has full support for those kind of things I am pretty sure
not sure what it's called anymore
full support as in frontend*
react-flow it's called
that sounds familiar, dont know if they are still using it or have rolled their own solution
@Melissa this is the thread, it's not super straightforward because it threw me for a loop before I came to the final conclusion here