ubuntu 上的 Stunnel 无法监听端口

ubuntu 上的 Stunnel 无法监听端口

我已经在我的 16.04 ubuntu 上安装了 stunnel4,但我无法从通过 netstat -tulnp | grep 4444 设置的特定端口中获得任何结果,这是我的服务状态:

    stunnel4.service - LSB: Start or stop stunnel 4.x (SSL tunnel for network daemons)
   Loaded: loaded (/etc/init.d/stunnel4; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2017-02-22 22:16:54 CET; 4s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2397 ExecStart=/etc/init.d/stunnel4 start (code=exited, status=1/FAILURE)

Feb 22 22:16:54 Hypothesis stunnel4[2397]: [!] Cannot open log file: /var/log/stunnel14/stunnel.log
Feb 22 22:16:54 Hypothesis stunnel4[2397]: [ ] Closing service [squid]
Feb 22 22:16:54 Hypothesis stunnel4[2397]: [ ] Service [squid] closed (FD=7)
Feb 22 22:16:54 Hypothesis stunnel4[2397]: [ ] Service [squid] closed
Feb 22 22:16:54 Hypothesis stunnel4[2397]: failed
Feb 22 22:16:54 Hypothesis stunnel4[2397]: You should check that you have specified the pid= in you configurat
Feb 22 22:16:54 Hypothesis systemd[1]: stunnel4.service: Control process exited, code=exited status=1
Feb 22 22:16:54 Hypothesis systemd[1]: Failed to start LSB: Start or stop stunnel 4.x (SSL tunnel for network
Feb 22 22:16:54 Hypothesis systemd[1]: stunnel4.service: Unit entered failed state.
Feb 22 22:16:54 Hypothesis systemd[1]: stunnel4.service: Failed with result 'exit-code'.

我的配置文件:

cert = /etc/stunnel/stunnel.pem
pid = /var/run/stunnel.pid
setuid = root
setgid = root
output = /var/log/stunnel14/stunnel.log
[squid]
accept = 4444
connect = 127.0.0.1:54321

我的 stunnel.pid 存在于相应的文件夹中,但我收到了错误消息,除此之外,在日志中看到 stunnel 正试图关闭 squid,这对我来说似乎很奇怪

如何克服这些错误?

相关内容