savearray2 commented on issue #119:
URL:
https://github.com/apache/pulsar-client-node/issues/119#issuecomment-690932567
Well, this is strange.
I cloned the project and created a simple js file to reproduce the error:
```js
const Pulsar = require('.')
const client = new Pulsar.Client({
serviceUrl: 'pulsar://this-will-fail:6650'
})
client.createProducer({
topic: 'persistent://a/b/c',
}).then(() => {
console.log('success')
}).catch((err) => {
console.log('normal err')
console.log(err)
})
```
This leads to the following output:
```
# node test_me.js
2020-09-11 16:39:03.046 INFO [0x700008f87000] ConnectionPool:85 | Created
connection for pulsar://this-will-fail:6650
2020-09-11 16:39:03.058 ERROR [0x70000a813000] ClientConnection:469 |
[<none> -> pulsar://this-will-fail:6650] Resolve error: asio.netdb:1 : Host not
found (authoritative)
2020-09-11 16:39:03.058 INFO [0x70000a813000] ClientConnection:1387 |
[<none> -> pulsar://this-will-fail:6650] Connection closed
2020-09-11 16:39:03.058 ERROR [0x70000a813000] ClientImpl:181 | Error
Checking/Getting Partition Metadata while creating producer on
persistent://a/b/c -- ConnectError
2020-09-11 16:39:03.058 INFO [0x70000a813000] ClientConnection:238 |
[<none> -> pulsar://this-will-fail:6650] Destroyed connection
normal err
[Error: Failed to create producer: ConnectError]
[1] 45767 segmentation fault node test_me.js
```
This still seems to be related to the comment in the NAPI repository
mentioned above. According to the comment, a change needed to be made so that
exceptions do not occur on exit.
I'd like to get some input from you guys on how to proceed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]