qwj / python-proxy

HTTP/HTTP2/HTTP3/Socks4/Socks5/Shadowsocks/ShadowsocksR/SSH/Redirect/Pf TCP/UDP asynchronous tunnel proxy implemented in Python 3 asyncio.
MIT License
1.99k stars 333 forks source link

run docker failure #158

Open xinmans opened 1 year ago

xinmans commented 1 year ago

sudo docker run -d -p 7774:7771 mosajjal/pproxy:latest -l http://:7771 -r socks5://192.168.3.4:8081 -vv

error as below, what's wrong? Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 261, in _add_reader key = self._selector.get_key(fd) File "/usr/local/lib/python3.9/selectors.py", line 193, in get_key raise KeyError("{!r} is not registered".format(fileobj)) from None KeyError: "<_io.TextIOWrapper name='' mode='r' encoding='utf-8'> is not registered" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/pproxy", line 8, in sys.exit(main()) File "/usr/local/lib/python3.9/site-packages/pproxy/server.py", line 943, in main verbose.setup(loop, args) File "/usr/local/lib/python3.9/site-packages/pproxy/verbose.py", line 67, in setup loop.add_reader(sys.stdin, functools.partial(all_stat_other, args.stats)) File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 336, in add_reader self._add_reader(fd, callback, *args) File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 263, in _add_reader self._selector.register(fd, selectors.EVENT_READ, File "/usr/local/lib/python3.9/selectors.py", line 360, in register self._selector.register(key.fd, poller_events)

kng commented 1 year ago

Looked like the same for me, the solution is to add -i, like docker run -p 8080:8080 -di mosajjal/pproxy:latest -vv