Can't restart kestrel - asp.net-core

I am using supervisor to run the kestrel process on Ubuntu 14.04.
Here is my supervisor config:
[program:website]
command=/usr/bin/dotnet /var/www/publish/Website.dll
directory=/var/www/publish/
autostart=true
autorestart=true
stderr_logfile=/var/www/website.err.log
stdout_logfile=/var/www/website.out.log
environment=ASPNETCORE_ENVIRONMENT=Production
user=www-data
stopasgroup=true
stopsignal=INT
I have tried sudo service restart supervisor and supervisorctl restart website.
They both say they are stopping and starting process but my uploaded changes are not detected, it seems kestrel carries on running unaffected.
The only way I have of getting my changes to reflect is to restart the entire server which is inconvenient.
What is a better way for me to restart kestrel?

Related

redis start with /usr/bin/redis-server fine but stop on systemd start

I have install redis on centos 8 and everything works fine but after I have reboot the server, redis top working, I have try to start by systemctl start redis but service start and stop unexpectedly
I have try /usr/bin/redis-server /etc/redis.conf and service start successfully but still got following error on starting bye systemctl
redis.service: Failed with result 'exit-code'
can anybody help me about this?
-----edit-------
I have check /var/logs/redis/redis.log and found that se linux cause the problme
I have try setenforce permissive and now redis working fine.
but why this happend?
I didn`t change anything about SELinux and suddenly the error occurred

Redis don't stop or restart on CentOS7

I've installed Redis version 3.2.12 on one node CentOS 7 of a cluster with Cloudera Manager 6.3 and my redis never stop.
Everything is on default, I just added the password, but that has no effects because I can't restart. Option daemonize is no
My instalation was:
sudo yum -y install redis
sudo service redis start
When I type redis-cli, CLI starts normally at 127.0.0.1:6379. When I try shutdown, the console shows 'not connected', but with lsof -i :6379 I can identify that some jobs die and return with another PID.
If I try to kill the redis jobs, it always return with another PID.
service redis stop Return 'Redirecting to /bin/systemctl stop redis.service' but has no effects.
If I try service redis restart then service redis status it returns:
redis.service: main process exited, code=exited, status=1/FAILURE
Unit redis.service entered failed state.
Someone can please help me as a way to debug or understand what is happening? It's my first time with Redis.
Not sure how is this related to celery...
CentOS 7 uses systemd so I would recommend stop using the service tool and start using the systemctl. First thing you should try is systemctl status redis to check the status of the Redis service. If it shows that for whatever reason it is down, then you should either check Redis logs, or use journalctl tool to look for system logs created by Redis.
I have seen that some installations might have redis as the command-line executable while some might have redis-server. So, please try one of these commands (one will work depending on the redis package):
sudo service redis-server restart
# OR
sudo service redis restart
If you have a newer Cent OS having systemctl installed, then try one of these:
sudo systemctl restart redis-server
# OR
sudo systemctl restart redis

Restart apache forcing it

I have a Centos server running Apache and sometimes the server is working fine but I need to restart it due to changes in Apache configuration files. I usually execute:
systemctl restart httpd.service
But sometimes this command hangs for 4 or 5 minutes! It takes very long to stop apache. I know the problem is stopping and not starting cause if I execute systemctl stop httpd.service it also takes 4 or 5 minutes.
Is there anyway to force apache to restart without waiting so long?
I found that reload option is better than restart httpd service.
systemctl restart httpd

Failed to get D-Bus connection - httpd service in Docker container

I am creating a Dockerfile for PostgreSQL with CentOS7 as the base image. I am trying to start httpd service with the following command in the container,
service httpd start
and i get the following error:
Redirecting to /bin/systemctl start httpd.service
Failed to get D-Bus connection: No connection to service manager.
The log file directory /var/log/httpd is also empty. I guess this is the problem with Docker CentOS7 image. Any help appreciated.
I have run into this a well.
It might not be the best way, but you can find a copy of the /etc/init.d/httpd file from another computer. copy that into the container in /etc/init.d
then run
chkconfig --level 345 httpd on
then you will be able to use either
/etc/init.d/httpd start or service httpd start

Denwer apache restart

I often restart apache during development e.g. for doggling on/off x-debug, update Doctrine cache...
Uppon installation Denwer puts 3 shortcuts on desktop Start Denwer, Stop Denwer and Restart Denwer. Those are pointed to appropriate .exe files. However Restart Denwer restarts all services including MySQL, hosts file, mail daemon which takes 10 sec+.
How can I restart apache only?
apache-restart.bat
cd /d z:\denwer\scripts\init.d
z:\usr\local\miniperl\miniperl.exe apache.pl restart