给家里的ubuntu做了内网穿透,自启动frpc却出现了问题
frpc.service内容:
[Unit]
Description=frpc service
After=network.target syslog.target
Wants=network.target
[Service]
Type=simple
ExecStart=/root/frp/frpc -c /root/frp/frpc.ini
[Install]
WantedBy=multi-user.target
systemctl start frpc
、systemctl enable frpc
都成功了,重启后frpc服务并没有启动
root@oyal-desktop:~# systemctl status frpc
● frpc.service - frpc service
Loaded: loaded (/lib/systemd/system/frpc.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-09-04 12:25:31 CST; 1min 58s ago
Process: 673 ExecStart=/root/frp/frpc -c /root/frp/frpc.ini (code=exited, status=1/FAILURE)
Main PID: 673 (code=exited, status=1/FAILURE)
9月 04 12:25:30 oyal-desktop systemd[1]: Started frapc service.
9月 04 12:25:31 oyal-desktop frpc[673]: 2021/09/04 12:25:31 [W] [service.go:104] login to server failed: dial tcp 101.34.125.113:7000: connect: network is unreachable
9月 04 12:25:31 oyal-desktop frpc[673]: dial tcp 101.34.125.113:7000: connect: network is unreachable
9月 04 12:25:31 oyal-desktop systemd[1]: frpc.service: Main process exited, code=exited, status=1/FAILURE
9月 04 12:25:31 oyal-desktop systemd[1]: frpc.service: Failed with result 'exit-code'.
同样的脚本我在虚拟机里用的centos可以自启动,ubuntu不太清楚哪里的问题,有大佬解惑吗?
你在这台机器上 telnet 看一下 101.34.125.113:7000 是通的吗?