xiaoyawl / docker-shadowsocks_r

9 stars 6 forks source link

错误:shell.py:50 [Errno 101] Network unreachable #2

Open wei opened 7 years ago

wei commented 7 years ago

您好!我使用了 ReadMe 里的方式尝试了设置,手机连上无法访问任何网站 如下:

$ cat docker-compose.yml
version: '2'
services:
  shadowsocks:
    container_name: shadowsocks_server
    restart: always
    image: benyoo/shadowsocks:latest
    ports:
    - "10000:10000"
    environment:
    - MANYUSER=No
    - SERVER=0.0.0.0
    - SERVER_PORT=10000
    - PASSWORD=DockerRocks
    - OBFS=http_simple
    - PROTOCOL=verify_sha1

因为手机 app 支持的原因更改了 OBFS 和 PROTOCOL

设备环境信息:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

$ uname -a
Linux whe-Linode01 4.9.7-x86_64-linode80 #2 SMP Thu Feb 2 15:43:55 EST 2017 x86_64 x86_64 x86_64 GNU/Linux

$ docker version
Client:
 Version:      17.03.0-ce
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   60ccb22
 Built:        Thu Feb 23 11:02:43 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.0-ce
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   60ccb22
 Built:        Thu Feb 23 11:02:43 2017
 OS/Arch:      linux/amd64
 Experimental: false

$ docker info
Containers: 4
 Running: 3
 Paused: 0
 Stopped: 1
Images: 6
Server Version: 17.03.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 977c511eda0925a723debdc94d09459af49d082a
runc version: a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.7-x86_64-linode80
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 989 MiB
Name: xxxxxxxxxx
ID: GRS6:VFUU:WAD3:ZCS3:WMU4:GWBX:3OLR:BUSF:BWK5:UDBI:NMH5:GTHB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

运行 Log

$ docker-compose up
Starting shadowsocks
Attaching to shadowsocks
shadowsocks    | loaded collections.OrderedDict
shadowsocks    | INFO: loading config from user-config.json
shadowsocks    | 2017-03-22 15:29:00 INFO     util.py:85 loading libcrypto from libcrypto.so.1.0.0
shadowsocks    | 2017-03-22 15:29:00 INFO     shell.py:80 ShadowsocksR 2.9.6 2016-10-17
shadowsocks    | 2017-03-22 15:29:00 INFO     server.py:46 current process RLIMIT_NOFILE resource: soft 1048576 hard 1048576
shadowsocks    | 2017-03-22 15:29:00 INFO     asyncdns.py:324 dns server: [('127.0.0.11', 53)]
shadowsocks    | 2017-03-22 15:29:00 INFO     server.py:106 server start with protocol[verify_sha1] password [DockerRocks] method [aes-256-cfb] obfs [http_simple] obfs_param []
shadowsocks    | 2017-03-22 15:29:00 INFO     server.py:122 starting server at [::]:10000
shadowsocks    | 2017-03-22 15:29:00 INFO     server.py:142 starting server at 0.0.0.0:10000
shadowsocks    | 2017-03-22 15:29:14 INFO     tcprelay.py:500 TCP connecting facebook.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:14 ERROR    shell.py:50 [Errno 101] Network unreachable
shadowsocks    | 2017-03-22 15:29:14 ERROR    tcprelay.py:661 exception from ::ffff:50.59.208.217:54832
shadowsocks    | 2017-03-22 15:29:17 INFO     tcprelay.py:500 TCP connecting storage.googleapis.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:17 ERROR    shell.py:50 [Errno 101] Network unreachable
shadowsocks    | 2017-03-22 15:29:17 ERROR    tcprelay.py:661 exception from ::ffff:50.59.208.217:54838
shadowsocks    | 2017-03-22 15:29:18 INFO     tcprelay.py:500 TCP connecting clients1.google.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:18 ERROR    shell.py:50 [Errno 101] Network unreachable
shadowsocks    | 2017-03-22 15:29:18 ERROR    tcprelay.py:661 exception from ::ffff:50.59.208.217:54840
shadowsocks    | 2017-03-22 15:29:18 INFO     tcprelay.py:500 TCP connecting www.godaddy.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:19 INFO     tcprelay.py:500 TCP connecting ocsp.godaddy.com:80 via port 10000
shadowsocks    | 2017-03-22 15:29:19 INFO     tcprelay.py:500 TCP connecting ocsp.godaddy.com:80 via port 10000
shadowsocks    | 2017-03-22 15:29:19 INFO     tcprelay.py:500 TCP connecting www.google.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:19 ERROR    shell.py:50 [Errno 101] Network unreachable
shadowsocks    | 2017-03-22 15:29:19 ERROR    tcprelay.py:661 exception from ::ffff:50.59.208.217:54848
shadowsocks    | 2017-03-22 15:29:20 INFO     tcprelay.py:500 TCP connecting data.flurry.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:20 INFO     tcprelay.py:500 TCP connecting clients1.google.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:20 ERROR    shell.py:50 [Errno 101] Network unreachable
shadowsocks    | 2017-03-22 15:29:20 ERROR    tcprelay.py:661 exception from ::ffff:50.59.208.217:54852
shadowsocks    | 2017-03-22 15:29:20 INFO     tcprelay.py:500 TCP connecting data.flurry.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:34 INFO     tcprelay.py:500 TCP connecting slack.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:34 INFO     tcprelay.py:500 TCP connecting inbox.google.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:34 ERROR    shell.py:50 [Errno 101] Network unreachable
shadowsocks    | 2017-03-22 15:29:34 ERROR    tcprelay.py:661 exception from ::ffff:50.59.208.217:54863
shadowsocks    | 2017-03-22 15:29:34 INFO     tcprelay.py:500 TCP connecting slack.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:34 INFO     tcprelay.py:500 TCP connecting api.weather.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:54 INFO     tcprelay.py:500 TCP connecting play.googleapis.com:443 via port 10000
shadowsocks    | 2017-03-22 15:29:54 ERROR    shell.py:50 [Errno 101] Network unreachable
shadowsocks    | 2017-03-22 15:29:54 ERROR    tcprelay.py:661 exception from ::ffff:50.59.208.217:54870
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/log_printer.py", line 197, in watch_events
    for event in event_stream:
  File "/usr/local/lib/python2.7/dist-packages/compose/project.py", line 356, in events
    decode=True
  File "/usr/local/lib/python2.7/dist-packages/docker/api/client.py", line 290, in _stream_helper
    for chunk in json_stream(self._stream_helper(response, False)):
  File "/usr/local/lib/python2.7/dist-packages/docker/utils/json_stream.py", line 66, in split_buffer
    for data in stream_as_text(stream):
  File "/usr/local/lib/python2.7/dist-packages/docker/utils/json_stream.py", line 22, in stream_as_text
    for data in stream:
  File "/usr/local/lib/python2.7/dist-packages/docker/api/client.py", line 296, in _stream_helper
    data = reader.read(1)
  File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/response.py", line 324, in read
    flush_decoder = True
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/response.py", line 237, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out.

shadowsocks    | 2017-03-22 15:30:05 INFO     tcprelay.py:500 TCP connecting www.googleapis.com:443 via port 10000
shadowsocks    | 2017-03-22 15:30:05 ERROR    shell.py:50 [Errno 101] Network unreachable
shadowsocks    | 2017-03-22 15:30:05 ERROR    tcprelay.py:661 exception from ::ffff:50.59.208.217:54872
shadowsocks    | 2017-03-22 15:30:08 INFO     tcprelay.py:500 TCP connecting www.googleapis.com:443 via port 10000
shadowsocks    | 2017-03-22 15:30:08 ERROR    shell.py:50 [Errno 101] Network unreachable
shadowsocks    | 2017-03-22 15:30:08 ERROR    tcprelay.py:661 exception from ::ffff:50.59.208.217:54874
shadowsocks    | 2017-03-22 15:30:12 INFO     tcprelay.py:500 TCP connecting storage.googleapis.com:443 via port 10000
shadowsocks    | 2017-03-22 15:30:12 ERROR    shell.py:50 [Errno 101] Network unreachable
shadowsocks    | 2017-03-22 15:30:12 ERROR    tcprelay.py:661 exception from ::ffff:50.59.208.217:54878

谢谢!

GFLEE commented 7 years ago

最后怎么解决的?求解

wei commented 7 years ago

@GFLEE 换了个 :)