-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Channel closed by server: 403 (ACCESS-REFUSED) #407
Comments
The 403 (ACCESS-REFUSED) could be for a number of reasons. When I test locally using a RabbitMQ 3.6.0 docker container I get the following Test 1: Incorrect passwordFails on connect with
Test 2: No Configure PermissionsFails on ch.assertQueue with
Test 3: No Write Permissions On ExchangeFails on sendToQueue with
You can read about RabbitMQ permissions here If you are seeing the error on assertQueue, my guess would be your user can connect to the vhost but doesn't have the "configure" permission required to declare the queue. Try using It's interesting that your error message isn't more explicit. Maybe you're using a different version of RabbitMQ or theres a server setting which limits the output for security reasons. |
When I read stuff like this I can help but get annoyed. It doesn't help you or the company / client you are working for. We can't be experts on everything. There are two approaches I usually take when dealing with a response like this. One is to use a technique called Non Violent Communication. It goes something like...
With the NVC approach if they respond with a negative, tell them how you feel, but without implying any form of judgement, and request another action that they might take which will resolve your issue (e.g. send me the error logs, pass by your desk, speak to your supervisor to get the issue escalated, etc, etc) Another approach is called High Ground Manoeuvre, where you make the problem more general, effectively taking the moral high ground.
The advantage of the High Ground Maneuver is that any further attempt to belittle you makes the other person look petty and at risk of discipline should you have to escalate. Good luck. |
I have used PHp, NodeJS and both had same error, I created my own RMQ cloud server and tested the same code, and it worked, I was able to send messages and set an exchange and consume, I show them the logs and all and offered my help, but they refuse, that's what pushes me to be anxious now. |
I have used |
What happens if you try to publish without the assertQueue or checkQueue? |
same thing I got 403, I asked them many times to check the permissions, but they just keep telling me that everything is fine. What I think (as their documentation is poor) is that they only wants a connection to be opened then you can consume the API directly, I am testing this right now if it works or no. |
seems like I got it to work but using PHP library, converted same code to NodeJS but getting 403 emmm, I think I need more time to investigate this library and make sure things are fine. |
That's interesting. I suspect it's your connection string, maybe you have an additional @ character somewhere and the username / password are being incorrectly parsed |
I don't really think so, because when I check the connection object and channel object they both seem to have results, which means my connection has been made correctly, after reading PHP library src code and comparing it to nodejs, it's a bit different , in PHP you send no queue to the channel function nor a channel ID, it's automated. Im still figuring out other things. |
I am consuming an API and they are using RMQ cloud server now, I asked them many times to check the permission, they always reply by you don't know how to use rmq library, I would love to know if my code has anything to do with this issue:
I debugged the connection and channel object, the connection is opened which means the username and password works fine, but once i try to
assertQueue
I get the rejection error.Please correct me if im wrong, I believe this is strongly coming from their end and not the code I use.
The text was updated successfully, but these errors were encountered: