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

SMF AD bind response error #421

Open
sergejacod opened this issue Jun 14, 2024 · 3 comments
Open

SMF AD bind response error #421

sergejacod opened this issue Jun 14, 2024 · 3 comments

Comments

@sergejacod
Copy link

Hi,

I encountered the following Error that was not handled and Node exited due to this error. Not sure if I can catch the error to prevent Node from exiting ?

Rhea : 3.0.1
Nodejs: 20.12.2

Error: SMF AD bind response error
    at Receiver.link.on_detach (/workspace/node_modules/rhea/lib/link.js:165:86)
    at Session.on_detach (/workspace/node_modules/rhea/lib/session.js:745:27)
    at Connection.<computed> [as on_detach] (/workspace/node_modules/rhea/lib/connection.js:855:30)
    at c.dispatch (/workspace/node_modules/rhea/lib/types.js:946:33)
    at Transport.read (/workspace/node_modules/rhea/lib/transport.js:117:36)
    at Connection.input (/workspace/node_modules/rhea/lib/connection.js:567:37)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
const newContainer = container.create_container();

  var connection = newContainer.connect({
    host: XXX,
    port: XXX,
    transport: "tls",
    key: certificate.key,
    cert: certificate.cert,
    reconnect: true,
    idle_time_out: 1000 * 70,
  });

  connection.on("message", async function (context) {
    // Handling new messages 
  });

  connection.on("connection_close", (context) => {
    console.log(`Connection close`, context);
  });

  connection.on("disconnected", () => {
    console.log("Bus receiver connection receives disconnected");
  });

  connection.on("connection_error", (reason) => {
    console.log(
      "Bus receiver connection receives connection error",
      reason.error,
      reason
    );
  });

Is there a way to prevent the app from exiting ? Do you have an idea where this error is originating ?

Thanks

@grs
Copy link
Member

grs commented Jun 14, 2024

I believe it is an error from Solace messaging system. From some googling, it looks like it is related to authorization of a sender or receiver. You should be able to handle it with sender_close/sender_error/receiver_close/receiver_error handlers.

@sergejacod
Copy link
Author

Thanks @grs, when using a handler such as receiver_error, will this prevent the error to be thrown and the app will not exit ?

@grs
Copy link
Member

grs commented Jun 14, 2024

Yes, if it is handled the error will not be raised

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