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

User Story issue #183

Open
KaraMelih opened this issue Aug 1, 2022 · 7 comments
Open

User Story issue #183

KaraMelih opened this issue Aug 1, 2022 · 7 comments

Comments

@KaraMelih
Copy link

Description

The hop version 0.5.0 started to raise Network errors for me since this morning. Here is an example;

[description and details]

with stream.open("kafka://kafka.scimma.org/snews.experiments-firedrill", "r") as s: 
    for m in s:
    print(m) 
%3|1659366426.038|FAIL|rdkafka#consumer-2| [thrd:sasl_ssl://kafka.scimma.org:9092/bootstrap]: sasl_ssl://kafka.scimma.org:9092/bootstrap: Failed to connect to broker at [a.root-servers.net]:9092: Network is unreachable (after 41ms in state CONNECT)
Traceback (most recent call last):  
File "<stdin>", line 1, in <module> 
File "/home/kara-unix/anaconda3/envs/snews/lib/python3.9/site-packages/hop/io.py", line 119, in open

return Consumer( File "/home/kara-unix/anaconda3/envs/snews/lib/python3.9/site-packages/hop/io.py", line 299, in __init__  self.consumer.subscribe(topics) 
File "/home/kara-unix/anaconda3/envs/snews/lib/python3.9/site-packages/adc/consumer.py", line 41, in subscribe topic_meta = self.describe_topic(topic,  timeout) 
File "/home/kara-unix/anaconda3/envs/snews/lib/python3.9/site-packages/adc/consumer.py", line 63, in describe_topic  
cluster_meta = self._consumer.list_topics(timeout=timeout.total_seconds())

cimpl.KafkaException: KafkaError{code=_TRANSPORT,val=-195,str="Failed to get metadata: Local: Broker transport failure"}  >>>   >>> %3|1659366557.057|FAIL|rdkafka#consumer-2| [thrd:sasl_ssl://kafka.scimma.org:9092/bootstrap]: 

sasl_ssl://kafka.scimma.org:9092/bootstrap: Connect to ipv4#198.41.0.4:9092 failed: Connection timed out (after 130954ms in state CONNECT)   %3|1659366690.177|FAIL|rdkafka#consumer-2| [thrd:sasl_ssl://kafka.scimma.org:9092/bootstrap]: 
sasl_ssl://kafka.scimma.org:9092/bootstrap: Connect to ipv4#192.5.5.241:9092 failed: Connection timed out (after 132181ms in state CONNECT)    %3|1659366691.039|FAIL|rdkafka#consumer-2| [thrd:sasl_ssl://kafka.scimma.org:9092/bootstrap]: 
sasl_ssl://kafka.scimma.org:9092/bootstrap: Failed to connect to broker at [a.root-servers.net]:9092: Network is unreachable (after 43ms in state CONNECT) 

Definition of Done

I tried creating new credentials, I also tried using 3 different networks (which I was using in the past and it was working) including eduroam. Everything seems to be working, I seem to have a network connection. I do not understand why it started to crash

@KaraMelih
Copy link
Author

I'm from Germany, and I set up all my accounts there.

Now I'm in US, last week it worked without any problems on my local machine when I was connected to eduroam. Today it started crashing, and just now I tried connecting to Germany via VPN and running it. It works.
I have no explanation, but I'm curious to learn why this might be.

@cnweaver
Copy link
Contributor

cnweaver commented Aug 1, 2022

Can you test whether the network(s) you're using have anyone blocking outgoing connections on the Kafka default port (9092), as this is disappointingly common? For example, you can test with a command like

echo 'test' | nc -w 10 kafka.scimma.org 9092; echo $?

which should print P0 fairly quickly if the port is not blocked, or take longer and print only 0 or 1 if the port is blocked.

@KaraMelih
Copy link
Author

Hi yes, indeed this returns P0 only when I'm connected to VPN. And returns some error message when I'm connected to the local eduroam in Indiana. I can check the exact message tomorrow and post again if needed.
What is confusing is that I only started having this issue this week, I do not think I changed any network settings on my end.

@cnweaver
Copy link
Contributor

cnweaver commented Aug 2, 2022

Unfortunately, this is the type of thing that network admins change, sometimes in response to observing traffic. It may be possible to contact them and explain that there is a science use for having the port open.

@KaraMelih
Copy link
Author

I was able to connect as long as I was using a VPN, however, today that also started rejecting my connection.
I'm first getting

%4|1659476487.055|TERMINATE|rdkafka#producer-1| [thrd:app]: Producer terminating with 1 message (293 bytes) still in 
 queue or transit: use flush() to wait for outstanding message delivery

Then it raises
Error communicating with Kafka: code=_MSG_TIMED_OUT Local: Message timed out

I upgraded my hop-client to the latest version on pypi hop version 0.6.0

@KaraMelih
Copy link
Author

Also, my collagues started getting same / similar errors today

@KaraMelih
Copy link
Author

Here is my colleague's error SNEWS2/SNEWS_Publishing_Tools#48 (comment)

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