I followed a flask+uwsgi+nginx tutorial like this. However it comes with error:
Warning: The unit file, source configuration file or drop-ins of myproject.service changed on disk. Run 'systemctl daem-reload' to reload units>
● myproject.service - uWSGI instance to serve myproject
Loaded: loaded (/etc/systemd/system/myproject.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-05-05 18:26:18 AEST; 20min ago
Main PID: 38304 (code=exited, status=203/EXEC)
May 05 18:26:18 ip-10-86-162-214.ap-southeast-2.compute.internal systemd[1]: Started uWSGI instance to serve myproject。
May 05 18:26:18 ip-10-86-162-214.ap-southeast-2.compute.internal systemd[1]: myproject.service: Main process exited code=exited status=203/exec
May 05 18:26:18 ip-10-86-162-214.ap-southeast-2.compute.internal systemd[1]: myproject.service: Failed with result 'exit-code'.
/etc/systemd/system/myproject.service
[Unit]
Description=uWSGI instance to serve myproject
After=network.target
[Service]
User=rh
WorkingDirectory=/home/rh/myproject
Environment="PATH=/home/rh/myproject/myprojectenv/bin"
ExecStart=/home/rh/myproject/myprojectenv/bin/uwsgi --ini myproject.ini
[Install]
WantedBy=multi-user.target
The "rh" is the user I used.
Related
I am very new to linux and freeradius and want to learn about this for my work, however I encounter some challenges.
I have installed freeradius on Centos 8. I installed it and it worked just fine but after installing mariaDB, issues came out when trying to start the service.
[root#FPM-FreeRad01 ~]# systemctl start radiusd.service
Job for radiusd.service failed because the control process exited with error code.
See "systemctl status radiusd.service" and "journalctl -xe" for details.
[root#FPM-FreeRad01 ~]# systemctl status radiusd.service
â radiusd.service - FreeRADIUS high performance RADIUS server.
Loaded: loaded (/usr/lib/systemd/system/radiusd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2022-06-23 09:13:53 PST; 9s ago
Process: 2900 ExecStart=/usr/sbin/radiusd -d /etc/raddb (code=exited, status=1/FAILURE)
Process: 2897 ExecStartPre=/usr/sbin/radiusd -C (code=exited, status=0/SUCCESS)
Process: 2891 ExecStartPre=/bin/sh /etc/raddb/certs/bootstrap (code=exited, status=0/SUCCESS)
Process: 2889 ExecStartPre=/bin/chown -R radiusd.radiusd /var/run/radiusd (code=exited, status=0/SUCCESS)
Main PID: 1789 (code=exited, status=0/SUCCESS)
Jun 23 09:13:53 FPM-FreeRad01.int.ahinet.ph systemd[1]: Starting FreeRADIUS high performance RADIUS server....
Jun 23 09:13:53 FPM-FreeRad01.int.ahinet.ph systemd[1]: radiusd.service: Control process exited, code=exited status=1
Jun 23 09:13:53 FPM-FreeRad01.int.ahinet.ph systemd[1]: radiusd.service: Failed with result 'exit-code'.
Jun 23 09:13:53 FPM-FreeRad01.int.ahinet.ph systemd[1]: Failed to start FreeRADIUS high performance RADIUS server..
I've been dealing with this since yesterday and I tried searching for other related problems but cannot find some answers so I try asking for help here. Any help would be appreciated.
Thank you
I'm following this YouTube Tutorial to setup my Server with Flask and Nginx: https://www.youtube.com/watch?v=o2WA-A67Bks&t=360s
Right now I'm at the Gunicorn part. I tried to start following commands:
systemctl daemon-reload
systemctl start index
systemctl enable index
systemctl status index
But it doesn't work. The Error Message looks like this:
● index.service - Gunicorn instance to serve One
Loaded: loaded (/etc/systemd/system/index.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-12-01 18:14:40 CET; 8s ago
Main PID: 24620 (code=exited, status=203/EXEC)
Dez 01 18:14:40 h2912959.stratoserver.net systemd[1]: Started Gunicorn instance to serve One.
Dez 01 18:14:40 h2912959.stratoserver.net systemd[24620]: index.service: Failed to execute command: No such file or directory
Dez 01 18:14:40 h2912959.stratoserver.net systemd[24620]: index.service: Failed at step EXEC spawning /var/www/html/myprojectenv/bin/gunicorn: No such file or directory
Dez 01 18:14:40 h2912959.stratoserver.net systemd[1]: index.service: Main process exited, code=exited, status=203/EXEC
Dez 01 18:14:40 h2912959.stratoserver.net systemd[1]: index.service: Failed with result 'exit-code'.
My index.service file looks like that:
[Unit]
Description=Gunicorn instance to serve One
After=network.target
[Service]
User=daemon
Group=www-data
WorkingDirectory=/var/www/html
Environment="PATH=/var/www/html/myprojectenv/bin"
ExecStart=/var/www/html/myprojectenv/bin/gunicorn --workers 3 --bind unix:myproject.sock -m 007 wsgi:app
[Install]
WantedBy=multi-user.target
Can please help anyone?
I had setup my nginx server fine last week until I noticed I was receiving DOSS attacks against it. I then noticed at this point my Nginx server was failing to start. I have tried everything else and unsure what to do to resolve the issue apart from reading documentation which does not help.
Documentation on Nginx
main nginx.conf appears to be empty and I cannot save to it for some reason.
root#ubuntu-vpc-do-moon:~# /etc/init.d/nginx status
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-11-04 10:54:44 UTC; 1min 43s ago
Docs: man:nginx(8)
Process: 2550 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Nov 04 10:54:44 ubuntu-vpc-do-moon systemd[1]: Starting A high performance web server and a reverse proxy server...
Nov 04 10:54:44 ubuntu-vpc-do-moon nginx[2550]: nginx: [emerg] open() "/etc/nginx/sites-enabled/nginx.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:62
Nov 04 10:54:44 ubuntu-vpc-do-moon nginx[2550]: nginx: configuration file /etc/nginx/nginx.conf test failed
Nov 04 10:54:44 ubuntu-vpc-do-moon systemd[1]: nginx.service: Control process exited, code=exited status=1
Nov 04 10:54:44 ubuntu-vpc-do-moon systemd[1]: nginx.service: Failed with result 'exit-code'.
Nov 04 10:54:44 ubuntu-vpc-do-moon systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Removed Nginx from ubuntu and done a clean installation onto server. Managed to sort the server blocks out this time so all good.
I need to use systemd to restart the meteor as a service, so I create cloud.service in /etc/systemd/system/. The file looks like below,
[Unit]
Description=cloud
After=network.target
[Service]
User=someone
Type=simple
WorkingDirectory=/home/someone/cloud/
ExecStart=/home/someone/cloud/start.sh
Restart=always
[Install]
WantedBy=multi-user.target
and in the start.sh, it looks like
nohup meteor &
But when the system restarts, the service cannot start.
● cloud.service - cloud
Loaded: loaded (/etc/systemd/system/cloud.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Fri 2018-11-30 03:22:51 UTC; 13min ago
Nov 30 03:22:51 cloud-euro systemd[1]: cloud.service: Unit entered failed state.
Nov 30 03:22:51 cloud-euro systemd[1]: cloud.service: Failed with result 'exit-code'.
Nov 30 03:22:51 cloud-euro systemd[1]: cloud.service: Service hold-off time over, scheduling restart.
Nov 30 03:22:51 cloud-euro systemd[1]: Stopped cloud.
Nov 30 03:22:51 cloud-euro systemd[1]: cloud.service: Start request repeated too quickly.
Nov 30 03:22:51 cloud-euro systemd[1]: Failed to start cloud.
Nov 30 03:22:51 cloud-euro systemd[1]: cloud.service: Unit entered failed state.
Nov 30 03:22:51 cloud-euro systemd[1]: cloud.service: Failed with result 'start-limit-hit'.
I've tried to use Type=forking, but the situation doesn't change. Any suggestions?
I am installing Apache cloudstack on ubuntu 16.0.4, but after installing cloudstack setup when I start services of cloudstack management service it displayed the following errors. (I have installed tomcat7, but tomcat 6 is not installed)
Warning: cloudstack-management.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for
cloudstack-management.service failed because the control process
exited with error code. See "systemctl status
cloudstack-management.service" and "journalctl -xe" for details.
I have checked systemctl status cloudstack-management.service command and it displays the following:
cloudstack-management.service - LSB: Start Tomcat (CloudStack).
Loaded: loaded (/etc/init.d/cloudstack-management; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2018-08-25 21:53:07 IST; 1min 11s ago
Docs: man:systemd-sysv-generator(8)
Process: 26684 ExecStart=/etc/init.d/cloudstack-management start (code=exited, status=1/FAILURE)
Aug 25 21:53:07 dhaval-pc systemd[1]: Starting LSB: Start Tomcat (CloudStack)....
Aug 25 21:53:07 dhaval-pc cloudstack-management[26684]: * cloudstack-management is not installed
Aug 25 21:53:07 dhaval-pc systemd[1]: cloudstack-management.service: Control process exited, code=exited status=1
Aug 25 21:53:07 dhaval-pc systemd[1]: Failed to start LSB: Start Tomcat (CloudStack)..
Aug 25 21:53:07 dhaval-pc systemd[1]: cloudstack-management.service: Unit entered failed state.
Aug 25 21:53:07 dhaval-pc systemd[1]: cloudstack-management.service: Failed with result 'exit-code'.
Warning: cloudstack-management.service changed on disk. Run 'systemctl daemon-reload' to reload units.
What change can I make in vi /etc/init.d/cloudstack-management file?