[GH-ISSUE #1072] on centos7, the loading frpc will stop the mariadb starting. #842

Closed
opened 2026-05-05 12:32:13 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @michaelhsucn on GitHub (Feb 1, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1072

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.23.2

What operating system and processor architecture are you using (go env)?
Centos7 amd64

Configures you used:
[common]
server_addr = xxx.xxx.xxx
server_port = 5443
token = xxxxxxxxxxxxxxxxxxxxx
login_fail_exit = false
log_file = /dev/null
log_level = info
log_max_days = 3
tcp_mux = true
protocol = kcp

[test]
type = http
local_ip = 127.0.0.1
local_port = 80
use_encryption = false
use_compression = true
subdomain = test

Steps to reproduce the issue:

  1. configure a mariadb running it on the centos7, it works fine and after rebooting it also works fine.
  2. setup a frpc.service for auto start on centos, and it works fine.
  3. reboot the centos7 or try to reboot the mariadb, you will see it can not be started.

Describe the results you received:
systemctl start mariadb.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.

Describe the results you expected:

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

Can you point out what caused this issue (optional)

Originally created by @michaelhsucn on GitHub (Feb 1, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1072 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.23.2 **What operating system and processor architecture are you using (`go env`)?** Centos7 amd64 **Configures you used:** [common] server_addr = xxx.xxx.xxx server_port = 5443 token = xxxxxxxxxxxxxxxxxxxxx login_fail_exit = false log_file = /dev/null log_level = info log_max_days = 3 tcp_mux = true protocol = kcp [test] type = http local_ip = 127.0.0.1 local_port = 80 use_encryption = false use_compression = true subdomain = test **Steps to reproduce the issue:** 1. configure a mariadb running it on the centos7, it works fine and after rebooting it also works fine. 2. setup a frpc.service for auto start on centos, and it works fine. 3. reboot the centos7 or try to reboot the mariadb, you will see it can not be started. **Describe the results you received:** systemctl start mariadb.service Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details. **Describe the results you expected:** **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)**
Author
Owner

@fatedier commented on GitHub (Feb 1, 2019):

You need to provide:

  1. frpc.service configure file.
  2. systemctl status mariadb.service info.

Try to solve your problem by yourself first until you are sure it's a bug.

<!-- gh-comment-id:459643493 --> @fatedier commented on GitHub (Feb 1, 2019): You need to provide: 1. frpc.service configure file. 2. systemctl status mariadb.service info. Try to solve your problem by yourself first until you are sure it's a bug.
Author
Owner

@michaelhsucn commented on GitHub (Feb 1, 2019):

Thanks for the quick response, I did try bunch of times, but I failed,
disable the frpc.service, and reboot the Centos and it works all fine.

I am not with computer at this moment, I'll provide those info a bit later
when I can access to my computer.

Regards
Michael

On Fri, Feb 1, 2019, 4:22 PM fatedier <notifications@github.com wrote:

You need to provide:

  1. frpc.service configure file.
  2. systemctl status mariadb.service info.

Try to solve your problem by yourself first until you are sure it's a bug.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fatedier/frp/issues/1072#issuecomment-459643493, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AcrAN2I4sinrDVHNyaVZyGddpY4rw-HOks5vI_ljgaJpZM4ad105
.

<!-- gh-comment-id:459645326 --> @michaelhsucn commented on GitHub (Feb 1, 2019): Thanks for the quick response, I did try bunch of times, but I failed, disable the frpc.service, and reboot the Centos and it works all fine. I am not with computer at this moment, I'll provide those info a bit later when I can access to my computer. Regards Michael On Fri, Feb 1, 2019, 4:22 PM fatedier <notifications@github.com wrote: > You need to provide: > > 1. frpc.service configure file. > 2. systemctl status mariadb.service info. > > Try to solve your problem by yourself first until you are sure it's a bug. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/fatedier/frp/issues/1072#issuecomment-459643493>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AcrAN2I4sinrDVHNyaVZyGddpY4rw-HOks5vI_ljgaJpZM4ad105> > . >
Author
Owner

@michaelhsucn commented on GitHub (Feb 1, 2019):

  1. frpc.service configure file.
    [Unit]
    Description=frpc daemon
    After=syslog.target network.target
    Wants=network.target

[Service]
Type=simple
ExecStart=/usr/sbin/frp/frpc -c /etc/frp/frpc.ini
Restart= always
RestartSec=1min
ExecStop=/usr/bin/killall frpc

[Install]
WantedBy=multi-user.target

  1. systemctl status mariadb.service info.
    [root@localhost ~]# systemctl status mariadb.service
    ● mariadb.service - MariaDB database server
    Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor pres et: disabled)
    Active: failed (Result: exit-code) since Fri 2019-02-01 19:22:21 HKT; 14s ago
    Process: 6343 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exi ted, status=1/FAILURE)
    Process: 6342 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, stat us=1/FAILURE)
    Process: 6311 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited , status=0/SUCCESS)
    Main PID: 6342 (code=exited, status=1/FAILURE)

Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe...
Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe...
Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: 190201 19:22:21 mysq...
Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe...
Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe...
Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service: main proce...
Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service: control pr...
Feb 01 19:22:21 localhost.localdomain systemd[1]: Failed to start MariaDB dat...
Feb 01 19:22:21 localhost.localdomain systemd[1]: Unit mariadb.service entere...
Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

<!-- gh-comment-id:459691922 --> @michaelhsucn commented on GitHub (Feb 1, 2019): 1. frpc.service configure file. [Unit] Description=frpc daemon After=syslog.target network.target Wants=network.target [Service] Type=simple ExecStart=/usr/sbin/frp/frpc -c /etc/frp/frpc.ini Restart= always RestartSec=1min ExecStop=/usr/bin/killall frpc [Install] WantedBy=multi-user.target 2. systemctl status mariadb.service info. [root@localhost ~]# systemctl status mariadb.service ● mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor pres et: disabled) Active: failed (Result: exit-code) since Fri 2019-02-01 19:22:21 HKT; 14s ago Process: 6343 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exi ted, status=1/FAILURE) Process: 6342 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, stat us=1/FAILURE) Process: 6311 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited , status=0/SUCCESS) Main PID: 6342 (code=exited, status=1/FAILURE) Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe... Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe... Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: 190201 19:22:21 mysq... Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe... Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe... Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service: main proce... Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service: control pr... Feb 01 19:22:21 localhost.localdomain systemd[1]: Failed to start MariaDB dat... Feb 01 19:22:21 localhost.localdomain systemd[1]: Unit mariadb.service entere... Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service failed. Hint: Some lines were ellipsized, use -l to show in full.
Author
Owner

@fatedier commented on GitHub (Feb 1, 2019):

Paste complete logs? You should check why your mysql start failed.

<!-- gh-comment-id:459694631 --> @fatedier commented on GitHub (Feb 1, 2019): Paste complete logs? You should check why your mysql start failed.
Author
Owner

@michaelhsucn commented on GitHub (Feb 1, 2019):

[root@localhost ~]# systemctl status -l mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor pres et: disabled)
Active: failed (Result: exit-code) since Fri 2019-02-01 19:22:21 HKT; 18min a go
Process: 6343 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exi ted, status=1/FAILURE)
Process: 6342 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, stat us=1/FAILURE)
Process: 6311 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited , status=0/SUCCESS)
Main PID: 6342 (code=exited, status=1/FAILURE)

Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe: l ine 696: /dev/null: Permission denied
Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe: l ine 727: /dev/null: Permission denied
Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: 190201 19:22:21 mysqld_ safe Starting mysqld daemon with databases from /var/lib/mysql
Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe: l ine 867: /dev/null: Permission denied
Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe: l ine 871: /dev/null: Permission denied
Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service: control proce ss exited, code=exited status=1
Feb 01 19:22:21 localhost.localdomain systemd[1]: Failed to start MariaDB databa se server.
Feb 01 19:22:21 localhost.localdomain systemd[1]: Unit mariadb.service entered f ailed state.
Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service failed.

<!-- gh-comment-id:459696489 --> @michaelhsucn commented on GitHub (Feb 1, 2019): [root@localhost ~]# systemctl status -l mariadb.service ● mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor pres et: disabled) Active: failed (Result: exit-code) since Fri 2019-02-01 19:22:21 HKT; 18min a go Process: 6343 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exi ted, status=1/FAILURE) Process: 6342 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, stat us=1/FAILURE) Process: 6311 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited , status=0/SUCCESS) Main PID: 6342 (code=exited, status=1/FAILURE) Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe: l ine 696: /dev/null: Permission denied Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe: l ine 727: /dev/null: Permission denied Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: 190201 19:22:21 mysqld_ safe Starting mysqld daemon with databases from /var/lib/mysql Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe: l ine 867: /dev/null: Permission denied Feb 01 19:22:21 localhost.localdomain mysqld_safe[6342]: /usr/bin/mysqld_safe: l ine 871: /dev/null: Permission denied Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service: control proce ss exited, code=exited status=1 Feb 01 19:22:21 localhost.localdomain systemd[1]: Failed to start MariaDB databa se server. Feb 01 19:22:21 localhost.localdomain systemd[1]: Unit mariadb.service entered f ailed state. Feb 01 19:22:21 localhost.localdomain systemd[1]: mariadb.service failed.
Author
Owner

@fatedier commented on GitHub (Feb 1, 2019):

The error info is Permission denied with /dev/null, it's not a bug about frp.

You can google for it to find more information.

From my point of view, don't set log_file = /dev/null, it's not good. Just let that param empty and run frpc -c ./frpc.ini > /dev/null instead.

<!-- gh-comment-id:459765566 --> @fatedier commented on GitHub (Feb 1, 2019): The error info is `Permission denied` with `/dev/null`, it's not a bug about frp. You can google for it to find more information. From my point of view, don't set `log_file = /dev/null`, it's not good. Just let that param empty and run `frpc -c ./frpc.ini > /dev/null` instead.
Author
Owner

@michaelhsucn commented on GitHub (Feb 1, 2019):

Let me try, Really Appreciate, Thumbs UP!

<!-- gh-comment-id:459792405 --> @michaelhsucn commented on GitHub (Feb 1, 2019): Let me try, Really Appreciate, Thumbs UP!
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#842
No description provided.