[GH-ISSUE #3731] Exit code should be non-zero when due to errors #2968

Closed
opened 2026-05-05 13:55:03 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @riaqn on GitHub (Oct 30, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3731

Bug Description

Log:

Oct 30 07:11:29 darkbox systemd[1]: Started Frp Client Service.
Oct 30 07:11:29 darkbox frpc[142]: 2023/10/30 07:11:29 [I] [root.go:220] start frpc service for config file [/etc/frp/frpc.ini]
Oct 30 07:11:36 darkbox frpc[142]: 2023/10/30 07:11:36 [W] [service.go:133] login to server failed: dial tcp: lookup scaleway.riaqn.org on 127.0.0.53:53: server misbehaving
Oct 30 07:11:36 darkbox frpc[142]: 2023/10/30 07:11:36 [I] [root.go:236] frpc service for config file [/etc/frp/frpc.ini] stopped
Oct 30 07:11:36 darkbox systemd[1]: frpc.service: Deactivated successfully.```

Output of systemctl status frpc.service:

   Main PID: 142 (code=exited, status=0/SUCCESS)

Exit code of the process should not be zero when due to errors. In particular, the restart mechanism of systemd relies on the exit code of frpc to decide if to restart. Sure, I can set Restart=always to restart even if exit code is zero, but this needs to be fixed.

frpc Version

0.51.3

frps Version

0.51.3

System Architecture

linux/amd64

Configurations

Doesn't matter.

Logs

No response

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @riaqn on GitHub (Oct 30, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3731 ### Bug Description Log: ``` Oct 30 07:11:29 darkbox systemd[1]: Started Frp Client Service. Oct 30 07:11:29 darkbox frpc[142]: 2023/10/30 07:11:29 [I] [root.go:220] start frpc service for config file [/etc/frp/frpc.ini] Oct 30 07:11:36 darkbox frpc[142]: 2023/10/30 07:11:36 [W] [service.go:133] login to server failed: dial tcp: lookup scaleway.riaqn.org on 127.0.0.53:53: server misbehaving Oct 30 07:11:36 darkbox frpc[142]: 2023/10/30 07:11:36 [I] [root.go:236] frpc service for config file [/etc/frp/frpc.ini] stopped Oct 30 07:11:36 darkbox systemd[1]: frpc.service: Deactivated successfully.``` ``` Output of `systemctl status frpc.service`: ``` Main PID: 142 (code=exited, status=0/SUCCESS) ``` Exit code of the process should not be zero when due to errors. In particular, the restart mechanism of `systemd` relies on the exit code of frpc to decide if to restart. Sure, I can set `Restart=always` to restart even if exit code is zero, but this needs to be fixed. ### frpc Version 0.51.3 ### frps Version 0.51.3 ### System Architecture linux/amd64 ### Configurations Doesn't matter. ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:55:03 -06:00
  • closed this issue
  • added the
    todo
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2968
No description provided.