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

Unable to make dataplaneapi listen on unix socket #325

Open
odivlad opened this issue Mar 1, 2024 · 0 comments
Open

Unable to make dataplaneapi listen on unix socket #325

odivlad opened this issue Mar 1, 2024 · 0 comments

Comments

@odivlad
Copy link

odivlad commented Mar 1, 2024

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.

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