Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Can anyone give me an advice with this please?

I run update on my debian server by Webmin. After updating some apache2 and etc, it shows update fail.

After that I can't start apache2. I must run

netstat -ltnp | grep ':80'

then

kill -9 1047

and now I can start apache2.

When I started it first time after update, some websites on fastCGI won't work. I must change them in ISPconfig3 to mod-PHP, and now works.

Now I can't even restart apache without kill pid.

In log of ISP I see this:

Unable to open logs
(98)Address already in use: make_sock: could not bind to address [::]:80   
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
 no listening sockets available, shutting down

In log of some website I see this:

[emerg] (13)Permission denied: mod_fcgid: can´t lock process table in pid 19264

Do you think it will be solution to update everything by:

apt-get update

and

apt-get upgrade

to complete all updates? I have little scare if I do that then next errors will occur.


If I look at apache log I see the following error:

Debian Python version mismatch, expected '2.6.5+', found '2.6.6'

But that was there before that problem before.

share|improve this question
    
Using apt-get update && apt-get upgrade should be safe, because it will show you what it will do and asks if you want to continue. If this doesn't help, I would try a apt-get install --reinstall apache2. Note that none of these commands are without risk, so backup first. –  SebiF May 31 '12 at 10:07
    
[RESOLVED] I just do that apt-get update && apt-get upgrade and than was OK. –  Ripeed Jul 11 '13 at 12:42

2 Answers 2

To clarify some points,

  • Don't use kill -9 to stop a process unless you really have no other choice like it is not responding at all. It may cause data loss/corruption. Instead, you can use the script /etc/init.d/apache2 for your case
  • Doing apt-get update and apt-upgrade will provide you with the available patches and updates from debian which are mostly bug fixes and security patches.

The unable to open logs error may indicate a permission problem. Check your log files permissions and make you are starting apache with sudo.

The could not bind to address error indicates that the port is already reserved for other process. You can verify using netstat -lnp.

share|improve this answer
    
kill -9 I must use because /etc/init.d/apache2 stop dont stop it –  Ripeed May 31 '12 at 8:18
    
Doing apt-get update and apt-upgrade - I dont shure if I can run it before I fix this mess:( –  Ripeed May 31 '12 at 8:19
    
I starting apache as root –  Ripeed May 31 '12 at 8:19

The error you give...

[emerg] (13)Permission denied: mod_fcgid: can´t lock process table in pid 

...is covered in this apache bug that states its due to an incompatibility between certain versions of mpm-itk and mod_fcgid.

It will be displayed every time the server serves up a fastcgi page, usually PHP. The server will still deliver static content in this state.

https://issues.apache.org/bugzilla/show_bug.cgi?id=55350

The bug is not fixed yet, so current solutions are switch to mpm-prefork or change to using non-fastcgi. For PHP switch to using mod-php.

On a Debian/Ubuntu system you can switch to mpm-prefork simply by running

apt-get remove apache2-mpm-itk

Debian switches over itself:

root@vps1:/var/lib/apache2/fcgid# apt-get remove apache2-mpm-itk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  apache2-mpm-prefork
The following packages will be REMOVED:
  apache2-mpm-itk
The following NEW packages will be installed:
  apache2-mpm-prefork
0 upgraded, 1 newly installed, 1 to remove and 109 not upgraded.
Need to get 2,358 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? 
Get:1 http://ftp.debian.org/debian/ wheezy/main apache2-mpm-prefork amd64 2.2.22-13+deb7u2 [2,358 B]
Fetched 2,358 B in 0s (7,481 B/s)                
dpkg: apache2-mpm-itk: dependency problems, but removing anyway as you requested:
 libapache2-mod-php5 depends on apache2-mpm-prefork (>> 2.0.52) | apache2-mpm-itk; however:
  Package apache2-mpm-prefork is not installed.
  Package apache2-mpm-itk is to be removed.
 apache2 depends on apache2-mpm-worker (= 2.2.22-13+deb7u2) | apache2-mpm-prefork (= 2.2.22-13+deb7u2) | apache2-mpm-event (= 2.2.22-13+deb7u2) | apache2-mpm-itk (= 2.2.22-13+deb7u2); however:
  Package apache2-mpm-worker is not installed.
  Package apache2-mpm-prefork is not installed.
  Package apache2-mpm-event is not installed.
  Package apache2-mpm-itk is to be removed.

(Reading database ... 48579 files and directories currently installed.)
Removing apache2-mpm-itk ...
[ ok ] Stopping web server: apache2 ... waiting .
Selecting previously unselected package apache2-mpm-prefork.
(Reading database ... 48583 files and directories currently installed.)
Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.22-13+deb7u2_amd64.deb) ...
Setting up apache2-mpm-prefork (2.2.22-13+deb7u2) ...
[ ok ] Starting web server: apache2.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.