<p>I'm trying to send RabbitMQ messages from my host machine to a Minikube instance with a RabbitMQ cluster deployed.</p>
<p>When running my send script, I get hit with this error:</p>
<pre><code>Handshake terminated by server: 403 (ACCESS-REFUSED) with message &quot;ACCESS_REFUSED - Login was refused 
using authentication mechanism PLAIN. For details see the broker logfile.
</code></pre>
<p>In the broker logfiles I can see this line:</p>
<pre><code>Error on AMQP connection &lt;0.13226.0&gt; (172.17.0.1:40157 -&gt; 172.17.0.8:5672, state: starting):
PLAIN login refused: user 'rabbitmq-cluster-default-user' - invalid credentials
</code></pre>
<p>I'm sure I have the correct credentials since I got them directly from the RabbitMQ pod, following the official documentation (<a href="https://www.rabbitmq.com/kubernetes/operator/using-operator.html#find" rel="nofollow noreferrer">link</a>).</p>
<p>My send script is below:</p>
<pre><code>const amqp = require('amqplib/callback_api');

const cluster = &quot;amqp://rabbitmq-cluster-default-user:dJhLl2aVF78Gn07g2yGoRuwjXSc6tT11@192.168.49.2:30861&quot;;

amqp.connect(cluster, function(error0, connection) 
{
    if (error0)
    {
        throw error0;
    }

    connection.createChannel(function(error1, channel) 
    {
        if (error1)
        {
            throw error1;
        }

        const queue = &quot;files&quot;;
        var msg = {
            name: &quot;Hello World&quot;
        };

        var msgJson = JSON.stringify(msg);

        channel.assertQueue(queue, {
            durable: false
        });

        channel.sendToQueue(queue, Buffer.from(msgJson));
    });
});
</code></pre>
<p>I know the code works as I ran the exact same script for my localhost setup and it worked. The only thing I've changed is the URL (for the Minikube RabbitMQ service).</p>
<p>I've seen a few other posts that contain a similar issue but most solutions are about including the correct credentials in the URI, which I have done.</p>
<p>Any other ideas?</p>

Brady Harper
<p>You can use port forwarding the rabbitMQ service to your local machine and use UI login and check the password with the UI given by the RabbitMQ itself.</p>
<pre><code>kubectl port-forward svc/rabbitmq UI-PORT:UI-PORT (must be 15672)
</code></pre>
<p>then from a browser</p>
<pre><code>localhost:15762  
</code></pre>
<p>must be enough</p>
<p>For clearance you can check if you can login from the container itself. If the login from the container fails you can also check the yaml file or the helm chart you are using for login methods and credentials. Plain login may be disabled.</p>
<p>Another situation may be with the distrubution. When deploying RabbitMQ I try to use bitnami charts. I can suggest them.</p>
<p>If all these fails there is another way you can use. You can try to create another user with admin privileges to connect to RabbitMQ and then keep using it.</p>
<p>For more information, you can post container/pod logs for us to see.
Good day.</p>
