My Oracle Support Banner

Spacewalk: Client Registration Failed with "Error communicating with server" and "AttributeError: DB_HOST" (Doc ID 2658248.1)

Last updated on MAY 08, 2020

Applies to:

Linux OS - Version Oracle Linux 6.0 and later
Linux x86-64

Symptoms

When trying to register a client machine with the spacewalk server, rhnreg_ks command fails with the below error messages.

[root@<spacewalk client hostname> rhn]# rhnreg_ks --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --serverUrl=http://<Your spacewalk Server IP or hostname>/XMLRPC --activationkey=<Your Activiation Key> --force
An error has occurred:
Error communicating with server. The message was:
Internal Server Error
See /var/log/up2date for more information

 

-- /var/log/up2date (On spacewalk Client Machine) 

[Wed Apr 8 01:17:08 2020] up2date A protocol error occurred: Internal Server Error , attempt #1,
[Wed Apr 8 01:17:08 2020] up2date
Traceback (most recent call last):
File "/sbin/rhnreg_ks", line 217, in <module>cli.run()
File "/usr/share/rhn/up2date_client/rhncli.py", line 96, in run sys.exit(self.main() or 0)
File "/sbin/rhnreg_ks", line 95, in main rhnreg.getCaps()
File "/usr/share/rhn/up2date_client/rhnreg.py", line 264, in getCaps s.capabilities.validate()
File "/usr/share/rhn/up2date_client/rhnserver.py", line 185, in __get_capabilities self.registration.welcome_message()
File "/usr/share/rhn/up2date_client/rhnserver.py", line 67, in __call__return rpcServer.doCall(method, *args, **kwargs)
File "/usr/share/rhn/up2date_client/rpcServer.py", line 290, in doCall raise_with_tb(up2dateErrors.CommunicationError(e.errmsg))
File "/usr/share/rhn/up2date_client/rpcServer.py", line 214, in doCall ret = method(*args, **kwargs)
File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__return self.__send(self.__name, args)
File "/usr/share/rhn/up2date_client/rpcServer.py", line 48, in _request1 ret = self._request(methodname, params)
File "/usr/lib/python2.7/site-packages/rhn/rpclib.py", line 394, in _request self._handler, request, verbose=self._verbose)
File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 177, in request headers, fd = req.send_http(host, handler)
File "/usr/lib/python2.7/site-packages/rhn/transports.py", line 740, in send_http response.status, response.reason, response.msg)
<class 'up2date_client.up2dateErrors.CommunicationError'>: rhn-plugin: Error communicating with server. The message was: Internal Server Error

-- /var/log/httpd/error_log (On spacewalk server)

[Wed Apr 08 01:06:20.781963 2020] [:error] [pid 30191] [client <IP>:51669] mod_wsgi (pid=30191): Exception occurred processing WSGI script '/usr/share/rhn/wsgi/xmlrpc.py'.
[Wed Apr 08 01:06:20.782115 2020] [:error] [pid 30191] [client <IP>:51669] Traceback (most recent call last):
[Wed Apr 08 01:06:20.782158 2020] [:error] [pid 30191] [client <IP>:51669] File "/usr/share/rhn/wsgi/xmlrpc.py", line 22, in application
[Wed Apr 08 01:06:20.782202 2020] [:error] [pid 30191] [client <IP>:51669] return wsgiHandler.handle(environ, start_response, "xmlrpc", "server.xmlrpc")
[Wed Apr 08 01:06:20.782220 2020] [:error] [pid 30191] [client <IP>:51669] File "/usr/share/rhn/wsgi/wsgiHandler.py", line 36, in handle
[Wed Apr 08 01:06:20.782244 2020] [:error] [pid 30191] [client <IP>:51669] ret = parseServ(req)
[Wed Apr 08 01:06:20.782260 2020] [:error] [pid 30191] [client <IP>:51669] File "/usr/lib/python2.7/site-packages/spacewalk/server/apacheHandler.py", line 87, in headerParserHandler
[Wed Apr 08 01:06:20.782287 2020] [:error] [pid 30191] [client <IP>:51669] rhnSQL.initDB()
[Wed Apr 08 01:06:20.782302 2020] [:error] [pid 30191] [client <IP>:51669] File "/usr/lib/python2.7/site-packages/spacewalk/server/rhnSQL/__init__.py", line 124, in initDB
[Wed Apr 08 01:06:20.782325 2020] [:error] [pid 30191] [client <IP>:51669] host = CFG.DB_HOST
[Wed Apr 08 01:06:20.782339 2020] [:error] [pid 30191] [client <IP>:51669] File "/usr/lib/python2.7/site-packages/spacewalk/common/rhnConfig.py", line 232, in __getattr__
[Wed Apr 08 01:06:20.782361 2020] [:error] [pid 30191] [client <IP>:51669] raise AttributeError(key)
[Wed Apr 08 01:06:20.782390 2020] [:error] [pid 30191] [client <IP>:51669] AttributeError: DB_HOST

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.