• ss5 重启后报错


    [root@app2 ~]# service ss5 status
    /etc/init.d/ss5: line 18: [: =: unary operator expected
    ● ss5.service - SYSV: This script takes care of starting and stopping ss5
    Loaded: loaded (/etc/rc.d/init.d/ss5; bad; vendor preset: disabled)
    Active: active (exited) since Wed 2022-04-06 01:58:39 EDT; 4min 16s ago
    Docs: man:systemd-sysv-generator(8)
    Process: 7984 ExecStart=/etc/rc.d/init.d/ss5 start (code=exited, status=0/SUCCESS)

    Apr 06 01:58:39 app2 systemd[1]: Starting SYSV: This script takes care of starting and stopping ss5...
    Apr 06 01:58:39 app2 ss5[7984]: /etc/rc.d/init.d/ss5: line 18: [: =: unary operator expected
    Apr 06 01:58:39 app2 ss5[7984]: [67B blob data]
    Apr 06 01:58:39 app2 ss5[7984]: Can't unlink pid file /var/run/ss5/ss5.pid
    Apr 06 01:58:39 app2 ss5[7984]: done
    Apr 06 01:58:39 app2 systemd[1]: Started SYSV: This script takes care of starting and stopping ss5.

    我找到问题所在了,是因为ss5的pid文件导致的,默认路径位于/var/run/ss5/ss5.pid。但某些vps在重启后这个目录无缘无故消失了。每次重启系统都需要重建这个目录:/var/run/ss5。

    解决方法就是:

    修改pid路径。

    修改方法:在文件/etc/sysconfig/ss5修改参数,指定pid路径。

    修改配置后文件内容如下:

    # Add startup option here

    #SS5_OPTS=" -u root"

    SS5_OPTS=" -p /var/run/ss5.pid"

  • 相关阅读:
    webpack 报错(Cannot find moudle ‘webpack-cliinconfig-yargs‘)
    js图片压缩推荐
    Object.assign()更新对象
    poj 2063完全背包
    poj 3592 缩点+SPFA
    hdu2546 01背包 重学背包
    hdu 2503 1713 1108 最小公倍数&最大公约数
    poj3249 拓扑排序+DP
    poj2914无向图的最小割模板
    poj2942(双联通分量,交叉染色判二分图)
  • 原文地址:https://www.cnblogs.com/lambertwe/p/16106237.html
Copyright © 2020-2023  润新知