jhao104 / proxy_pool

Python ProxyPool for web spider
https://jhao104.github.io/proxy_pool/
MIT License
21.48k stars 5.17k forks source link

执行调度程序python proxyPool.py schedule时报错 #352

Open novazz opened 5 years ago

novazz commented 5 years ago

* __ *** __ ***** _ **** * | \ **** | \ *** | | **** * | |/ / \ _ | |/ / * | | **** * | /| // \ \ \/ /| | | || // \ / \ | | **** * | | | | | () | > < \ || || | | () | () || | * _| || _/ //_\ _ |_| _/ _/ ___/ / / * ***** /___ / ***



2019-09-19 00:28:29,082 ProxyScheduler.py[line:33] INFO start fetch proxy 2019-09-19 00:28:29,083 ProxyManager.py[line:44] INFO ProxyFetch : start 2019-09-19 00:28:29,083 ProxyManager.py[line:46] INFO ProxyFetch - freeProxy01: start 2019-09-19 00:28:29,407 ProxyManager.py[line:61] INFO ProxyFetch - freeProxy01: 218.60.8.99:3129 success 2019-09-19 00:28:29,409 ProxyManager.py[line:65] ERROR ProxyFetch - freeProxy01: error 2019-09-19 00:28:29,409 ProxyManager.py[line:66] ERROR Error 61 connecting to 127.0.0.1:8000. Connection refused. 2019-09-19 00:28:29,409 ProxyManager.py[line:46] INFO ProxyFetch - freeProxy02: start SyntaxError: Unexpected token '<' 2019-09-19 00:28:29,703 ProxyManager.py[line:46] INFO ProxyFetch - freeProxy03: start 2019-09-19 00:28:30,429 ProxyManager.py[line:61] INFO ProxyFetch - freeProxy03: 222.189.244.2:9999 success 2019-09-19 00:28:30,432 ProxyManager.py[line:65] ERROR ProxyFetch - freeProxy03: error 2019-09-19 00:28:30,432 ProxyManager.py[line:66] ERROR Error 61 connecting to 127.0.0.1:8000. Connection refused. 2019-09-19 00:28:30,432 ProxyManager.py[line:46] INFO ProxyFetch - freeProxy04: start 2019-09-19 00:28:30,667 ProxyManager.py[line:61] INFO ProxyFetch - freeProxy04: 218.60.8.99:3129 success 2019-09-19 00:28:30,668 ProxyManager.py[line:65] ERROR ProxyFetch - freeProxy04: error 2019-09-19 00:28:30,668 ProxyManager.py[line:66] ERROR Error 61 connecting to 127.0.0.1:8000. Connection refused. 2019-09-19 00:28:30,668 ProxyManager.py[line:46] INFO ProxyFetch - freeProxy05: start 2019-09-19 00:28:32,110 ProxyManager.py[line:61] INFO ProxyFetch - freeProxy05: 125.110.119.116:9000 success 2019-09-19 00:28:32,112 ProxyManager.py[line:65] ERROR ProxyFetch - freeProxy05: error 2019-09-19 00:28:32,112 ProxyManager.py[line:66] ERROR Error 61 connecting to 127.0.0.1:8000. Connection refused. 2019-09-19 00:28:32,112 ProxyManager.py[line:46] INFO ProxyFetch - freeProxy06: start HTTPSConnectionPool(host='proxy.coderbusy.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x11011e198>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)) HTTPSConnectionPool(host='proxy.coderbusy.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x11011e2b0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)) HTTPSConnectionPool(host='proxy.coderbusy.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x11011eba8>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)) HTTPSConnectionPool(host='proxy.coderbusy.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x11011e198>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)) HTTPSConnectionPool(host='proxy.coderbusy.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x11011e2b0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)) 2019-09-19 00:28:52,190 ProxyManager.py[line:65] ERROR ProxyFetch - freeProxy06: error 2019-09-19 00:28:52,190 ProxyManager.py[line:66] ERROR can only parse strings 2019-09-19 00:28:52,190 ProxyManager.py[line:46] INFO ProxyFetch - freeProxy07: start 2019-09-19 00:28:52,554 ProxyManager.py[line:61] INFO ProxyFetch - freeProxy07: 218.91.94.43:9999 success 2019-09-19 00:28:52,555 ProxyManager.py[line:65] ERROR ProxyFetch - freeProxy07: error 2019-09-19 00:28:52,555 ProxyManager.py[line:66] ERROR Error 61 connecting to 127.0.0.1:8000. Connection refused. 2019-09-19 00:28:52,556 ProxyManager.py[line:46] INFO ProxyFetch - freeProxy08: start 2019-09-19 00:28:53,171 ProxyManager.py[line:61] INFO ProxyFetch - freeProxy08: 39.137.69.10:8080 success 2019-09-19 00:28:53,171 ProxyManager.py[line:65] ERROR ProxyFetch - freeProxy08: error 2019-09-19 00:28:53,172 ProxyManager.py[line:66] ERROR Error 61 connecting to 127.0.0.1:8000. Connection refused. 2019-09-19 00:28:53,172 ProxyManager.py[line:46] INFO ProxyFetch - freeProxy09: start 2019-09-19 00:28:53,767 ProxyManager.py[line:61] INFO ProxyFetch - freeProxy09: 180.118.247.71:9000 success 2019-09-19 00:28:53,768 ProxyManager.py[line:65] ERROR ProxyFetch - freeProxy09: error 2019-09-19 00:28:53,768 ProxyManager.py[line:66] ERROR Error 61 connecting to 127.0.0.1:8000. Connection refused. 2019-09-19 00:28:53,768 ProxyScheduler.py[line:35] INFO finish fetch proxy Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/connection.py", line 538, in connect sock = self._connect() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/connection.py", line 595, in _connect raise err File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/connection.py", line 583, in _connect sock.connect(socket_address) ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "proxyPool.py", line 52, in cli() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/click/core.py", line 555, in invoke return callback(args, kwargs) File "proxyPool.py", line 38, in schedule runScheduler() File "../Schedule/ProxyScheduler.py", line 48, in runScheduler rawProxyScheduler() File "../Schedule/ProxyScheduler.py", line 40, in rawProxyScheduler doRawProxyCheck() File "../Schedule/RawProxyCheck.py", line 65, in doRawProxyCheck for _proxy in pm.db.getAll(): File "../DB/DbClient.py", line 102, in getAll return self.client.getAll() File "/Users/zz/python/weapons/proxy_pool-master/DB/SsdbClient.py", line 109, in getAll item_dict = self.__conn.hgetall(self.name) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/client.py", line 2717, in hgetall return self.execute_command('HGETALL', name) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/client.py", line 836, in execute_command conn = self.connection or pool.get_connection(command_name, options) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/connection.py", line 1222, in get_connection connection.connect() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/connection.py", line 543, in connect raise ConnectionError(self._error_message(e)) redis.exceptions.ConnectionError: Error 61 connecting to 127.0.0.1:8000. Connection refused.

jhao104 commented 5 years ago

数据库配错了连不上