SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.04k stars 1.23k forks source link

HAProxy failed to start DSM 6 #2712

Open jdm2017 opened 7 years ago

jdm2017 commented 7 years ago

For new Package Requests, see the guidelines

Setup

_Package Name:_HAProxy _Package Version:_1.5.14-19

_NAS Model:_DS216j _NAS Architecture:_Armada 385 _DSM version:_DSM 6.1-15047 Update 1

Expected behavior

I installed the app HAProxy and Python package as requested, but will fail to start/run. No data stored when I go to view log.

Actual behavior

Status: Stopped Error message: Failed to run the package service.

Steps to reproduce

_1._Install Python version 2.7.13-16 ( this is the one HAProxy will automatically install) 2. Install HAProxy 3. Start the service

Package log

Check Package Center or /usr/local/{package}/var/

Insert the package log here

No logs available

Other logs

E.g. /var/log/messages or /var/log/synopkg.log

No logs available

Insert log here

root@xxxx~# /var/log/synopkg.log -ash: /var/log/synopkg.log: Permission denied root@xxxx:~# /var/log/messages -ash: /var/log/messages: Permission denied

jdm2017 commented 7 years ago
capture
jdm2017 commented 7 years ago
capture
jdm2017 commented 7 years ago
capture
chigy110 commented 7 years ago

Exakt Same Problem here:

Setup

_Package Name:_HAProxy _Package Version:_1.5.14-19

_NAS Model:_DS916+ _NAS Architecture:_INTEL Pentium N3710 _DSM version:_DSM 6.1-15047 Update 2

OBenned commented 7 years ago

2661

tarzanek commented 6 years ago

some logs from synopkg :

2018/09/07 09:36:43     install haproxy 1.5.14-19 Begin postinst
Traceback (most recent call last):
  File "/usr/local/python/bin/virtualenv", line 11, in <module>
    sys.exit(main())
  File "/var/packages/python/target/lib/python2.7/site-packages/virtualenv.py", line 713, in main
    symlink=options.symlink)
  File "/var/packages/python/target/lib/python2.7/site-packages/virtualenv.py", line 945, in create_environment
    download=download,
  File "/var/packages/python/target/lib/python2.7/site-packages/virtualenv.py", line 901, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/var/packages/python/target/lib/python2.7/site-packages/virtualenv.py", line 797, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /usr/local/haproxy/env/bin/python - setuptools pip wheel failed with error code 1
Traceback (most recent call last):
  File "/usr/local/haproxy/app/setup.py", line 2, in <module>
    from application import db, direct
  File "/volume1/@appstore/haproxy/app/application/direct.py", line 3, in <module>
    from pyextdirect.configuration import (create_configuration, expose, LOAD,
ImportError: No module named pyextdirect.configuration

and later on it causes:

2018/09/07 09:37:02     (system) trigger haproxy 1.5.14-19 Begin start-stop-status start
Starting HAProxy ...
[ALERT] 249/093702 (14316) : Could not open configuration file /usr/local/haproxy/var/haproxy.cfg : No such file or directory
tarzanek commented 6 years ago
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install pyextdirect
ln -s /usr/lib/python2.7/site-packages/pyextdirect /volume1/\@appstore/python/lib/python2.7/site-packages/

after this dirty hack you can get

[ALERT] 249/100235 (15468) : Proxy 'https': no SSL certificate specified for bind ':5443' at [/usr/local/haproxy/var/haproxy.cfg:34] (use 'crt').
tarzanek commented 6 years ago
cat /usr/syno/etc/certificate/system/default/privkey.pem >> /usr/local/haproxy/var/crt/default.pem
cat /usr/syno/etc/certificate/system/default/fullchain.pem >> /usr/local/haproxy/var/crt/default.pem

got the ssl working

tarzanek commented 6 years ago

neverthless, config UI doesn't really work because:

2018-09-07T10:09:39+02:00 nas synoscgi_SYNO.Core.Package.Control_1_start[26825]: servicecfg_internal_lib.c:187 Failed to start job [pkgctl-haproxy][0xD900 manager.cpp:204]
2018-09-07T10:09:39+02:00 nas [ 7780.775455] init: pkgctl-haproxy pre-start process (27472) terminated with status 1
2018-09-07T10:09:40+02:00 nas synoscgi_SYNO.Core.Package.Control_1_start[26825]: service_initjob_action.c:27 InitJobStart failed, [0xD900 manager.cpp:204]
2018-09-07T10:09:40+02:00 nas synoscgi_SYNO.Core.Package.Control_1_start[26825]: pkgstartstop.cpp:367 Failed to start pkgctl-haproxy (err=-1) [0xD900 manager.cpp:204]
tarzanek commented 6 years ago

manual config of /usr/local/haproxy/var/haproxy.cfg works

cdalvaro commented 5 years ago

Please, add support for Synology DS918+ architecture

tarzanek commented 5 years ago

it also seems that in DSM 6.x Control Panel / Application Portal / Reverse Proxy can handle a lot of stuff that haproxy would do

kamahat commented 5 years ago

it also seems that in DSM 6.x Control Panel / Application Portal / Reverse Proxy can handle a lot of stuff that haproxy would do

Ha-proxy offer other services that just a http/s proxy : Active/Active proxy, proxy for non http protocl like MQTT