Frp cannot be used under ubuntu, how to troubleshoot and find the problem?

< H1 > problem description < / H1 >

try to build a frp server under ubuntu. No error was reported when the software started, and the connection failed when the error occurred.

< H2 > Environmental parameters < / H2 >
  • system platform: aliyun ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-117-generic x86ip64)
  • frp version: frp_0.20.0_linux_amd64
  • Security group policy: open all ports
  • oneinstack deploys nginx, and uses its script to generate a https protocol vhost, for running the main web service
< H2 > related configuration < / H2 >

* is a placeholder

frps.ini

[common]
bind_addr = 127.0.0.1
bind_port = 7000
vhost_http_port = 9000

token = frp_matrix

dashboard_port = 7500
dashboard_user = frp_admin
dashboard_pwd = frp_2018100800

frpc.ini

[common]
server_addr = 112.*.*.71
server_port = 7000
token = frp_matrix

[web]
type = http
local_port = 8500
custom_domains = frp.***.me
< H2 > related commands and information < / H2 >

server

-sharp ./frps -c frps.ini

2018/08/10 14:05:39 [I] [service.go:128] frps tcp listen on 127.0.0.1:7000
2018/08/10 14:05:39 [I] [service.go:161] http service listen on 127.0.0.1:9000
2018/08/10 14:05:39 [I] [service.go:205] Dashboard listen on 127.0.0.1:7500
2018/08/10 14:05:39 [I] [root.go:190] Start frps success
// 

client

$ ./frpc -c frpc.ini

2018/08/10 14:03:53 [I] [proxy_manager.go:300] proxy removed: []
2018/08/10 14:03:53 [I] [proxy_manager.go:310] proxy added: [web]
2018/08/10 14:03:53 [I] [proxy_manager.go:333] visitor removed: []
2018/08/10 14:03:53 [I] [proxy_manager.go:342] visitor added: []
2018/08/10 14:03:53 [W] [control.go:113] login to server failed: dial tcp 112.74.106.71:7000: connect: connection refused
dial tcp 112.74.106.71:7000: connect: connection refused
< H2 > check done < / H2 >

check through netstat command, but do not see 7000 port

Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp        0      0 *:https                 *:*                     LISTEN
tcp        0      0 localhost:8000          *:*                     LISTEN
tcp        0      0 localhost:8006          *:*                     LISTEN
tcp        0      0 localhost:9000          *:*                     LISTEN
tcp        0      0 *:mysql                 *:*                     LISTEN
tcp        0      0 localhost:7500          *:*                     LISTEN
tcp        0      0 *:http                  *:*                     LISTEN
tcp        0      0 *:http-alt              *:*                     LISTEN
tcp        0      0 172.18.140.9:15609      106.11.248.51:http      ESTABLISHED
tcp        0      0 172.18.140.9:ssh        220.249.22.170:60318    ESTABLISHED
udp        0      0 172.18.140.9:ntp        *:*
udp        0      0 localhost:ntp           *:*
udp        0      0 *:ntp                   *:*
udp6       0      0 [::]:ntp                [::]:*
Apr.09,2021

Delete the configuration of bind_addr = 127.0.0.1 in frps.ini


for system reasons, reinstall the Aliyun system and reinstall it

Menu