[GH-ISSUE #843] Starting Frps(0.20.0).../usr/bin/frps: line 48: [: 25328: binary operator expected #661

Closed
opened 2026-05-05 12:25:49 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @javamagong on GitHub (Jun 26, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/843

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
0.20.0

What operating system and processor architecture are you using (go env)?
centos7.4

Configures you used:
default

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

[root@VM_70_55_centos ~]# systemctl status frps
● frps.service - frps
   Loaded: loaded (/etc/systemd/system/frps.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Tue 2018-06-26 14:06:53 CST; 1s ago
  Process: 32270 ExecStop=/usr/bin/frps stop (code=exited, status=0/SUCCESS)
  Process: 32248 ExecStart=/usr/bin/frps start (code=exited, status=0/SUCCESS)
 Main PID: 32248 (code=exited, status=0/SUCCESS)

Jun 26 14:06:52 VM_70_55_centos frps[32248]: /usr/bin/frps: line 48: [: 25328: binary operator expected
Jun 26 14:06:53 VM_70_55_centos frps[32248]: Starting Frps(0.20.0).../usr/bin/frps: line 48: [: 25328: binary operator expected
Jun 26 14:06:53 VM_70_55_centos frps[32248]: start failed
Jun 26 14:06:53 VM_70_55_centos frps[32270]: +--------------------------------------------------+
Jun 26 14:06:53 VM_70_55_centos frps[32270]: |        Manager for Frps, Written by Clang        |
Jun 26 14:06:53 VM_70_55_centos frps[32270]: +--------------------------------------------------+
Jun 26 14:06:53 VM_70_55_centos frps[32270]: | Intro: http://koolshare.cn/thread-65379-1-1.html |
Jun 26 14:06:53 VM_70_55_centos frps[32270]: +--------------------------------------------------+
Jun 26 14:06:53 VM_70_55_centos frps[32270]: /usr/bin/frps: line 48: [: 25328: binary operator expected
Jun 26 14:06:53 VM_70_55_centos frps[32270]: Frps is not running.

Can you point out what caused this issue (optional)

#vim /usr/bin/frps
 line48 `if [ ! -z  $PID ]; then` need update ` if [ ! -z "$PID" ]; then`
Originally created by @javamagong on GitHub (Jun 26, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/843 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** 0.20.0 **What operating system and processor architecture are you using (`go env`)?** centos7.4 **Configures you used:** default **Steps to reproduce the issue:** 1. 2. 3. **Describe the results you received:** **Describe the results you expected:** **Additional information you deem important (e.g. issue happens only occasionally):** ``` [root@VM_70_55_centos ~]# systemctl status frps ● frps.service - frps Loaded: loaded (/etc/systemd/system/frps.service; enabled; vendor preset: disabled) Active: inactive (dead) since Tue 2018-06-26 14:06:53 CST; 1s ago Process: 32270 ExecStop=/usr/bin/frps stop (code=exited, status=0/SUCCESS) Process: 32248 ExecStart=/usr/bin/frps start (code=exited, status=0/SUCCESS) Main PID: 32248 (code=exited, status=0/SUCCESS) Jun 26 14:06:52 VM_70_55_centos frps[32248]: /usr/bin/frps: line 48: [: 25328: binary operator expected Jun 26 14:06:53 VM_70_55_centos frps[32248]: Starting Frps(0.20.0).../usr/bin/frps: line 48: [: 25328: binary operator expected Jun 26 14:06:53 VM_70_55_centos frps[32248]: start failed Jun 26 14:06:53 VM_70_55_centos frps[32270]: +--------------------------------------------------+ Jun 26 14:06:53 VM_70_55_centos frps[32270]: | Manager for Frps, Written by Clang | Jun 26 14:06:53 VM_70_55_centos frps[32270]: +--------------------------------------------------+ Jun 26 14:06:53 VM_70_55_centos frps[32270]: | Intro: http://koolshare.cn/thread-65379-1-1.html | Jun 26 14:06:53 VM_70_55_centos frps[32270]: +--------------------------------------------------+ Jun 26 14:06:53 VM_70_55_centos frps[32270]: /usr/bin/frps: line 48: [: 25328: binary operator expected Jun 26 14:06:53 VM_70_55_centos frps[32270]: Frps is not running. ``` **Can you point out what caused this issue (optional)** ``` #vim /usr/bin/frps line48 `if [ ! -z $PID ]; then` need update ` if [ ! -z "$PID" ]; then` ```
Author
Owner

@Geker commented on GitHub (Jul 20, 2018):

版本不对

<!-- gh-comment-id:406455547 --> @Geker commented on GitHub (Jul 20, 2018): 版本不对
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#661
No description provided.