Question

i am using Solaris 10 OS(x86). i installed beanstalkd and it starts fine by using command "beanstalkd -d -l hostip -p 11300".

i have Python 2.4.4 on my system i installed YAML and beanstalkc python libraries to connect beanstalkd with python my problem is when i try to write some code:

import beanstalkc beanstalk = beanstalkc.Connection(host='hostip', port=11300)

no error so far but when i try to do someting on beanstalk like say listing queues. nothing happens.

beanstalk.tubes()

it just hangs and nothing returns. if i cancel the operation(using ctr+c on python env.) or stop the server i immediately see an output:

Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.4/site-packages/beanstalkc-0.1.1-py2.4.egg/beanstalkc.py", line 134, in tubes return self._interact_yaml('list-tubes\r\n', ['OK']) File "/usr/lib/python2.4/site-packages/beanstalkc-0.1.1-py2.4.egg/beanstalkc.py", line 83, in _interact_yaml size, = self._interact(command, expected_ok, expected_err) File "/usr/lib/python2.4/site-packages/beanstalkc-0.1.1-py2.4.egg/beanstalkc.py", line 57, in _interact status, results = self._read_response() File "/usr/lib/python2.4/site-packages/beanstalkc-0.1.1-py2.4.egg/beanstalkc.py", line 66, in _read_response response = self.socket_file.readline().split() File "/usr/lib/python2.4/socket.py", line 332, in readline data = self._sock.recv(self._rbufsize)

any idea whats going? i am an Unix newbie so i have no idea what i did setup wrong to cause this.

edit: seems like the problem lies within BeanStalkd itself, anyone have used this on Solaris 10? if so which version did you use? The v1.3 labeled one doesnt compile on Solaris while the latest from git code repository compiles it causes the above problem(or perhaps there is some configuration to do on Solaris?).

edit2: i installed and compiled same components with beanstalkd, PyYAML, pythonbeanstalc and libevent to an UBUNTU machine and it works fine. problems seems to be about compilation of beanstalkd on solaris, i have yet to produce or read any solution.

Was it helpful?

Solution

I might know what is wrong: don't start it in daemon (-d) mode. I have experienced the same and by accident I found out what is wrong.

Or rather, I don't know what is wrong, but it works without running it in daemon mode.

./beanstalkd -p 9977 &

as an alternative.

OTHER TIPS

It seems that the python-client listens to the server, but the server has nothing to say.

Is there something to read for the client?

Is there a consumer AND a producer ?

Look at this

After looking in the code (beanstalkc):

your client has send his 'list-tubes' message, and is waiting for an answer. (until you kill it) your server doesn't answer or can't send the answer to the client. (or the answer is shorter than the client expect)

is a network-admin at your side (or site) :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top