joe-at-startupmedia / pmon3

Golang Production Process Manager
10 stars 0 forks source link

after packaging and installing pmon, the following error is reported when executing a process in centos7 #16

Closed BleethNie closed 6 months ago

BleethNie commented 6 months ago

(base) [root@node bin]# pmon3 exec ./start.sh FATA could not initialize sender: Could not create message queue /dev/mqueue/pmon3_mq_rqst: no such file or directory (base) [root@node bin]# touch /dev/mqueue/pmon3_mq_rqst (base) [root@node bin]# pmon3 exec ./start.sh FATA could not initialize sender: Could not create message queue /dev/mqueue/pmon3_mq_resp: no such file or directory (base) [root@node bin]# touch /dev/mqueue/pmon3_mq_rqsp (base) [root@node bin]# pmon3 exec ./start.sh FATA could not initialize sender: Could not create message queue /dev/mqueue/pmon3_mq_resp: no such file or directory (base) [root@node bin]# touch /dev/mqueue/pmon3_mq_resp (base) [root@node bin]# pmon3 exec ./start.sh FATA connection timed out (base) [root@node bin]#

pmond的状态: image

joe-at-startupmedia commented 6 months ago

Looks related to posix_mq which I'm working on replacing with a native implementation (see #15). In the meantime I also run pmon3 on a CentOS7 machine with no issues. Here are some things you can try: 1) Ensure the /dev/mqueue/ directory exists. It should be created automatically but if not you can create it yourself using the following commands (I've never had to do this):

mkdir /dev/mqueue
mount -t mqueue none /dev/mqueue

per https://linux.die.net/man/7/mq_overview

2) If it already exists provide the output of /dev/mqueue using the following:

[root@startup-production-web ~]# ls -al /dev/mqueue/
total 0
drwxrwxrwt  2 root root   80 Jan 15 02:36 .
drwxr-xr-x 18 root root 2920 Nov 23 15:30 ..
-rw-rw-rw-  1 root root   80 Apr  2 20:34 pmon3_mq_resp
-rw-rw-rw-  1 root root   80 Apr  2 20:34 pmon3_mq_rqst

3) Specify a different directory that does exist with adequate permissions (I haven't tested this and don't plan on it since I will be removing the posix_mq implementation per #15) https://github.com/joe-at-startupmedia/pmon3/blob/3fcb9023944385ae830196ac615da5802973957b/config.yml#L14

4) Could it possibly be selinux related? Try running selinux in permissive mode to see if it resolve the issue.

BleethNie commented 6 months ago

Thank you very much for your help, when I follow the above steps, the command can be executed normally, it may be that there is a problem with my operation

image

cd /usr/local/bin
./pmon3 exec /home/kafka-console-ui/bin/start.sh

image