Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
darioOffline
Post subject: (solved) New /run and problem with apache2?  PostPosted: 17.05.2011, 10:43



Joined: 2010-11-27
Posts: 63

Status: Offline
I'm not sure this is due to the last upgrade and /run, but i have a strange problem with apache2: apache2 seems unable to execute cgi scripts because cgid doesn't start:
      Code:

[Tue May 17 12:02:37 2011] [error] (2)No such file or directory: Couldn't bind unix domain socket /var/run/apache2/cgisock.2956
[Tue May 17 12:02:37 2011] [notice] Apache/2.2.17 (Debian) mod_perl/2.0.5 Perl/v5.12.3 configured -- resuming normal operations
[Tue May 17 12:02:37 2011] [crit] cgid daemon failed to initialize


Searching, i found these topics where a similar problem was related to the lack of the /var/run/apache2 directory:

http://stackoverflow.com/questions/5419746/error-in-apache-var-run-apache2-not-found,
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/121091.

In my system now /var/run points to /run, where there isn't any apache2 directory, could this be the same problem? If yes, is it safe to create the apache2 folder inside /run as suggested in the first link?


Last edited by dario on 17.05.2011, 14:36; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
bfreeOffline
Post subject: RE: New /run and problem with apache2?  PostPosted: 17.05.2011, 11:17
Team Member


Joined: 2010-08-26
Posts: 258

Status: Offline
It should be safe just to create it, but that will be lost when you reboot so it's not a long term fix. I just installed apache2 here on a clean system and it created /run/apache2:
      Code:
root@augustus:~# ls -ld /run/apache2*
drwxr-xr-x 2 root root 60 May 17 12:11 /run/apache2
-rw-r--r-- 1 root root  5 May 17 12:11 /run/apache2.pid

Did you mess with your initscripts at all on your system?

I'm guessing this thread will move to the Software forum as I suspect it is not a common upgrade problem with apache2 (I think I know of some systems which will have d-u'd to /run versions fine without this problem), but I won't move it myself anyway until that is confirmed.
 
 View user's profile Send private message  
Reply with quote Back to top
slhOffline
Post subject: RE: New /run and problem with apache2?  PostPosted: 17.05.2011, 11:31



Joined: 2010-08-25
Posts: 761

Status: Offline
aptosid.com has been using /run/ with according sysvinit/ initramfs-tools for about a month, therefore this certainly isn't a general issue. That said, dæmon initscripts have always been required to create /var/run/<d>/ subdirectories while starting, as RAMRUN has been a valid configuration option for years, so any failure resulting from this would have been a RC bug already.
 
 View user's profile Send private message  
Reply with quote Back to top
darioOffline
Post subject: RE: New /run and problem with apache2?  PostPosted: 17.05.2011, 11:55



Joined: 2010-11-27
Posts: 63

Status: Offline
The only changes to default configuration was to disable apache and ssh on startup with boot-up-manager (i need it only sometimes to test web sites so i start it with apachectl).
 
 View user's profile Send private message  
Reply with quote Back to top
bfreeOffline
Post subject: RE: New /run and problem with apache2?  PostPosted: 17.05.2011, 13:34
Team Member


Joined: 2010-08-26
Posts: 258

Status: Offline
Peronsally I disable it from starting with
      Code:
update-rc.d apache2 disable

and then just use it's initscript instead to start|stop it when I want:

      Code:
service apache2 start

or
      Code:
/etc/init.d/apache2 start


Are you just calling apachectl without any arguments or with arguments but not start as the first one?
      Code:
apachectl start

should have made /var/run/apache2 but I think none of the other ways of calling apachectl will do it (apart from adding options after start).
 
 View user's profile Send private message  
Reply with quote Back to top
darioOffline
Post subject:   PostPosted: 17.05.2011, 14:35



Joined: 2010-11-27
Posts: 63

Status: Offline
I used to start it using:

      Code:

apachectl graceful


now i tried apachectl start and it works, i'm very sorry (need an auto-facepalm smiley) for the stupid question, i didn't try this but only "apachectl restart", i was convinced that the result of "restart" was the same as calling "stop" and after "start".
However, thank you very much!
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio