streadway / amqp

Go client for AMQP 0.9.1
http://godoc.org/github.com/streadway/amqp
BSD 2-Clause "Simplified" License
4.88k stars 621 forks source link

x509: certificate signed by unknown authority while connecting to Amazon MQ(RabbitMQ) #513

Closed jadilet closed 3 years ago

jadilet commented 3 years ago

I have an Amazon MQ RabbitMQ on AWS.

I can connect to Amazon MQ RabbitMQ on my local machine, But my deployed application on AWS couldn't connect to the Amazon MQ rabbitmq. I get: x509: certificate signed by unknown authority

code:

    url := fmt.Sprintf("amqps://%s:%s@%s:%s/",
        os.Getenv("RABBITMQ_USER"),
        os.Getenv("RABBITMQ_PASSWORD"),
        os.Getenv("RABBITMQ_HOST"),
        os.Getenv("RABBITMQ_PORT"),
    )

    conn, err := amqp.Dial(url)