views:

175

answers:

3

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.

+1  A: 

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

Blauohr
yes, there is something to read for the client, server is supposed to send tubes(beanstalk.tubes() call requests that) which is "default" tube, and its same with every other command i try to execute on beanstalk (beanstalkc.Connection object), no command seems to respond.
Numenor
i looked at the link you send but i am not using pybeanstalk, i am using beanstalkc
Numenor
+1  A: 

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) :-)

Blauohr
i also did install beanstalkd server too. i got the latest code for beanstalkd and compile it since the official v1.3 wasnt compiling on solaris. where exactly should i check for ensuring beanstalkd or network works fine? i can get my network-admin at my side, what should i ask him :)
Numenor
1. tell your network-admin what you want to do |2. let yout network-admin check : connection and traffic / are there packets between client and server / which side (client or server doesn't work.
Blauohr
well both client and server running on the same machine, so i doubt if there is or need be any network activity.
Numenor
+1  A: 

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.

Arjen Smedes