dlundquist / sniproxy

Proxies incoming HTTP and TLS connections based on the hostname contained in the initial request of the TCP session.
BSD 2-Clause "Simplified" License
2.55k stars 397 forks source link

Installed it on OVZ VPS but unable to start sniproxy process #254

Open hanxu12 opened 7 years ago

hanxu12 commented 7 years ago

Environment: Ubuntu 14.04 X64( 2.6.32-042stab117.14 ), OVZ VPS I installed sniproxy via the ppa repo (i.e. add-apt-repository ppa:dlundquist/sniproxy) I tried to below commands but still failed to run it. 1.

root@test:~# /etc/init.d/sniproxy start
root@test:~# /etc/init.d/sniproxy status
 * sniproxy is not running

2.

root@test:~# sniproxy               
root@test:~# service sniproxy status
 * sniproxy is not running

3.

root@test:~# sniproxy -f
root@test:~# service sniproxy status
 * sniproxy is not running

On some other OVZ and KVM VPS, I had success installing and starting sniproxy , so I assume the Ubuntu 14.04 template provided by the vendor is a little bit different. However, I feel that, in this case, sniproxy has been successfully installed but simply not linked properly. (xxx sniproxy status is working , but xxx sniproxy start is failing) May I know if there is any method to fix this issue? Or any attempt I may try to start sniproxy in this case?

Thank you in advance!

dlundquist commented 7 years ago

Can you verify the sniproxy process is indeed not running, and this isn't an init system issue? Anything in the logs? Also, could you run sniproxy under strace so we can see where this is failing strace -f sniproxy -f. I haven't updated that PPA in quite some time since the dependencies are now available in recent releases. I would suggest building the a deb from the master branch. If you could please report on the current version before trying the new version it would help others who run into similar problems.

Thank you,

-Dustin

hanxu12 commented 7 years ago

Hi, Dustin, 1. Yes, actually I doubled check via netstat:

root@test:~# sniproxy
root@test:~# service sniproxy status
 * sniproxy is not running
root@test:~# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      441/sshd        
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      568/master      
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      651/apache2     
tcp6       0      0 :::22                   :::*                    LISTEN      441/sshd        
tcp6       0      0 :::25                   :::*                    LISTEN      568/master      
root@test:~# 

2. I have attached the strace report on pastebin since it is too lengthy: https://pastebin.com/GgYXBjbb

  1. The sniproxy version I am installing is 0.4.0. I am certain this ppa and this version should work fine on most machines since I have already used this ppa repo to install on other VPS and all of them are running flawlessly.
    root@test:~# sniproxy -V
    sniproxy 0.4.0+git.1.g434747d

Thank you in advance!

Han

oakaigh commented 6 years ago

Adding

user root
group root

to sniproxy.conf and

type = forking

to sniproxy.service might be a solution.