Re: Dataplane exits at haproxytech/haproxy-ubuntu:2.9 in Containers
Hi. On 2024-03-18 (Mo.) 12:19, William Lallemand wrote: On Sun, Mar 17, 2024 at 07:53:17PM +0100, Aleksandar Lazic wrote: Hi. Looks like there was a similar question in the forum https://discourse.haproxy.org/t/trouble-with-starting-the-data-plane-api/9200 Any idea how to fix this? Honestly no idea, you should try an issue there: https://github.com/haproxytech/dataplaneapi/issues Thank you for the hint. I have created this issue https://github.com/haproxytech/dataplaneapi/issues/329 Regards Alex
Re: Dataplane exits at haproxytech/haproxy-ubuntu:2.9 in Containers
On Sun, Mar 17, 2024 at 07:53:17PM +0100, Aleksandar Lazic wrote: > Hi. > > Looks like there was a similar question in the forum > https://discourse.haproxy.org/t/trouble-with-starting-the-data-plane-api/9200 > > Any idea how to fix this? > Honestly no idea, you should try an issue there: https://github.com/haproxytech/dataplaneapi/issues -- William Lallemand
Re: Dataplane exits at haproxytech/haproxy-ubuntu:2.9 in Containers
Hi. Looks like there was a similar question in the forum https://discourse.haproxy.org/t/trouble-with-starting-the-data-plane-api/9200 Any idea how to fix this? Regards Alex On 2024-03-13 (Mi.) 00:11, Aleksandar Lazic wrote: Hi. I try to run dataplane as "random" user inside haproxy.cfg. That's the debug output of the start of the container. Even as I have set the --log-level=trace to the dataplane can't I see any reason why the api kills the process. ``` # Debug output with dataplane api alex@alex-tuxedoinfinitybooks1517gen7 on 12/03/2024 at 23:51:49_CET /datadisk/container-haproxy $ sudo buildah bud --tag craftcms-hap . STEP 1/4: FROM haproxytech/haproxy-ubuntu:2.9 STEP 2/4: COPY container-files/ / STEP 3/4: RUN set -x && mkdir -p /data/haproxy/etc /data/haproxy/run /data/haproxy/maps /data/haproxy/ssl /data/haproxy/general /data/haproxy/spoe && chown -R1001:0 /data && chmod -R g=u /data && touch /data/haproxy/etc/dataplaneapi.yaml + mkdir -p /data/haproxy/etc /data/haproxy/run /data/haproxy/maps /data/haproxy/ssl /data/haproxy/general /data/haproxy/spoe + chown -R 1001:0 /data + chmod -R g=u /data + touch /data/haproxy/etc/dataplaneapi.yaml STEP 4/4: USER 1001 COMMIT craftcms-hap Getting image source signatures Copying blob d101c9453715 skipped: already exists Copying blob 5c32e8ef5ef0 skipped: already exists Copying blob 5bbbd68c0c20 skipped: already exists Copying blob 2f5b49454406 [--] 0.0b / 0.0b Copying blob 83d27970fa5a [--] 0.0b / 0.0b Copying blob 5a567c1d5233 done Copying config 1ac0ae6824 done Writing manifest to image destination Storing signatures --> 1ac0ae6824c Successfully tagged localhost/craftcms-hap:latest 1ac0ae6824c91a9bc4fa1f19979c0b9dc672981fb82949429006d53252f8de9c alex@alex-tuxedoinfinitybooks1517gen7 on 12/03/2024 at 23:54:21_CET /datadisk/container-haproxy $ sudo podman run -it --rm --network host --name haproxy craftcms-hap haproxy -f /data/haproxy/etc/haproxy.cfg -d Available polling systems : epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result FAILED Total: 3 (2 usable), will use epoll. Available filters : [BWLIM] bwlim-in [BWLIM] bwlim-out [CACHE] cache [COMP] compression [FCGI] fcgi-app [SPOE] spoe [TRACE] trace Using epoll() as the polling mechanism. [NOTICE] (1) : New program 'api' (3) forked [NOTICE] (1) : New worker (4) forked [NOTICE] (1) : Loading success. Available polling systems : epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result OK Total: 3 (3 usable), will use epoll. Available filters : [BWLIM] bwlim-in [BWLIM] bwlim-out [CACHE] cache [COMP] compression [FCGI] fcgi-app [SPOE] spoe [TRACE] trace Using epoll() as the polling mechanism. time="2024-03-12T22:54:24Z" level=info msg="HAProxy Data Plane API v2.9.1 4d10854c" time="2024-03-12T22:54:24Z" level=info msg="Build from: https://github.com/haproxytech/dataplaneapi.git; time="2024-03-12T22:54:24Z" level=info msg="Reload strategy: custom" time="2024-03-12T22:54:24Z" level=info msg="Build date: 2024-02-26T18:06:06Z" :GLOBAL.accept(0008)=0038 from [unix:1] ALPN= :GLOBAL.clicls[:] :GLOBAL.srvcls[:] :GLOBAL.closed[:] 0001:GLOBAL.accept(0008)=0039 from [unix:1] ALPN= 0001:GLOBAL.clicls[:] 0001:GLOBAL.srvcls[:] 0001:GLOBAL.closed[:] [NOTICE] (1) : haproxy version is 2.9.6-9eafce5 [NOTICE] (1) : path to executable is /usr/local/sbin/haproxy [ALERT] (1) : Current program 'api' (3) exited with code 1 (Exit) #< Why exit [ALERT] (1) : exit-on-failure: killing every processes with SIGTERM [ALERT] (1) : Current worker (4) exited with code 143 (Terminated) [WARNING] (1) : All workers exited. Exiting... (1) alex@alex-tuxedoinfinitybooks1517gen7 on 12/03/2024 at 23:54:24_CET /datadisk/container-haproxy $ ``` When I start HAProxy without the lines in the Block "program api" HAProxy is able to start. After I connect with another shell to the container and run the dataplane inside the container can I see that dataplane connects to haproxy and stops immediately. # shell 1 ``` sudo podman run -it --rm --network host --name haproxy craftcms-hap haproxy -f /data/haproxy/etc/haproxy.cfg -d Available polling systems : epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result FAILED Total: 3 (2 usable), will use epoll. Available filters : [BWLIM] bwlim-in [BWLIM] bwlim-out [CACHE] cache [COMP] compression [FCGI] fcgi-app [SPOE] spoe [TRACE] trace Using epoll() as the polling mechanism. [NOTICE] (1) : New worker (3) forked [NOTICE] (1) : Loading success. Available polling systems : epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result OK Total: 3 (3 usable), will use epoll.
Dataplane exits at haproxytech/haproxy-ubuntu:2.9 in Containers
Hi. I try to run dataplane as "random" user inside haproxy.cfg. That's the debug output of the start of the container. Even as I have set the --log-level=trace to the dataplane can't I see any reason why the api kills the process. ``` # Debug output with dataplane api alex@alex-tuxedoinfinitybooks1517gen7 on 12/03/2024 at 23:51:49_CET /datadisk/container-haproxy $ sudo buildah bud --tag craftcms-hap . STEP 1/4: FROM haproxytech/haproxy-ubuntu:2.9 STEP 2/4: COPY container-files/ / STEP 3/4: RUN set -x && mkdir -p /data/haproxy/etc /data/haproxy/run /data/haproxy/maps /data/haproxy/ssl /data/haproxy/general /data/haproxy/spoe && chown -R1001:0 /data && chmod -R g=u /data && touch /data/haproxy/etc/dataplaneapi.yaml + mkdir -p /data/haproxy/etc /data/haproxy/run /data/haproxy/maps /data/haproxy/ssl /data/haproxy/general /data/haproxy/spoe + chown -R 1001:0 /data + chmod -R g=u /data + touch /data/haproxy/etc/dataplaneapi.yaml STEP 4/4: USER 1001 COMMIT craftcms-hap Getting image source signatures Copying blob d101c9453715 skipped: already exists Copying blob 5c32e8ef5ef0 skipped: already exists Copying blob 5bbbd68c0c20 skipped: already exists Copying blob 2f5b49454406 [--] 0.0b / 0.0b Copying blob 83d27970fa5a [--] 0.0b / 0.0b Copying blob 5a567c1d5233 done Copying config 1ac0ae6824 done Writing manifest to image destination Storing signatures --> 1ac0ae6824c Successfully tagged localhost/craftcms-hap:latest 1ac0ae6824c91a9bc4fa1f19979c0b9dc672981fb82949429006d53252f8de9c alex@alex-tuxedoinfinitybooks1517gen7 on 12/03/2024 at 23:54:21_CET /datadisk/container-haproxy $ sudo podman run -it --rm --network host --name haproxy craftcms-hap haproxy -f /data/haproxy/etc/haproxy.cfg -d Available polling systems : epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result FAILED Total: 3 (2 usable), will use epoll. Available filters : [BWLIM] bwlim-in [BWLIM] bwlim-out [CACHE] cache [COMP] compression [FCGI] fcgi-app [SPOE] spoe [TRACE] trace Using epoll() as the polling mechanism. [NOTICE] (1) : New program 'api' (3) forked [NOTICE] (1) : New worker (4) forked [NOTICE] (1) : Loading success. Available polling systems : epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result OK Total: 3 (3 usable), will use epoll. Available filters : [BWLIM] bwlim-in [BWLIM] bwlim-out [CACHE] cache [COMP] compression [FCGI] fcgi-app [SPOE] spoe [TRACE] trace Using epoll() as the polling mechanism. time="2024-03-12T22:54:24Z" level=info msg="HAProxy Data Plane API v2.9.1 4d10854c" time="2024-03-12T22:54:24Z" level=info msg="Build from: https://github.com/haproxytech/dataplaneapi.git; time="2024-03-12T22:54:24Z" level=info msg="Reload strategy: custom" time="2024-03-12T22:54:24Z" level=info msg="Build date: 2024-02-26T18:06:06Z" :GLOBAL.accept(0008)=0038 from [unix:1] ALPN= :GLOBAL.clicls[:] :GLOBAL.srvcls[:] :GLOBAL.closed[:] 0001:GLOBAL.accept(0008)=0039 from [unix:1] ALPN= 0001:GLOBAL.clicls[:] 0001:GLOBAL.srvcls[:] 0001:GLOBAL.closed[:] [NOTICE] (1) : haproxy version is 2.9.6-9eafce5 [NOTICE] (1) : path to executable is /usr/local/sbin/haproxy [ALERT](1) : Current program 'api' (3) exited with code 1 (Exit) #< Why exit [ALERT](1) : exit-on-failure: killing every processes with SIGTERM [ALERT](1) : Current worker (4) exited with code 143 (Terminated) [WARNING] (1) : All workers exited. Exiting... (1) alex@alex-tuxedoinfinitybooks1517gen7 on 12/03/2024 at 23:54:24_CET /datadisk/container-haproxy $ ``` When I start HAProxy without the lines in the Block "program api" HAProxy is able to start. After I connect with another shell to the container and run the dataplane inside the container can I see that dataplane connects to haproxy and stops immediately. # shell 1 ``` sudo podman run -it --rm --network host --name haproxy craftcms-hap haproxy -f /data/haproxy/etc/haproxy.cfg -d Available polling systems : epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result FAILED Total: 3 (2 usable), will use epoll. Available filters : [BWLIM] bwlim-in [BWLIM] bwlim-out [CACHE] cache [COMP] compression [FCGI] fcgi-app [SPOE] spoe [TRACE] trace Using epoll() as the polling mechanism. [NOTICE] (1) : New worker (3) forked [NOTICE] (1) : Loading success. Available polling systems : epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result OK Total: 3 (3 usable), will use epoll. Available filters : [BWLIM] bwlim-in [BWLIM] bwlim-out [CACHE] cache [COMP] compression [FCGI] fcgi-app [SPOE] spoe [TRACE] trace Using epoll() as the polling mechanism. :GLOBAL.accept(0008)=0038 from [unix:1] ALPN=