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

zmq_subscriber.py crashes repeatedly #1

Closed
Andy-Dove opened this issue Oct 30, 2017 · 6 comments
Closed

zmq_subscriber.py crashes repeatedly #1

Andy-Dove opened this issue Oct 30, 2017 · 6 comments

Comments

@Andy-Dove
Copy link

Andy-Dove commented Oct 30, 2017

I am receiving the following error when I try and publish some events to ZMQ:

AttributeError: 'StricRedis' object has no attribute 'geoadd'.

This causes the subscriber to terminate. The error appears to occur on any event containing an IP address. Additionally I am getting messages that the subscriber is unable to resolve domains to IPs.

Kind regards
Andy Dove

@adulau
Copy link
Member

adulau commented Oct 30, 2017

Maybe you are running an old version of the Python redis library (or redis) which is not supporting the geoadd? Could you check the version and upgrade with pip3 to the latest version.

@Andy-Dove
Copy link
Author

Thanks for getting back to me. I was using the version supplied with the misp training VM. I have upgraded to the latest version of redis with pip3 and also checked that redis-server is up to date. apt-get reports version 2:3.0.6-1. Instead of the previous error I am now receiving a different one:

File "/usr/local/lib/python3.5/dist-packages/redis/connection.py", line 629, in read_response
raise response
redis.exceptions.ResponseError: unknown command 'GEOADD'

If I logon to the redis server manuallyit also tells me the command is not recognised. Clearly this is a redis issue not a dashboard issue. Feel free to close the issue but any guidance would be welcome.

Many thanks
Andy Dove

@adulau
Copy link
Member

adulau commented Oct 30, 2017

Interesting I didn't test the training VM ;-) We will have a look too.

@Andy-Dove
Copy link
Author

Manually upgrading redis to version 4 seems to have fixed the problem on the VM. Just need to work out how to manually make the upgrade stick as make install isn't doing the job.

@cudeso
Copy link
Contributor

cudeso commented Oct 31, 2017

I had the same issue. Starting from Ubuntu 16.
Uncommenting "serv_redis_db.geoadd(keyname, lon, lat, content)" in def push_to_redis_geo avoids the crashes.
It seems that the script does not call "./DASHENV/lib/python3.5/site-packages/redis/client.py" (which contains the "def geoadd()" but uses "/usr/lib/python3/dist-packages/redis/client.py" (which does not contain the geoadd) code.

@Andy-Dove
Copy link
Author

Ungrading the Redis and the associated python library definitely fixed the issue for me. I had to run the server install script from the redis distribution in order to finish upgrading the redis server but once that was done its all working smoothly.

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

3 participants