新手问答 RPC 无法外部访问

Surou · May 22, 2018 · Last by Surou replied at May 22, 2018 · 12663 hits

本机IP 192.168.1.112

C:\Users\Surou>ping 192.168.1.112

Pinging 192.168.1.112 with 32 bytes of data:
Reply from 192.168.1.112: bytes=32 time<1ms TTL=64
Reply from 192.168.1.112: bytes=32 time<1ms TTL=64
Reply from 192.168.1.112: bytes=32 time<1ms TTL=64
Reply from 192.168.1.112: bytes=32 time<1ms TTL=64
surou@surou-C-H110M-K-Pro:~/eos/build$ curl http://192.168.1.112:8888/v1/chain/get_info
curl: (7) Failed to connect to 192.168.1.112 port 8888: Connection refused
surou@surou-C-H110M-K-Pro:~/eos/build$ curl http://127.0.0.1:8888/v1/chain/get_info
{"server_version":"e4980b1e","head_block_num":5052,"last_irreversible_block_num":5051,"last_irreversible_block_id":"000013bbaa0a9384aac45a46401adace3d91e92e818e33383c8d7a0932c3b382","head_block_id":"000013bc0856076805367b4940d869f39c38880c4deb72cb3745612e6aed3e18","head_block_time":"2018-05-21T11:28:43","head_block_producer":"eosio.bp2","virtual_block_cpu_limit":"16401452492","virtual_block_net_limit":164102454,"block_cpu_limit":104857500,"block_net_limit":1048576}
surou@surou-C-H110M-K-Pro:~$ netstat -an|grep 8888
tcp        0      0 127.0.0.1:8888          0.0.0.0:*               LISTEN
surou@surou-C-H110M-K-Pro:~$ sudo ufw disable
[sudo] password for surou: 
Firewall stopped and disabled on system startup

surou@surou-C-H110M-K-Pro:~/.local/share/eosio/nodeos/config$ netstat -ntlp
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:9168          0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:8082          0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:9876            0.0.0.0:*               LISTEN      19310/nodeos    
tcp        0      0 127.0.0.1:9236          0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:8888          0.0.0.0:*               LISTEN      19310/nodeos    
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:8060            0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:9121          0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:9090          0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:9187          0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:8900          0.0.0.0:*               LISTEN      20521/keosd     
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:9100          0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:9229          0.0.0.0:*               LISTEN      -               
tcp6       0      0 :::22                   :::*                    LISTEN      -               
tcp6       0      0 ::1:631                 :::*                    LISTEN      -               
tcp6       0      0 :::25                   :::*                    LISTEN      -   

记得3.0的时候没有做任何配置,直接就是OK的,应该是不熟悉Ubuntu,麻烦同学帮忙

共收到 1 条回复

已解决

vi config.ini
http-server-address = 0.0.0.0:8888
Surou 关闭了讨论 22 May 16:58
Surou 重新开启了讨论 22 May 16:59
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up