Replies: 2 comments 2 replies
-
onionj@j1900:/opt/ServerStatus/client$ sudo ./stat_client --addr [xxxxxxx]:9394 --user j1900 --pass j1900 --ip-source ip.sb --ipv6 这样子就不报错了,但是服务器上看不到,也没有其他输出,比如日志 |
Beta Was this translation helpful? Give feedback.
-
终于跑起来了sudo ./stat_client -a "grpc://[xxxx]:9394/report" -u j1900 -p j1900 --ip-source ip.sb --ipv6 sys id: xxxx |
Beta Was this translation helpful? Give feedback.
-
作者你好,我的小服务器(1900)开启的ipv6,没有ipv4,用脚本安装stat_client,在输入server的ip和账户之后就卡住不动了,手动运行的报错是
root@j1900:/opt/ServerStatus/client# ./stat_client -a "grpc://[ipv6addr]:9394" -u user -p passwd
sys id: xxxxxxxxxxxxxxxxxxxxxxxxx
sys info: {"name":"j1900","version":"1.7.2","os_name":"linux","os_arch":"x86_64","os_family":"unix","os_release":"Linux 20.04 Ubuntu","kernel_version":"5.4.0-150-generic","cpu_num":4,"cpu_brand":"Intel(R) Celeron(R) CPU J1900 @ 1.99GHz","cpu_vender_id":"GenuineIntel","host_name":"j1900"}
feature native enabled
get_network (ipv4, ipv6) => (false, true)
ERROR stat_client > refresh_ip_info error => error decoding response body: expected value at line 1 column 1
Caused by:
expected value at line 1 column 1
ERROR stat_client > refresh_ip_info error => error decoding response body: expected value at line 1 column 1
Caused by:
expected value at line 1 column 1
不晓得为啥,在1900 curl [ipv6addr]:9394,返回的是curl: (1) Received HTTP/0.9 when not allowed,晓得了,是因为grpc服务器。
用python3,执行stat_client.py,也是报错,给出的报错太多了,截了一小段
Traceback (most recent call last):
File "stat_client.py", line 395, in http_report
r = sess.post(options.addr, auth=auth,
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 583, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 535, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 648, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
^CTraceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 277, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
这个Connection reset by peer,我测试了从1900到服务器,ipv6是通的。
我找了个把小时也找不出来为啥,请大佬给看看吧
另外,[cppla]ServerStatus版本的serverstatus,我的这个1900是可以正常运行的,但是另几个没法运行😱,在你这个里就是1900这一个没法运行...
在调试nginx反代,又整出来一个新的报错
root@j1900:/opt/ServerStatus/client# ./stat_client -6 -a "grpc://[ipv6addr]:9394/report" -u user -p passwd
get_network (ipv4, ipv6) => (true, true)
ERROR stat_client > refresh_ip_info error => error sending request for url (https://ip.zdz.workers.dev/): error trying to connect: operation timed out
Caused by:
0: error trying to connect: operation timed out
1: operation timed out
ERROR stat_client > refresh_ip_info error => error sending request for url (https://ip.zdz.workers.dev/): error trying to connect: operation timed out
Caused by:
0: error trying to connect: operation timed out
1: operation timed out
在1900 curl https://ip.zdz.workers.dev/ 半天没反应,不晓得是不是这个原因,源代码里找到了这个网址,上面还有个注释掉的,curl也是没反应,但是我用的https://api.ipgeolocation.io/ 这个就可以
Beta Was this translation helpful? Give feedback.
All reactions