dataplaneapi
dataplaneapi copied to clipboard
Unable to make dataplaneapi listen on unix socket
Hi,
I want dataplaneapi to run and listen on unix socket with socket_path option, but I'm unable to.
Running as root dataplaneapi manually with next config:
config_version: 2
dataplaneapi:
socket_path: /var/run/dataplaneapi.sock
debug_socket_path: /var/run/dataplaneapi_debug.sock
pid_file: /var/run/dataplaneapi.pid
userlist:
userlist: dataplaneapi
transaction:
transaction_dir: /etc/dataplaneapi/transactions
resources:
maps_dir: /etc/dataplaneapi/maps
ssl_certs_dir: /etc/dataplaneapi/hssl
general_storage_dir: /etc/dataplaneapi/general
spoe_dir: /etc/dataplaneapi/spoe
haproxy:
config_file: /etc/haproxy/haproxy.cfg
reload:
service_name: haproxy
reload_strategy: systemd
, I get next:
# dataplaneapi -f dataplaneapi.yml --log-level debug
time="2024-03-01T21:22:10+03:00" level=info msg="Build from: https://github.com/haproxytech/dataplaneapi"
time="2024-03-01T21:22:10+03:00" level=info msg="HAProxy Data Plane API v2.9.0 91da11d"
time="2024-03-01T21:22:10+03:00" level=info msg="Reload strategy: systemd"
time="2024-03-01T21:22:10+03:00" level=info msg="Build date: 2023-12-08T14:53:01Z"
time="2024-03-01T21:22:10+03:00" level=debug msg="-- command socket updating client_native client"
time="2024-03-01T21:22:11+03:00" level=info msg="Serving data plane at http://127.0.0.1:34725"
time="2024-03-01T21:22:11+03:00" level=debug msg="-- command socket Server. conf ready..."
time="2024-03-01T21:22:11+03:00" level=info msg="-- command socket Starting on /var/run/dataplaneapi_debug.sock"
There is no such file /var/run/dataplaneapi.sock:
# ls -l /var/run/dataplaneapi*
srwxr-xr-x 1 root root 0 Mar 1 21:22 /var/run/dataplaneapi_debug.sock
-rw-r--r-- 1 root root 7 Mar 1 21:22 /var/run/dataplaneapi.pid
Running with strace I see no attempts to bing on unix socket, though the option is processed and written in re-generated dataplaneapi.yml config file.
My version is 2.9.0.
What am I doing wrong? Thanks in advance.
Were you able to solve this issue? Currently having same problem.
Nope. Using tcp socket.
Can you elaborate more on the solution?