Shadowsocks-libev: brew services not start when the config file contains obfs settings

Created on 8 Aug 2017  ·  3Comments  ·  Source: shadowsocks/shadowsocks-libev

What version of shadowsocks-libev are you using?

shadowsocks-libev: stable 3.0.8 (bottled)

What operating system are you using?

macOS 10.12.6

What did you do?

brew services start shadowsocks-libev

What did you expect to see?

shadowsocks-libev listened on the local port

What did you see instead?

there's no local port opened

What is your config in detail (with all sensitive info masked)?

{
"server":"xxx",
"server_port":443,
"local_port":8964,
"password":"xxx",
"timeout":600,
"method":"chacha20-ietf-poly1305",
"plugin":"obfs-local",
"plugin_opts":"obfs=tls;obfs-host=www.bing.com"
}

not a bug

Most helpful comment

I tried using Supervisor(in macOS) to run with command:

[program:sslibev]
command=/usr/local/bin/ss-local -c /Users/user/Dropbox/supervisord/confs/sslibev-client.json --plugin "/usr/local/bin/obfs-local" --plugin-opts "obfs=http;obfs-host=bing.com"

it worked properly

maybe you can modify brew service plist file with absolute path for obfs-local?

All 3 comments

BTW,everything is ok when start in the terminal:

/usr/local/opt/shadowsocks-libev/bin/ss-local -c /usr/local/etc/shadowsocks-libev.json
2017-08-08 10:04:15 INFO: plugin "obfs-local" enabled
2017-08-08 10:04:15 INFO: initializing ciphers... chacha20-ietf-poly1305
2017-08-08 10:04:15 INFO: listening at 127.0.0.1:8964
2017-08-08 10:04:15 [simple-obfs] INFO: obfuscating enabled
2017-08-08 10:04:15 [simple-obfs] INFO: obfuscating hostname: www.bing.com
2017-08-08 10:04:16 [simple-obfs] INFO: tcp port reuse enabled
2017-08-08 10:04:16 [simple-obfs] INFO: listening at 127.0.0.1:59510

I tried using Supervisor(in macOS) to run with command:

[program:sslibev]
command=/usr/local/bin/ss-local -c /Users/user/Dropbox/supervisord/confs/sslibev-client.json --plugin "/usr/local/bin/obfs-local" --plugin-opts "obfs=http;obfs-host=bing.com"

it worked properly

maybe you can modify brew service plist file with absolute path for obfs-local?

Thx @dongdongdu.
And maybe I found the reason base on the config the supervisor.

When I use supervisor like these:
[program:shadowsocks-libev]
command=/usr/local/bin/ss-local -c /usr/local/etc/shadowsocks-libev.json
autostart = true
autorestart = true
stdout_logfile=/usr/local/var/log/shadowsocks-libev.log
stderr_logfile=/usr/local/var/log/shadowsocks-libev.log

It fails.I notice the log:
sh: line 0: exec: obfs-local: not found

IT MEANS SUPERVISOR DOES NOT ADD /usr/local/bin TO IT'S PATH

So I add path env to config file like these:
[program:shadowsocks-libev]
command=/usr/local/bin/ss-local -c /usr/local/etc/shadowsocks-libev.json
autostart = true
autorestart = true
stdout_logfile=/usr/local/var/log/shadowsocks-libev.log
stderr_logfile=/usr/local/var/log/shadowsocks-libev.log
environment=PATH=/usr/local/bin:%(ENV_PATH)s

It works.

SO,MAYBE LAUNCHCTL DOES NOT ADD /usr/local/bin TO IT'S PATH,THAT'S THE REASON

Was this page helpful?
0 / 5 - 0 ratings