Problem with public connection with kafka service
I have a service using kafka and zookeeper in one project, and, i want connect in him by other project, both in my account. Now an error is occurring, where it cannot find my public Kafka connection.
22 Replies
Project ID:
6127aa98-d755-4c2f-a2d5-42b6ff8ace11
6127aa98-d755-4c2f-a2d5-42b6ff8ace11
are u using the tcp domain?
i using this
what error are u getting? send logs https://bookmarklets.up.railway.app/log-downloader/
my error occurring, when i try connect externally in this public tcp
using kafkacat -L -b monorail.proxy.rlwy.net:14442, he connect
but using a initialize costumer, he show me this error
{"level":"INFO","timestamp":"2024-02-14T16:33:02.618Z","logger":"kafkajs","message":"[Consumer] Starting","groupId":"payments"}
{"level":"ERROR","timestamp":"2024-02-14T16:33:02.787Z","logger":"kafkajs","message":"[Connection] Connection error: getaddrinfo ENOTFOUND kafka.railway.internal","broker":"kafka.railway.internal:29092","clientId":"kafkajs","stack":"Error: getaddrinfo ENOTFOUND kafka.railway.internal\n at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)"}
{"level":"ERROR","timestamp":"2024-02-14T16:33:02.791Z","logger":"kafkajs","message":"[Consumer] Crash: KafkaJSConnectionError: Connection error: getaddrinfo ENOTFOUND kafka.railway.internal","groupId":"payments","stack":"KafkaJSConnectionError: Connection error: getaddrinfo ENOTFOUND kafka.railway.internal\n at Socket.onError (/home/windel/windel-socket-ms/node_modules/kafkajs/src/network/connection.js:210:23)\n at Socket.emit (node:events:514:28)\n at emitErrorNT (node:internal/streams/destroy:151:8)\n at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)"}
{"level":"INFO","timestamp":"2024-02-14T16:33:02.792Z","logger":"kafkajs","message":"[Consumer] Stopped","groupId":"payments"}
{"level":"ERROR","timestamp":"2024-02-14T16:33:02.793Z","logger":"kafkajs","message":"[Consumer] Restarting the consumer in 300ms","retryTime":300,"groupId":"payments"}
@Garcia are you brazilian? if so, do you mind upvoting this community suggestion ? Bora trazer o Railway pro Brasil π
yeah, i liked
Also, I'm from Farroupilha, basically neighbours
i switch to rabbitmq, he already generates the url for remote connection
wow, i'm living and working in Caxias
did you use the kafka template? its not the best to put it politely, on the other hand the rabbitmq template is top notch
yes, i used, both.
template from rabbit work perfectly
hi, i was busy with work.
you're probably trying to use the kafka's internal domain in your consumer, you should use your public domain (monorail...)
low quality template aside, whats wrong with using the internal domain?
services are in different projects
oh, missed that, my bad
i use tcp proxy, but he redirect to internal url, i dont know why he make this
maybe the template only expects to be used with internal networking? tcp proxy is relatively new
@Brody do you think we can contact the owner somehow?
their repo's issues would be your best bet, but the entire template needs an overhaul
Solution
i resolved this using rabbitmq
a url that it generates working
i knew adding that would come in handy