Author Topic: Wrong apache update (httpd) by Yum Manager  (Read 2950 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Wrong apache update (httpd) by Yum Manager
« on: May 02, 2019, 11:07:01 AM »
Updated
Update again file: /usr/lib/systemd/system/httpd.service
with code:
Code: [Select]
[Unit]
Description=Web server Apache
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/apache/bin/apachectl start
ExecReload=/usr/local/apache/bin/apachectl graceful
ExecStop=/usr/local/apache/bin/apachectl graceful-stop

[Install]
WantedBy=multi-user.target

And restart your service again => working normal

p/s: Becareful when update version at Yum Manager

To day i run upgrade from YUM Manager, i got wrong for apache
The new apache running is not provive by CWP
Apache running by default by "/usr/sbin/httpd"
CWP is "/usr/local/apache/bin/httpd"
=> So apache not run by cwp config
After kill "/usr/sbin/httpd", apache working normal
But  Restart button not working correct

So, how to fix it?
I see /usr/lib/systemd/system/httpd.service link to /usr/sbin/httpd

Code: [Select]
ps axl | grep httpd
4     0  59419      1  20   0 224100  5044 poll_s Ss   ?          0:00 /usr/sbin/httpd -DFOREGROUND
5    48  60270  59419  20   0 224236  3708 inet_c S    ?          0:00 /usr/sbin/httpd -DFOREGROUND
5    48  60271  59419  20   0 224236  3704 inet_c S    ?          0:00 /usr/sbin/httpd -DFOREGROUND
5    48  60272  59419  20   0 224236  3700 inet_c S    ?          0:00 /usr/sbin/httpd -DFOREGROUND
5    48  60273  59419  20   0 224236  3700 inet_c S    ?          0:00 /usr/sbin/httpd -DFOREGROUND
5    48  60274  59419  20   0 224236  3708 inet_c S    ?          0:00 /usr/sbin/httpd -DFOREGROUND
5    48  60354  59419  20   0 224236  3700 inet_c S    ?          0:00 /usr/sbin/httpd -DFOREGROUND
5    48  60359  59419  20   0 224236  3704 inet_c S    ?          0:00 /usr/sbin/httpd -DFOREGROUND
5    48  60441  59419  20   0 224236  3700 inet_c S    ?          0:00 /usr/sbin/httpd -DFOREGROUND
5    48  60447  59419  20   0 224236  3704 inet_c S    ?          0:00 /usr/sbin/httpd -DFOREGROUND
5    48  60501  59419  20   0 224236  3700 inet_c S    ?          0:00 /usr/sbin/httpd -DFOREGROUND
5     0  60560      1  20   0 130972  7072 poll_s Ss   ?          0:00 /usr/local/apache/bin/httpd -k start
5    99  60561  60560  20   0 130632  5160 skb_wa S    ?          0:00 /usr/local/apache/bin/httpd -k start
5    99  60562  60560  20   0 419936  5920 pipe_w Sl   ?          0:00 /usr/local/apache/bin/httpd -k start
5    99  60563  60560  20   0 616544  6940 pipe_w Sl   ?          0:00 /usr/local/apache/bin/httpd -k start
5    99  60564  60560  20   0 419936  5920 pipe_w Sl   ?          0:00 /usr/local/apache/bin/httpd -k start
0     0  61133 104268  20   0 112712   976 pipe_w S+   pts/0      0:00 grep --color=auto httpd
« Last Edit: May 02, 2019, 11:42:36 AM by vipony12 »

Offline
*
Re: Wrong apache update (httpd) by Yum Manager
« Reply #1 on: May 02, 2019, 11:48:19 AM »
you can try

yum remove httpd
yum reinstall cwp-httpd
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Wrong apache update (httpd) by Yum Manager
« Reply #2 on: May 02, 2019, 02:56:02 PM »
I tried it, but not working
Code: [Select]
yum remove httpd
------------- done!
And:
Code: [Select]
[root@fr146 src]# service httpd status
Redirecting to /bin/systemctl status httpd.service
Unit httpd.service could not be found.
[root@fr146 src]# yum reinstall cwp-httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirror.spreitzer.ch
Resolving Dependencies
--> Running transaction check
---> Package cwp-httpd.x86_64 0:2.4.39-2 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================
 Package                                    Arch                                    Version                                      Repository                            Size
============================================================================================================================================================================
Reinstalling:
 cwp-httpd                                  x86_64                                  2.4.39-2                                     cwp                                  5.5 M

Transaction Summary
============================================================================================================================================================================
Reinstall  1 Package

Total download size: 5.5 M
Installed size: 27 M
Is this ok [y/d/N]: y
Downloading packages:
cwp-httpd-2.4.39-2.x86_64.rpm                                                                                                                        | 5.5 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Failed to stop httpd.service: Unit httpd.service not loaded.
  Installing : cwp-httpd-2.4.39-2.x86_64                                                                                                                                1/1
Failed to start httpd.service: Unit not found.
warning: %post(cwp-httpd-2.4.39-2.x86_64) scriptlet failed, exit status 5
Non-fatal POSTIN scriptlet failure in rpm package cwp-httpd-2.4.39-2.x86_64
  Verifying  : cwp-httpd-2.4.39-2.x86_64                                                                                                                                1/1

Installed:
  cwp-httpd.x86_64 0:2.4.39-2

Complete!
[root@fr146 src]# service httpd status
Redirecting to /bin/systemctl status httpd.service
Unit httpd.service could not be found.

I have to edit file in systemd, and all back normal

Offline
*****
Re: Wrong apache update (httpd) by Yum Manager
« Reply #3 on: May 12, 2019, 04:26:46 AM »
Hi, try to rebuild Apache via CWP. It must help.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: Wrong apache update (httpd) by Yum Manager
« Reply #4 on: September 21, 2019, 01:31:44 PM »
vipony12 thanks a lot, your solution is the only that fixed this mess!

Offline
*
Re: Wrong apache update (httpd) by Yum Manager
« Reply #5 on: April 29, 2020, 03:24:38 PM »
Today, after yum update, I experienced the same issue reported in this thread.
httpd defaulted back to /etc/httpd/conf/httpd.conf causing to bypass the httpd.conf from CWP settings.
After modifying httpd.service as mentioned by vipony12 things are running again.