Hello !

I ended up finding the problem. I don't know why, but I have tried to replace all the IP addresses (192.168.0.19) by localhost then 127.0.0.1 then 0.0.0.0 and finally nothing. Just ":" followed by the port.

I don't know what is the difference for the moment, but when I don't put any IP address, HAProxy now start at GNU/Linux boot.

So instead of having this :

bind 192.168.0.19:26000
        mode tcp
        default_backend all_java_srv

backend all_java_srv
        balance roundrobin
        mode tcp
        server srv_1 192.168.0.19:26001

I have now :

bind :26000
        mode tcp
        default_backend all_java_srv

backend all_java_srv
        balance roundrobin
        mode tcp
        server srv_1 :26001

I expect it may help some people to solve this problem when using only one server.

Thanks for your help.

Axel DUMAS.

Le 16/09/2020 à 18:08, Axel DUMAS a écrit :

Hello !

I am testing HAProxy on my computer and my own "Internet Service Provider" router (FreeBox).

My router is receiving TCP data on port 26000 and transmitting them to local network HAProxy, which is on my computer, is configured to listen data on port 26000 in the "Frontend" section.

Finally, the data should be transmitted to my Application using the port 26001 thanks to the "Backend" section of HAProxy.

Here is a picture which can "help" you to understand.

At the boot, HAProxy say "Starting frontend srv_java: cannot bind socket [192.168.0.19:26000]".

I think I have already solved a similar problem by starting the Application using the port 26001 by creating a service file(java-srv.service). I have a doubt with the using of Requires/Wants but it seems to work.
It was an understandable problem.

But now, I don't see how to solve this new error.
Indeed, the port 26000 doesn't rely to an application to start, but only to my router which is already running. So the port 26000 should be always available.

In addition, when I just use the command "sudo service haproxy restart", HAProxy works very well.

Maybe it's a simple problem, but I don't see solutions for the moment. Have you any idea to solve it ?

If you need more details, doesn't hesitate to ask me.

Thanks a lot for your help,
Sincerely,
Axel DUMAS.

Reply via email to