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

Connection Swampdragon to a Redis Socket #209

Open
denizs opened this issue Jul 17, 2016 · 1 comment
Open

Connection Swampdragon to a Redis Socket #209

denizs opened this issue Jul 17, 2016 · 1 comment

Comments

@denizs
Copy link

denizs commented Jul 17, 2016

Hey Jonas,
big fan of your work!
I'm almost done deploying my sd-powered app on my uberspace, however, I'm stuck with the redis config. As Uberspace.de does not allow me to run redis-server on 127.0.0.1:6379, I had to set up a redis socket which runs on /home/{{ User }}/.redis/sock.

Obviously, setting SWAMP_DRAGON_HOST to unix:///home/{{ User }}/.redis/sock and SWAMP_DRAGON_PORT to 0 does not work. After some research, I found that tornadoredis.Client has an argument unix_socket_path which lets you set up the redis connection via unix sockets.

Sadly, I'm still getting an error message after I changed the code respectively:

ERROR:tornado.general:WebSocket
Traceback (most recent call last):
  File ".../site-packages/sockjs/tornado/transports/websocket.py", line 60, in on_message
    self.session.on_messages(msg)
  File ".../site-packages/sockjs/tornado/session.py", line 418, in on_messages
    self.conn.on_message(msg)
  File ".../site-packages/swampdragon/connections/sockjs_connection.py", line 90, in on_message
    raise e
ConnectionError: Error -2 connecting to /.../.redis/sock:0. Name or service not known.

I am wondering whether you already deployed sd with a redis sock and could help me out here!

Best,
D

@denizs
Copy link
Author

denizs commented Jul 18, 2016

After digging deeper, I realised that the not only redis_sub_provider.py, but also redis_publisher.py is using the host attribute. Problem solved, everything is working fine :-)

I'll fork the repo and introduce an additional tag called SWAMP_DRAGON_REDIS_SOCKET, in case you're interested!
Best,
D

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

1 participant