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.error.ZMQError: Protocol not supported #1838

Closed
varac opened this issue Jun 2, 2022 · 6 comments
Closed

🐛 | zmq.error.ZMQError: Protocol not supported #1838

varac opened this issue Jun 2, 2022 · 6 comments
Labels
bug future3 Relates to future3 development

Comments

@varac
Copy link
Contributor

varac commented Jun 2, 2022

Bug

What I did

I followed the Phoniebox Development Runbook for Docker environments. I could build all docker images fine but when I start the containers with docker compose -f docker/docker-compose.yml -f docker/docker-compose.linux.yml up both the jukebox containter ends up in a restart loop.

I expected this to happen

The jukebox container should run successfully.

Further information that might help

jukebox  | Traceback (most recent call last):
jukebox  |   File "/home/pi/RPi-Jukebox-RFID/src/jukebox/run_jukebox.py", line 67, in <module>
jukebox  |     main()
jukebox  |   File "/home/pi/RPi-Jukebox-RFID/src/jukebox/run_jukebox.py", line 63, in main
jukebox  |     myjukebox.run()
jukebox  |   File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/daemon.py", line 227, in run
jukebox  |     self.rpc_server = RpcServer()
jukebox  |   File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/rpc/server.py", line 86, in __init__
jukebox  |     self.socket.bind(websocket_address)
jukebox  |   File "/usr/local/lib/python3.9/dist-packages/zmq/sugar/socket.py", line 226, in bind
jukebox  |     super().bind(addr)
jukebox  |   File "zmq/backend/cython/socket.pyx", line 562, in zmq.backend.cython.socket.Socket.bind
jukebox  |   File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
jukebox  | zmq.error.ZMQError: Protocol not supported

Software

Base image and version

  • Raspberry PI OS lite (bullseye, 64 bit)

Branch / Release

  • Git tag V3.2.0

Hardware

Raspberry Pi 3 Model B Plus Rev 1.3

Possible soluton

I found that that this diff in jukebox.Dockerfile fixed it:

diff --git a/docker/jukebox.Dockerfile b/docker/jukebox.Dockerfile
index f1ac0714..94f469fa 100644
--- a/docker/jukebox.Dockerfile
+++ b/docker/jukebox.Dockerfile
@@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \
     alsa-utils \
     libasound2-dev \
     libasound2-plugins \
+    libzmq3-dev \
     pulseaudio \
     pulseaudio-utils \
     --no-install-recommends \
@@ -31,7 +32,7 @@ RUN apt-get update && apt-get install -qq -y \
 COPY . ${INSTALLATION_PATH}
 
 RUN pip3 install --no-cache-dir -r ${INSTALLATION_PATH}/requirements.txt
-RUN pip3 install pyzmq
+RUN pip install -vv --no-binary pyzmq pyzmq --install-option --zmq=/usr 
 


I could create a PR if this solution is accepted.

@varac
Copy link
Contributor Author

varac commented Jun 2, 2022

Related: #1814

@varac varac changed the title 🐛 | docker: zmq.error.ZMQError: Protocol not supported 🐛 | zmq.error.ZMQError: Protocol not supported Jun 3, 2022
@varac
Copy link
Contributor Author

varac commented Jun 3, 2022

I just noticed that I get the same error following the official installation docs for future3.

Could fix this with:

sudo pip uninstall pyzmq                                                                                                                                                                                     
sudo apt install libzmq3-dev                                                                                                                                                                                 
sudo pip install -vv --no-binary pyzmq pyzmq --install-option --zmq=/usr  

@s-martin
Copy link
Collaborator

s-martin commented Jun 3, 2022

As mentioned by @ChisSoc most likely because of 64bit OS.

@s-martin s-martin added future3 Relates to future3 development and removed needs triage labels Jun 3, 2022
@derpeter
Copy link

derpeter commented Jun 30, 2022

Just quick feedback: I ran into the same issue following official future3 guide on pi zero 2w with 32bit bullseye and solved it the same way (only without the sudo)

@abirke
Copy link

abirke commented May 14, 2023

I am also still seeing this issue on Raspberry Pi Model 3B V1.2, Raspbian GNU/Linux 11 (bullseye) 32-bit, Python 3.9.2, pip 23.1.2, and Commit ID bd7bb78 from the future3/main.

The above script seems to still fix the problem although the pip install command options have slightly changed.

pip uninstall pyzmq
apt-get install libzmq3-dev
pip install --no-binary=:all: pyzmq

@s-martin
Copy link
Collaborator

Should be now fixed on future3/develop

#2108 (comment)

can you check this?

closing for now. Feel free to post in #2108, if the issue still occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug future3 Relates to future3 development
Projects
None yet
Development

No branches or pull requests

4 participants