Skip to content
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: unable to verify the first certificate #506

Closed
ramzes13 opened this issue Apr 19, 2019 · 2 comments
Closed

ERROR: unable to verify the first certificate #506

ramzes13 opened this issue Apr 19, 2019 · 2 comments

Comments

@ramzes13
Copy link

Hello,
I have had the same problem as here #331 ,
After change my code to:

const uri = 'amqp://localhost' // or amqps://.........
const parsedURI = url.parse(uri);

amqp.connect(uri, { servername: parsedURI.hostname })

I could make the connection.

At the moment I need to use Auto-reconnect and round robin support for amqplib.

I tried:

  const parsedURI = url.parse(credentials.uri_direct_1);
  const connectionOptions = { servername: parsedURI.hostname };
  const parsedURI2 = url.parse(credentials.uri);

  const connection = amqp.connect([parsedURI, parsedURI2], { connectionOptions });

With this config app is also conecting to the server.
I'm worried that in configuration there are 2 urls parsedURI, parsedURI2, But in connectionOptions are set only servername from one Url.

How can this problem be solved correctly?

@squaremo
Copy link
Collaborator

At the moment I need to use Auto-reconnect and round robin support for amqplib.

Reconnection is not implemented in this library (in other words, you can't supply an array of URLs to connect). You will need to do this yourself, in which case it will be fairly easy to make the connection options depend on the URL.

@ramzes13
Copy link
Author

Sorry, actually I use another library, but there I met the problem described #331 and I could solve with the solution described there.
I create issue in right place jwalton/node-amqp-connection-manager#82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants