[Spacewalk-list] XMLRPC interface problems shortly after startup

Jesus M. Rodriguez jmrodri at gmail.com
Sun Jul 13 00:08:49 UTC 2008


On Sat, Jul 12, 2008 at 3:18 PM, Ian Anderson
<spacewalk-user at linux.on.ca> wrote:
> I've been running into the following problem:
>
> Just after I've started my spacewalk server, I am able to access
> functions through the XMLRPC interface.  However, after a few minutes I
> am unable to use the XMLRPC interface until I restart the tomcat5
> service, after which I can use it for another couple minutes before it
> locks up again.
> The web interface does not seem to be affected by this.
>
> On a related note the spacewalk installation does not appear to include
> the api documentation:
>
> all pages linking from https://192.168.0.5/rhn/apidoc/index.jsp return
> not found. Seems like the entire handlers subdirectory is missing.
>
> My configuration is:
>
> Spacewalk server:
> CentOS 5.2 running under VMWare Server 2.0 RC1
>
> client
> CentOS 5.2 running on bare metal
>
> test script:
>
> #!/usr/bin/env python
> import xmlrpclib
>
> SATELLITE_HOST = "192.168.0.5"
> SATELLITE_URL = "https://%s/rhn/rpc/api" % SATELLITE_HOST
> login = "spacewalk"
> password = "spacewalk"
>
> print SATELLITE_URL
> #connect to the server
> client = xmlrpclib.Server(SATELLITE_URL, verbose=0)
> # get the session key
> key = client.auth.login(login, password)
> # get the list of users
> print client.user.listUsers(key)
> print client.kickstart.listKickstartableChannels(key)
> # list = client.kickstart.listKickstartableChannels(key)
> # for group in list:
> #   print group.get('description')
>
> client.auth.logout(key)
>
> Output (with errors):
>
> https://192.168.0.5/rhn/rpc/api
> Traceback (most recent call last):
>  File "xmlrpctest.py", line 13, in ?
>    key = client.auth.login(login, password)
>  File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
>    return self.__send(self.__name, args)
>  File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
>    verbose=self.__verbose
>  File "/usr/lib/python2.4/xmlrpclib.py", line 1147, in request
>    return self._parse_response(h.getfile(), sock)
>  File "/usr/lib/python2.4/xmlrpclib.py", line 1286, in _parse_response
>    return u.close()
>  File "/usr/lib/python2.4/xmlrpclib.py", line 744, in close
>    raise Fault(**self._stack[0])
> xmlrpclib.Fault: <Fault -1: 'java.lang.IllegalStateException: Stopwatch
> must be reset before being restarted. '>
>
> Any idea what the problem is?
>

Weird, I've never seen that problem before. Seems to be related to the
Stopwatch class we use in the XMLRPC's logging processor. We use it to
print out the timing of apis.

Since we've never run into this before, might be related to Java 1.6. We'll
look at it.

jesus




More information about the Spacewalk-list mailing list