Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run minio as Daemon process? #4155

Closed
akb2017 opened this issue Apr 20, 2017 · 18 comments
Closed

How to run minio as Daemon process? #4155

akb2017 opened this issue Apr 20, 2017 · 18 comments

Comments

@akb2017
Copy link

akb2017 commented Apr 20, 2017

I want to run minio as Daemon process or to run in background ..How to run minio as Daemon process in ubuntu without root access?

@harshavardhana
Copy link
Member

Please read this https://github.com/minio/minio-service/tree/master/linux-systemd @akb2017 and let us know how it goes.

@akb2017
Copy link
Author

akb2017 commented Apr 20, 2017

But that one requires root access right? I want to run this without root access

@harshavardhana
Copy link
Member

But that one requires root access right? I want to run this without root access

It doesn't require root access.. you can configure the system daemon to run as a normal user.

@harshavardhana
Copy link
Member

https://github.com/minio/minio-service/tree/master/linux-systemd#note - read the Note here. First you need to configure the service as root and then subsequently make a proper user without shell to run the service.

@akb2017
Copy link
Author

akb2017 commented Apr 20, 2017

Ok i will try it now

@akb2017
Copy link
Author

akb2017 commented Apr 21, 2017

This one working fine for running single instance minio ..But getting error when i tried as cluster
Error -->

Starting Minio...
Started Minio.
minio.service: Main process exited, code=exited, status=1/FAILURE
minio.service: Unit entered failed state.
minio.service: Failed with result 'exit-code'.

@harshavardhana
Copy link
Member

// cc @hackintoshrao can you check?

@hackintoshrao
Copy link
Contributor

Will validate the script for distributed Minio.

@akb2017
Copy link
Author

akb2017 commented Apr 22, 2017

ok

@akb2017
Copy link
Author

akb2017 commented Apr 22, 2017

Iam getting the error like this -->
Loaded: loaded (/etc/systemd/system/minio.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2017-04-22 08:35:48 IST; 44s ago
Docs: https://docs.minio.io
Process: 8886 ExecStart=/opt/minio/minio server $MINIO_OPTS $MINIO_VOLUMES (code=exited, status=1/FAILURE)
Process: 8883 ExecStartPre=/bin/bash -c [ -n "${MINIO_VOLUMES}" ] || echo "Variable MINIO_VOLUMES not set in /etc/default/minio" (code=exited, status=0/SUCCESS)
Main PID: 8886 (code=exited, status=1/FAILURE)
Apr 22 08:35:48 deds14 systemd[1]: Starting Minio...
Apr 22 08:35:48 deds14 systemd[1]: Started Minio.
Apr 22 08:35:48 deds14 systemd[1]: minio.service: Main process exited, code=exited, status=1/FAILURE
Apr 22 08:35:48 deds14 systemd[1]: minio.service: Unit entered failed state.
Apr 22 08:35:48 deds14 systemd[1]: minio.service: Failed with result 'exit-code'.

Iam running this on 4 ubuntu machines
My configuration file is as follows

Local export path.

MINIO_VOLUMES=http://192.168.1.22/home/minio/data http://192.168.1.23/home/minio/data http://192.168.1.24/home/minio/data http://192.168.1.25/home/minio/data # Minio data storage directory

Access Key of the server.

MINIO_OPTS="--address :9000"
MINIO_ACCESS_KEY=minio2015

Secret key of the server.

MINIO_SECRET_KEY=minio2015

minio.service file -->
[Unit]
Description=Minio
Documentation=https://docs.minio.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/opt/minio/minio

[Service]
WorkingDirectory=/home/minio/work

User=minio
Group=minio

PermissionsStartOnly=true

EnvironmentFile=-/etc/default/minio
ExecStartPre=/bin/bash -c "[ -n "${MINIO_VOLUMES}" ] || echo "Variable MINIO_VOLUMES not set in /etc/default/minio""

ExecStart=/opt/minio/minio server $MINIO_OPTS $MINIO_VOLUMES

StandardOutput=journal
StandardError=inherit

Specifies the maximum file descriptor number that can be opened by this process

LimitNOFILE=65536

Disable timeout logic and wait until process is stopped

TimeoutStopSec=0

SIGTERM signal is used to stop Minio

KillSignal=SIGTERM

SendSIGKILL=no

SuccessExitStatus=0

[Install]
WantedBy=multi-user.target

Built for ${project.name}-${project.version} (${project.name})

@hackintoshrao
Copy link
Contributor

@akb2017 : Can you also send the logs of Minio using the command journalctl -u minio.service and also the version of Minio you are running using the /opt/minio/minio --version command.

@akb2017
Copy link
Author

akb2017 commented Apr 22, 2017

version: 2017-03-16T21:50:32Z

root@deds13:/var/minio# journalctl -u minio.service
-- Logs begin at Fri 2017-04-21 23:21:52 IST, end at Sat 2017-04-22 13:11:12 IST
Apr 21 23:22:11 deds13 systemd[1]: Starting Minio...
Apr 21 23:22:11 deds13 systemd[1]: minio.service: Control process exited, code=e
Apr 21 23:22:11 deds13 systemd[1]: Failed to start Minio.
Apr 21 23:22:11 deds13 systemd[1]: minio.service: Unit entered failed state.
Apr 21 23:22:11 deds13 systemd[1]: minio.service: Failed with result 'exit-code'
Apr 22 08:19:17 deds13 systemd[1]: Starting Minio...
Apr 22 08:19:17 deds13 systemd[1]: minio.service: Control process exited, code=e
Apr 22 08:19:17 deds13 systemd[1]: Failed to start Minio.
Apr 22 08:19:17 deds13 systemd[1]: minio.service: Unit entered failed state.
Apr 22 08:19:17 deds13 systemd[1]: minio.service: Failed with result 'exit-code'
Apr 22 08:22:41 deds13 systemd[1]: Starting Minio...
Apr 22 08:22:41 deds13 systemd[1]: minio.service: Control process exited, code=e
Apr 22 08:22:41 deds13 systemd[1]: Failed to start Minio.
Apr 22 08:22:41 deds13 systemd[1]: minio.service: Unit entered failed state.
Apr 22 08:22:41 deds13 systemd[1]: minio.service: Failed with result 'exit-code'
Apr 22 08:33:15 deds13 systemd[1]: Starting Minio...
Apr 22 08:33:15 deds13 systemd[1]: minio.service: Control process exited, code=e
Apr 22 08:33:15 deds13 systemd[1]: Failed to start Minio.
Apr 22 08:33:15 deds13 systemd[1]: minio.service: Unit entered failed state.
Apr 22 08:33:15 deds13 systemd[1]: minio.service: Failed with result 'exit-code'
Apr 22 10:40:48 deds13 systemd[1]: Starting Minio...
Apr 22 10:40:48 deds13 systemd[1]: minio.service: Control process exited, code=e
lines 1-23...skipping...
-- Logs begin at Fri 2017-04-21 23:21:52 IST, end at Sat 2017-04-22 13:11:12 IST. --
Apr 21 23:22:11 deds13 systemd[1]: Starting Minio...
Apr 21 23:22:11 deds13 systemd[1]: minio.service: Control process exited, code=exited status=1
Apr 21 23:22:11 deds13 systemd[1]: Failed to start Minio.

@gowithplanb
Copy link

If I specify my MINIO_VOLUMES with a comment in the line, minio won't start either. Try removing the comment in your config file.

@akb2017
Copy link
Author

akb2017 commented Apr 22, 2017

Yeh its working fine now ..
Thanks a lot....

@Dharshan2004
Copy link

I have a problem and getting a job assertion failed error

@Dharshan2004
Copy link

Assertion failed on job for minio.service.

@pchiend
Copy link

pchiend commented Nov 6, 2018

Yeh its working fine now ..
Thanks a lot....

how?

@lock
Copy link

lock bot commented Apr 19, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants