Skip to content

Dataplane exits at startup if config file does not exist #403

@ema-pe

Description

@ema-pe

I noticed that when I start the dataplaneapi for the first time, if the default dataplaneapi.yaml config file is not found (or doesn't exist), the program creates a new one. However after that it still doesn't start serving the Data Plane API immediately. I have to restart it once more for it to actually start serving. See the logs below. Is this intended behavior?

$ dataplaneapi \
          --host 0.0.0.0 \                                                                                                                                              
          --port 5555 \                                                                                                                                                 
          --log-level info \                                                                                                                                            
          --master-runtime /usr/local/etc/haproxy/config/haproxy-master.sock \                                                                                          
          --userlist dataplaneapi \                                                                                                                                     
          --config-file /usr/local/etc/haproxy/config/haproxy.cfg \                                                                                                     
          --reload-cmd "pkill -SIGUSR2 haproxy" \                                                                                                                       
          --restart-cmd "pkill -SIGUSR1 haproxy"
2026/04/07 11:04:10 maxprocs: Leaving GOMAXPROCS=6: CPU quota undefined                                                                                                 
2026/04/07 11:04:10 INFO memory is not limited, skipping package=github.com/KimMachineGun/automemlimit/memlimit                                                         
configuration file /etc/haproxy/dataplaneapi.yaml does not exists, creating one                                                                                         
time="2026-04-07T11:04:11Z" level=info msg="Build from: https://github.com/haproxytech/dataplaneapi.git"                                                                
time="2026-04-07T11:04:11Z" level=info msg="HAProxy Data Plane API v3.2.5 152e8a06"
time="2026-04-07T11:04:11Z" level=info msg="Build date: 2025-10-08T16:06:42Z"
time="2026-04-07T11:04:11Z" level=info msg="Reload strategy: custom"
$ # Again the same command...
2026/04/07 11:04:16 maxprocs: Leaving GOMAXPROCS=6: CPU quota undefined
2026/04/07 11:04:16 INFO memory is not limited, skipping package=github.com/KimMachineGun/automemlimit/memlimit
time="2026-04-07T11:04:17Z" level=info msg="HAProxy Data Plane API v3.2.5 152e8a06"
time="2026-04-07T11:04:17Z" level=info msg="Build date: 2025-10-08T16:06:42Z"
time="2026-04-07T11:04:17Z" level=info msg="Build from: https://github.com/haproxytech/dataplaneapi.git"
time="2026-04-07T11:04:17Z" level=info msg="Reload strategy: custom"
time="2026-04-07T11:04:18Z" level=info msg="Serving data plane at http://[::]:5555"
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions