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

ZMQError(Resource temporarily unavailable) when CloudburstConnection #69

Open
flutgirl opened this issue Jul 4, 2022 · 0 comments
Open

Comments

@flutgirl
Copy link

flutgirl commented Jul 4, 2022

hello, cloudburst is a good project! I want run test in local mode but meet some error when CloudburstConnection. Here, I print some log in cloudburst/client/client.py, the code is as follows:

 def _connect(self):
        sckt = self.context.socket(zmq.REQ)
        sckt.setsockopt(zmq.RCVTIMEO, 1000)
        sckt.connect(self.service_addr % CONNECT_PORT)
        sckt.send_string('')
        
        print("before-try")

        try:
            print("try")
            result = sckt.recv_string()
            print("after-try")
            return result
        
        except zmq.ZMQError as e:
            print("zmqerro")
            print(e)
            if e.errno == zmq.EAGAIN:
                return None
            else:
                raise e
  • the test result:
$ python3                   
Python 3.7.0 (default, Mar  4 2022, 02:48:37) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from cloudburst.client.client import CloudburstConnection
>>> local_cloud = CloudburstConnection('127.0.0.1', '127.0.0.1', local=True)
before-try
try
zmqerro
Resource temporarily unavailable
Connection timed out, retrying
before-try
try
zmqerro
Resource temporarily unavailable
Connection timed out, retrying
before-try
try
zmqerro
Resource temporarily unavailable
Connection timed out, retrying
before-try
try
^CTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/chunpu/cloudburst/cloudburst/client/client.py", line 66, in __init__
    kvs_addr = self._connect()
  File "/home/chunpu/cloudburst/cloudburst/client/client.py", line 341, in _connect
    result = sckt.recv_string()
  File "/home/chunpu/.pyenv/versions/3.7.0/lib/python3.7/site-packages/zmq/sugar/socket.py", line 584, in recv_string
    msg = self.recv(flags=flags)
  File "zmq/backend/cython/socket.pyx", line 788, in zmq.backend.cython.socket.Socket.recv
  File "zmq/backend/cython/socket.pyx", line 824, in zmq.backend.cython.socket.Socket.recv
  File "zmq/backend/cython/socket.pyx", line 186, in zmq.backend.cython.socket._recv_copy
  File "zmq/backend/cython/checkrc.pxd", line 12, in zmq.backend.cython.checkrc._check_rc
KeyboardInterrupt
  • port 5000 is open
$ lsof -i:5000
COMMAND   PID   USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
python3 54472 chunpu   29u  IPv4 74598688      0t0  TCP *:5000 (LISTEN)
  • and server is running:
$ ps -ef | grep cloud  
chunpu   54472     1  0 11:22 pts/20   00:00:06 /home/chunpu/.pyenv/versions/3.7.0/bin/python3 cloudburst/server/scheduler/server.py conf/cloudburst-local.yml
chunpu   54473     1  0 11:22 pts/20   00:00:06 /home/chunpu/.pyenv/versions/3.7.0/bin/python3 cloudburst/server/executor/server.py conf/cloudburst-local.yml
chunpu   61251 52289  0 11:48 pts/19   00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox cloud

so what is the reason of ZMQError(Resource temporarily unavailable), I have confused about it for a long time, can you help me?
Thank you!

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