NetworkManager kills apache when going offline - apache

When i turn off my WiFi, NetworkManager kills apache2. This can be seen in '/var/log/apache/error_log':
[Sun Mar 01 13:25:55 2015] [notice] caught SIGTERM, shutting down
However, this does not happen if i turn off the WiFi manually by doing
sudo ifconfig wlan0 down
It seems NetworkManager goes to status 'inactive' when i disconnect it from the WiFi.
These are some of the contents of '/var/log/messages' around the time i turn off the WiFi:
Mar 1 13:25:52 raven NetworkManager[22393]: <info> (wlan0): device state change: activated -> disconnected (reason 'user-requested') [100 30 39]
Mar 1 13:25:52 raven NetworkManager[22393]: <info> (wlan0): deactivating device (reason 'user-requested') [39]
Mar 1 13:25:52 raven dhcpcd[350]: received SIGTERM, stopping
Mar 1 13:25:52 raven dhcpcd[350]: wlan0: removing interface
Mar 1 13:25:53 raven NetworkManager[22393]: <info> (wlan0): canceled DHCP transaction, DHCP client pid 350
Mar 1 13:25:53 raven NetworkManager[22393]: <info> NetworkManager state is now DISCONNECTED
Mar 1 13:25:53 raven dbus[16077]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Mar 1 13:25:53 raven NetworkManager[22393]: <warn> (pid 350) unhandled DHCP event for interface wlan0
Mar 1 13:25:53 raven NetworkManager[22393]: <warn> Connection disconnected (reason -3)
Mar 1 13:25:53 raven NetworkManager[22393]: <info> (wlan0): supplicant interface state: completed -> disconnected
Mar 1 13:25:53 raven NetworkManager[22393]: <warn> Connection disconnected (reason -3)
Is there a way to "uncouple" apache2 from NetworkManager so it is not killed when going offline
I have gentoo 3.10.7-gentoo-r1, i am using OpenRC (not systemd),
NetworkManager 0.9.8.8, and apache 2.2.25

Same problem here (Gentoo user for years).
Very quick solution:
As root, just type apache1 this will start apache with the same configs as the init script /etc/init.d/apache2 does. The only difference is that it will not check for a started network.
The reason why it is stopped then NetworkManager is stopped is this part of the init script:
depend() {
need net
use mysql dns logger netmount postgresql
after sshd
}
The need net part tells the script that this service requires the network to be up. On machine where NetworkManager is used and there is no network connection, through WiFi or wired networks, this condition is not given and the service is stopped automatically.
So as a second (still hacky) solution, you could just comment out this line.

Related

Unable to ssh VM after hardware configuration change

I followed the recommandation to reduce the size of my VM (number of CPU from 4 to 2 and memory from 16GO to 8 Go). After updating the configuration and restarting the VM i was not able to access the VM via ssh.
The VM has an external IP.
The troublshoot diagnostic using gcloud does not show any error or issue in the log. Everything is fine regarding the firewall configuration.
I tried to create a new VM under my project (same project as the original VM). I cannot access it with ssh. If i create a new project and a new VM instance under this new project then I can ssh it. --> The problem seems to be related to the project itself.
I tried to access vie serial port and I am getting these errors:
Mar 8 20:31:11 myvm systemd[1]: Started Google OSConfig Agent.
Mar 8 20:32:11 myvm OSConfigAgent[1173]: 2022-03-08T20:32:11.5643Z OSConfigAgent Critical main.go:100: Error parsing metadata, agent cannot start: network error when requesting metadata, make sure your instance has an active network and can reach the metadata server: Get http://169.254.169.254/computeMetadata/v1/?recursive=true&alt=json&wait_for_change=true&last_etag=0&timeout_sec=60: dial tcp 169.254.169.254:80: connect: network is unreachable
Mar 8 20:32:11 myvm systemd[1]: google-osconfig-agent.service: Main process exited, code=exited, status=1/FAILURE
Mar 8 20:32:11 myvm systemd[1]: google-osconfig-agent.service: Failed with result 'exit-code'.
Mar 8 20:32:12 myvm systemd[1]: google-osconfig-agent.service: Service hold-off time over, scheduling restart.
Mar 8 20:32:12 myvm systemd[1]: google-osconfig-agent.service: Scheduled restart job, restart counter is at 4.
I am blocked... I am asking for your support. Any idea or suggestion?

Cloudstack KVM installation failed

I'm installing cloudstack on ubuntu 20.04 by following this document.
I installed qemu-kvm and cloudstack-agent successfully but I'm not able to start libvirtd.service, on seeing the status I'm getting following errors
● libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-03-16 18:00:09 IST; 1min 28s ago
TriggeredBy: ● libvirtd-admin.socket
● libvirtd.socket
● libvirtd-ro.socket
Docs: man:libvirtd(8)
https://libvirt.org
Process: 232313 ExecStart=/usr/sbin/libvirtd $libvirtd_opts (code=exited, status=6)
Main PID: 232313 (code=exited, status=6)
Mar 16 18:00:09 host systemd[1]: libvirtd.service: Scheduled restart job, restart counter is at 5.
Mar 16 18:00:09 host systemd[1]: Stopped Virtualization daemon.
Mar 16 18:00:09 host systemd[1]: libvirtd.service: Start request repeated too quickly.
Mar 16 18:00:09 host systemd[1]: libvirtd.service: Failed with result 'exit-code'.
Mar 16 18:00:09 host systemd[1]: Failed to start Virtualization daemon.
on seeing the log of journalctl -xe it is showing cloudstack-usage.service: Failed with result 'exit-code'
can any one suggest what whould be the issue.
Are you trying this on a virtualised VM, or baremetal host, or on a raspberrypi? This means some other service hasn't started which libvirtd may depend on. See if you can run "systemctl daemon-reload" and try to start libvirtd manually "systemctl start libvirtd", and then try rest. The cloudstack-usage service can be started once the mysql server is running. If you've further questions I encourage you to join the CloudStack users mailing list and ask questions there - http://cloudstack.apache.org/mailing-lists.html
I got that same error message when following the official install guide when starting the mysql server. The problem was for me that [mysqld] was missing in the my.conf file before the config snippet. The documentation is misleading in that case (like the secion header is only relevant when editing that alternative mysql config file mentioned later there).

Radius server failed to start in centos 7

At beginning I successfully configured radius server with mariadb and httpd. But I changed to hostname of the server and rebooted. Now even if the mariadb and httpd is running but radiusd failed to start. Here is the answer from journalctl -xe .. Please help me.
Jan 10 12:34:08 cpe.twcny.res.rr.com systemd[1]: Unit radiusd.service entered failed state.
Jan 10 12:34:08 cpe.twcny.res.rr.com systemd[1]: radiusd.service failed.
Jan 10 12:34:08 cpe.twcny.res.rr.com polkitd[963]: Unregistered Authentication Agent for unix-process:2183:15540 (system bus name :1.43, object path /org/
Jan 10 12:40:01 cpe.twcny.res.rr.com systemd[1]: Created slice User Slice of root.

WampSever doesn't start but it used to

WampServer used to start normally without any problems , Since today it doesn't want to start , it stays red , i already checked if there are other programs using port 80 , but the command netstat -aon | findstr :80 shows no results , what can i do ? I am using WampServer3.1.0 on windows 10
Here are the lost two lines from the apache error log , notice that the 14th april i used wampserver normally ,and today , 15th april , i can't use it
[Sat Apr 14 23:15:57.139345 2018] [mpm_winnt:notice] [pid 8608:tid 748] AH00364: Child: All worker threads have exited.
[Sat Apr 14 23:16:03.491719 2018] [mpm_winnt:notice] [pid 4040:tid 736] AH00430: Parent: Child process 8608 exited successfully.
And here is the error from windows logs , which appears each time i try to launch WampServer
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{D63B10C5-BB46-4990-A94F-E40B9D520160}
and APPID
{9CA88EE3-ACB7-47C8-AFC4-AB702511C276}
to the user DESKTOP-C77I129\ga_na SID (S-1-5-21-1612724789-3370941347-187498907-1001) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.

Apache WSASocket failed to open the inherited socket. (LMHOSTS disabled)

[Thu Aug 09 11:20:30 2012] [notice] Child 4656: Child process is running
[Thu Aug 09 11:20:30 2012] [crit] (OS 10022)An invalid argument was supplied. : Child 4656: setup_inherited_listeners(), WSASocket failed to open the inherited socket.
[Thu Aug 09 11:20:30 2012] [crit] Parent: child process exited with status 3 -- Aborting.
I have started getting this error unexpectedly. I dont believe I changed any conf files.
Are there are any temporary files I can reset in the apache installation? I have moved everything from /xampp/tmp
I have checked to see if localhost:80 is in use, I dont think this is the case.
I have reset netsh as specified here: https://issues.apache.org/bugzilla/show_bug.cgi?id=31765
Please recommend steps to reset apache as I believe it is possible this is an issue caused by a orphaned PID or something of that nature as nothing has changed and I do unexpected shutdowns of my computer.
This is on Windows XP, apache httpd.exe version is 2.2.11.0
Port 443 was in use. Then magically ceased being in use. Then I guess perhaps netsh reset caused LMHOSTS to be enabled because I ended up with Local Connection being renamed to Local Connection 2 with LMHOSTS enabled. This is called magic.
Panda Media Booster was using 443.