Open lizhihongTest opened 1 year ago
What is the version of your linux, probably related to the specific operating system environment?
This is not a bug, but can be considered for improvement:
ood-daemon takes a monitor dual process mode to keep the ood-daemon service running.
This startup sequence is as follows:
This pattern is not very common in linux services. Moreover, ood-installer is started using the traditional init.rc script mode, which does not require monitoring process status
On some systems that support systemd (ubuntu in this case? Am I right?), it tries to do a compatibility with the traditional init script, but apparently it does so incorrectly here ......
Here you can consider replacing the current init script-based startup with a systemd-based one. But considering that init scripts are more widely supported. I'm still hesitant to replace it
Which popular linux distributions that do not yet support systemd? I think if systemd is a popular choice around popular linux distributions , switching the startup script to systemd is a better choice.
@lizhihongTest
@weiqiushi This is caused by your script error: /etc/init.d/ood-daemon
/etc/init.d/ood-daemon
-bash: /etc/init.d/ood-daemon: /bin/sh^M: bad interpreter: No such file or directory
This error message means that the interpreter that is specified in the first line of the file ("/bin/sh") cannot be found. The "^M" at the end of the error message is a carriage return character, which is a remnant of Windows-style line endings (which use a combination of carriage return and line feed characters to indicate the end of a line).
To fix this issue, you can remove the carriage return characters from the file
@weiqiushi This is caused by your script error: /etc/init.d/ood-daemon
/etc/init.d/ood-daemon -bash: /etc/init.d/ood-daemon: /bin/sh^M: bad interpreter: No such file or directory
This error message means that the interpreter that is specified in the first line of the file ("/bin/sh") cannot be found. The "^M" at the end of the error message is a carriage return character, which is a remnant of Windows-style line endings (which use a combination of carriage return and line feed characters to indicate the end of a line).
To fix this issue, you can remove the carriage return characters from the file The /etc/init.d/ood-daemon.sh file, released via ood-installer, is already has unix line endings from long time ago. You can check this by yourself. https://github.com/buckyos/CYFS/blob/main/src/tools/ood-installer/res/default/ood-daemon.sh
Also, if the file /etc/init.d/ood-daemon is invalid, then ood-daemon should not start.
This does not explain the fact that the ood-daemon process exists in your process list.
@lizhihongTest
The "ood-daemon" process may have been started by "ood-installer" because I ran a DIY-OOD installation package. The error is just caused by the erroneous "^M" character in the script file "/etc/init.d/ood-daemon", and it has no direct relationship with whether the "ood-daemon" process was successfully launched or not.
Pelase you see this error log ,And check your shell code for /etc/init.d/ood-daemon
May 04 20:34:02 filecoin2 systemd[969200]: ood-daemon.service: Failed to execute /etc/init.d/ood-daemon: No such file or directory
May 04 20:34:02 filecoin2 systemd[969200]: ood-daemon.service: Failed at step EXEC spawning /etc/init.d/ood-daemon: No such file or directory
The DIY OOD installation package on the official website is generated by the internal two Windows CI Agent where the linux version is generated by wsl compilation on Windows.
On the two Agents, one of them has not modified the autocrlf configuration of git to false (on Windows, this option is true by default)
The ood-installer compiled by this machine will release the ood-daemon.sh file with the wrong line end when installed
it will be fixed after DIY OOD Installer 1.0.1.33
I install Linux DIY-OOD, then find that : Systemctl status of ood-daemon.service is error