You are not logged in.
Hello, I am trying to create a package for pgAdmin4, pip version. It should start socket activated.
The issue is that, after the socket correctly calls the service, the service keeps reloading the ExecStart script and the script cannot bind to the port because it sees it as already in use (the socket is listening on it). So, something is definitely wrong.
The script requires a bit of time to execute, as it also tries to update the installation, but even if I comment the updating line the behavior is same.
run.sh
#!/bin/sh
cd /usr/share
python -m venv pgadmin4
source /usr/share/pgadmin4/bin/activate
PIP_CONFIG_FILE=/dev/null pip install --isolated pgadmin4
pgadmin4
pgadmin4-pip.socket
[Unit]
Description=pgAdmin4 Pip Socket
PartOf=pgadmin4-pip.service
[Socket]
ListenStream=127.0.0.1:5050
[Install]
WantedBy=default.target
pgadmin4-pip.service
[Unit]
Description=pgAdmin4-pip Service
After=network.target pgadmin4-pip.socket
Requires=pgadmin4-pip.socket
[Service]
Type=simple
ExecStart=/usr/share/pgadmin4/run.sh
TimeoutStopSec=5
[Install]
WantedBy=default.target
If I use another port, for example 5051, for the socket, then the server starts correctly at port 5050. It seems that the socket does not release the port to the pgadmin script. Any idea?
Offline
Does pgadmin4 support socket based activation? How are you passing the socket file descriptor to pgadmin4?
Offline