HAProxy não iniciou como serviço

0

Precisou configurar e iniciar o HAproxy do usuário sem direitos do SUDO. em geral, acabou por ser feito.

/data/haproxy/haproxy -f /etc/haproxy/haproxy.cfg

stdout:

[WARNING] 198/141606 (119143) : config : 'option forwardfor' ignored for frontend 'https-in' as it requires HTTP mode.
[WARNING] 198/141606 (119143) : config : 'option forwardfor' ignored for backend 'https-servers-basic' as it requires HTTP mode.
[WARNING] 198/141606 (119143) : config : 'option forwardfor' ignored for backend 'https-servers-redirect' as it requires HTTP mode.
[WARNING] 198/141606 (119143) : config : 'option forwardfor' ignored for backend 'https-servers-service' as it requires HTTP mode.
O processo

foi iniciado corretamente:

[test@ser-app-0001 haproxy]$ ps aux | grep haproxy
test   5109  0.3  0.0  49040  5224 ?        Ss   15:37   0:00 /data/haproxy/haproxy -f /etc/haproxy/haproxy.cfg

Depois que eu quis fazer o serviço. Crie o arquivo ha.service em / etc / systemd / system

[Unit]
Description=ha.service
[Service]
Type=simple
User=test
WorkingDirectory=/data/haproxy/
ExecStart=/data/haproxy/haproxy -f /etc/haproxy/haproxy.cfg
SyslogIdentifier=ha.service-log
Restart=always
[Install]
WantedBy=multi-user.target

depois:

systemctl daemon-reload && systemctl start ha.service && systemctl status ha.service

no resultado O serviço foi iniciado e, 1-2 segundos atrás, caiu:

Jul 18 15:41:26 ser-app-0001 systemd[1]: ha.service holdoff time over, scheduling restart.
Jul 18 15:41:26 ser-app-0001 systemd[1]: Started ha.service.
Jul 18 15:41:26 ser-app-0001 systemd[1]: Starting ha.service...
Jul 18 15:41:26 ser-app-0001 ha.service-log[5871]: [WARNING] 198/154126 (5871) : config : 'option forwardfor' ignored for frontend 'https-in' as it requires HTTP mode.
Jul 18 15:41:26 ser-app-0001 ha.service-log[5871]: [WARNING] 198/154126 (5871) : config : 'option forwardfor' ignored for backend 'https-servers-basic' as it requires HTTP mode.
Jul 18 15:41:26 ser-app-0001 ha.service-log[5871]: [WARNING] 198/154126 (5871) : config : 'option forwardfor' ignored for backend 'https-servers-redirect' as it requires HTTP mode.
Jul 18 15:41:26 ser-app-0001 ha.service-log[5871]: [WARNING] 198/154126 (5871) : config : 'option forwardfor' ignored for backend 'https-servers-service' as it requires HTTP mode.
Jul 18 15:41:26 ser-app-0001 systemd[1]: ha.service holdoff time over, scheduling restart.
Jul 18 15:41:26 ser-app-0001 systemd[1]: start request repeated too quickly for ha.service
Jul 18 15:41:26 ser-app-0001 systemd[1]: Failed to start ha.service.
Jul 18 15:41:26 ser-app-0001 systemd[1]: Unit ha.service entered failed state.
Jul 18 15:41:26 ser-app-0001 systemd[1]: ha.service failed.

Como resolver esse problema?

    
por Nikolay Baranenko 18.07.2018 / 15:04

0 respostas