R
Railwayβ€’10mo ago
Garcia

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.
Solution:
i resolved this using rabbitmq
Jump to solution
22 Replies
Percy
Percyβ€’10mo ago
Project ID: 6127aa98-d755-4c2f-a2d5-42b6ff8ace11
Garcia
GarciaOPβ€’10mo ago
6127aa98-d755-4c2f-a2d5-42b6ff8ace11
ThallesComH
ThallesComHβ€’10mo ago
are u using the tcp domain?
Garcia
GarciaOPβ€’10mo ago
i using this
No description
ThallesComH
ThallesComHβ€’10mo ago
what error are u getting? send logs https://bookmarklets.up.railway.app/log-downloader/
Garcia
GarciaOPβ€’10mo ago
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"}
Medim
Medimβ€’10mo ago
@Garcia are you brazilian? if so, do you mind upvoting this community suggestion ? Bora trazer o Railway pro Brasil πŸ˜‰
Garcia
GarciaOPβ€’10mo ago
yeah, i liked
Medim
Medimβ€’10mo ago
Also, I'm from Farroupilha, basically neighbours
Garcia
GarciaOPβ€’10mo ago
i switch to rabbitmq, he already generates the url for remote connection wow, i'm living and working in Caxias
Brody
Brodyβ€’10mo ago
did you use the kafka template? its not the best to put it politely, on the other hand the rabbitmq template is top notch
Garcia
GarciaOPβ€’10mo ago
yes, i used, both. template from rabbit work perfectly
ThallesComH
ThallesComHβ€’10mo ago
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...)
Brody
Brodyβ€’10mo ago
low quality template aside, whats wrong with using the internal domain?
ThallesComH
ThallesComHβ€’10mo ago
services are in different projects
Brody
Brodyβ€’10mo ago
oh, missed that, my bad
Garcia
GarciaOPβ€’10mo ago
i use tcp proxy, but he redirect to internal url, i dont know why he make this
ThallesComH
ThallesComHβ€’10mo ago
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?
Brody
Brodyβ€’10mo ago
their repo's issues would be your best bet, but the entire template needs an overhaul
Solution
Garcia
Garciaβ€’10mo ago
i resolved this using rabbitmq
Garcia
GarciaOPβ€’10mo ago
a url that it generates working
Brody
Brodyβ€’10mo ago
i knew adding that would come in handy
Want results from more Discord servers?
Add your server