systemd service not working on raspberry pi #12102
-
Expected Behaviorminio running after starting the systemd servicce Current Behaviorstarting minio through systemd fails pi@raspberrypi:/etc/systemd/system $ sudo systemctl start minio
Job for minio.service failed because the control process exited with error code.
See "systemctl status minio.service" and "journalctl -xe" for details.
pi@raspberrypi:/etc/systemd/system $ sudo systemctl status minio
● minio.service - MinIO
Loaded: loaded (/etc/systemd/system/minio.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-04-20 20:52:06 BST; 7s ago
Docs: https://docs.min.io
Process: 1012 ExecStartPre=/bin/bash -c if [ -z "${MINIO_VOLUMES}" ]; then echo "Variable MINIO_VOLUMES not set in /etc/default/minio"; exit 1; fi (code=exited, status=217/USER)
Apr 20 20:52:06 raspberrypi systemd[1]: minio.service: Service RestartSec=100ms expired, scheduling restart.
Apr 20 20:52:06 raspberrypi systemd[1]: minio.service: Scheduled restart job, restart counter is at 5.
Apr 20 20:52:06 raspberrypi systemd[1]: Stopped MinIO.
Apr 20 20:52:06 raspberrypi systemd[1]: minio.service: Start request repeated too quickly.
Apr 20 20:52:06 raspberrypi systemd[1]: minio.service: Failed with result 'exit-code'.
Apr 20 20:52:06 raspberrypi systemd[1]: Failed to start MinIO. Possible SolutionIt has to be something with ExecPreStart command in the minio.service file, but don't know how to solve this Steps to Reproduce (for bugs)
ContextAt the Moment, I wan't to get minio running on a raspberry pi, to later use it as a backup for longhorn in my kubernetes cluster RegressionYour EnvironmentVersion: $ minio --version
minio version RELEASE.2021-04-18T19-26-29Z config: $ ls -l /etc/default/
-rw-r--r-- 1 root root 257 Apr 20 20:30 minio
$ cat /etc/default/minio
# Volume to be used for MinIO server.
MINIO_VOLUMES="/mnt/"
# Use if you want to run MinIO on a custom port.
MINIO_OPTS="--address :9199"
# Root user for the server.
MINIO_ROOT_USER=Root-User
# Root secret for the server.
MINIO_ROOT_PASSWORD=Root-Password Service: $ ls -l /etc/systemd/system
-rwxr-xr-x 1 root root 920 Apr 20 20:32 minio.service
$ cat /etc/systemd/system/minio.service
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio
[Service]
WorkingDirectory=/usr/local/
User=minio-user
Group=minio-user
EnvironmentFile=/etc/default/minio
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"
ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES
# Let systemd restart this service always
Restart=always
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
# Specifies the maximum number of threads this process can create
TasksMax=infinity
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no
[Install]
WantedBy=multi-user.target
# Built for ${project.name}-${project.version} (${project.name}) If you need further Information, please let me know |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Does this user have write access to |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Did you create this user? and provide permissions for this user to write to |
Beta Was this translation helpful? Give feedback.
Did you create this user? and provide permissions for this user to write to
/mnt
?