Why does Server Admin not show Web anymore?

Markus Ruggiero markus at ruggiero.ch
Fri Jan 19 13:02:32 PST 2007


On 18.01.2007, at 01:19, Dan Shoop wrote:

> At 10:48 PM +0100 1/17/07, Markus Ruggiero wrote:
>> On 17.01.2007, at 20:36, Dan Shoop wrote:
>>
>>> At 5:29 PM +0100 1/17/07, Markus Ruggiero wrote:
>>>
>>>> I was playing with the Application Server in Tiger Server  
>>>> 10.4.8. Just for a first test I startet it from ServerAdmin.app  
>>>> with the setting "Tomcat only". This worked and I could access  
>>>> the default page on port 8080. But then I had to run away  
>>>> because of some time constraints, so I simply stopped the  
>>>> Application Service from ServerAdmin.app and then realised that  
>>>> ServerAdmin.app showed Web service as not available. So I cannot  
>>>> access any Apache config from the ServerAdmin.app anymore,  
>>>> neither are there any logs visible, not even a "Settings" tab  
>>>> and the Start Service button is greyed out. However the server  
>>>> runs and is reachable from the outside with everything. Even  
>>>> after a reboot of the server machine the state is the same.
>>>>
>>>> What can cause ServerAdmin.app to not recognise the Web service  
>>>> anymore and how can I fix this? Have not found anything in the  
>>>> server docs.
>>>>
>>>
>>> What does `apachectl --configtest` say?
>>>
>>
>> It tells me that everything is OK
>> # apachectl configtest
>> Processing config directory: /etc/httpd/sites/*.conf
>> Processing config file: /etc/httpd/sites/ 
>> 0001_192.168.56.101_80_rucotec.ch.conf
>> Processing config file: /etc/httpd/sites/ 
>> 0002_192.168.56.101_80_ruggiero.ch.conf
>> Processing config file: /etc/httpd/sites/ 
>> 0003_192.168.56.101_80_egge-muttenz.ch.conf
>> Processing config file: /etc/httpd/sites/ 
>> 0004_192.168.56.101_80_blindpromo.com.conf
>> Processing config file: /etc/httpd/sites/0005_192.168.56.101_80_it- 
>> teachers.ch.conf
>> Processing config file: /etc/httpd/sites/virtual_host_global.conf
>> [Wed Jan 17 22:39:16 2007] [warn] module WebObjects_module is  
>> already loaded, skipping
>> Syntax OK
>
> Is it, in fact running? If not what does `apachectl start` do for you?
>
>>> Is the Web service not listed in Server Admin or is it just  
>>> failing to become active?
>>>
>>
>> In the left pane where all the services are listed Web has a  
>> _dark_ grey button. No started services have a lighter grey  
>> button, started services are green. When I select the Web service  
>> in the right pane detail view is shown. At the top it reads Web  
>> Service is: not available. At the bottom there are only 3 tabs  
>> (Overview, Logs, and Graphs) while the Configure tab is missing  
>> completely. At the very top of the window in the button bar the  
>> Start Service button is inactive (grayed out) and cannot be clicked.
>
> This sounds ,ore like a problem with Server Admin than with your  
> web server. Have you repaired permissions? Often the Server Admin  
> files and modules get munged.
>
>> May! what did I break here? I can manually start/stop Apache from  
>> the command line and everything is fine.
>
> Ah, then this isn't a web server problem but a Server Admin problem  
> like I suspected. Again, try repairing permissions and/or make sure  
> the module for the web in Server Admin is OK.
>
>>  All the virtual hosts are reachable and everything looks good.  
>> Just ServerAdmin.app does not see the service.
>
> Because it's become lame.

No, it did not become lame - things are much weirder, but I cold fix  
things. So let me tell you, what really happened:

When I was going to run my little experiments with Tomcat I realised  
that I needed version 5+ of Tomcat but Tiger Server is on version  
4.1. So I simply downloaded the V5 distro and put that into /Libraray/ 
Tomcat on the server after renaming the original Tomact to Tomcat_41.  
Created a symlink to v5. When I started Tomcat from the  
ServerAdmin.app it came up nicely and worked as advertised. After my  
little experiments (for which i had not much time, thus I did not go  
further after having verified that things worked) I shut down Tomcat  
from ServerAdmin.app. Well, that was it then - the Web-part of  
ServerAdmin did not work anymore. Many experiments later (including  
reinstalling the latest combo update in the hope it would fix corrupt  
server admin stuff) I had the idea to try out the command line  
serveradmin. Immediately I got a Cocoa exception. Now I was off to  
fs_usage and all the Apache config files showed up as being read. One  
of the last files in the output of fs_usage was a file in the / 
Library/Tomcat directory tree. This was the indication I needed.  
After restoring the symlink /Library/Tomcat to the version 4 variant  
ServerAdmin.app is up and running again.

Here is the transcript from the command line:

g4server_ROOT> ln -s /Library/Tomcat-5.5.20 /Library/Tomcat
g4server_ROOT> serveradmin status web
2007-01-19 21:55:48.114 serveradmin[1697] Exception in doCommand: ***  
-[NSCFDictionary setObject:forKey:]: attempt to insert nil value
web:error = "NIL_RESPONSE_ERR (*** -[NSCFDictionary  
setObject:forKey:]: attempt to insert nil value)"
g4server_ROOT> rm /Library/Tomcat
g4server_ROOT> ln -s /Library/Tomcat_41 /Library/Tomcat
g4server_ROOT> serveradmin status web
web:state = "RUNNING"
g4server_ROOT>


and the relevant line from fs_usage output

17:44:51.970  open                 [  2]        /Library/ 
Tomcat-5.5.20/blojsom_root/webapps/ROOT/WEB-INF/ 
bootstrap>>>>>>>>>>                         0.000177   serveradmin

Due to time constraints I did not investigate further but I am happy  
that everything is fine again.

---markus---

Don't miss my latest project at http://blindpromo.com

Markus Ruggiero
rucotec consulting and technologies    email      
mailto:markus.ruggiero at rucotec.ch
rucotec GmbH                           web       http://www.rucotec.ch
Steinentorstrasse 8
4051 Basel                             Mobile    +41 (0)79 508 4701
Switzerland                            Phone/Fax +41 (0)61 271 4990




More information about the MacOSX-admin mailing list