[Spacewalk-list] issues with host rename

Gomes, Rich rich.gomes at uniform.aramark.com
Mon Oct 24 14:19:06 UTC 2011


I thought of that but my main hesitation is the issues I have had with
doing scratch installs lately.

All my post rename issues have been able to be remedied by editing
files, hoping the same would apply here.

 

 

From: spacewalk-list-bounces at redhat.com
[mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Larry Letelier
Sent: Monday, October 24, 2011 9:50 AM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] issues with host rename

 

Rich, 

Can you re-install spacewsalk completly, 
this time with the correct FQDN ?

-- Larry

On 24/10/11 10:56, Gomes, Rich wrote: 

I have not been able to find anything on the python errors listed below.
(I did find a previous thread from the list discussing the issue, but
with no fix) 

  

Has anyone been successful in fixing this? 

  

  

  

Thanks, 

Rich 

  

From: Gomes, Rich 
Sent: Friday, October 21, 2011 11:33 AM
To: spacewalk-list at redhat.com
Subject: RE: [Spacewalk-list] issues with host rename 

  

Getting further but not quite there yet... 

Since the spacewalk-hostname-rename script failed so quickly, I decided
to perform the steps manually: 

https://fedorahosted.org/spacewalk/wiki/How_to_rename_or_change_a_satell
ite_hostname 

  

Once I did that, I re-ran 

spacewalk-setup --disconnected --answer-file=<FILENAME> with my previous
answerfile with new hostname added 

  

Osa-dispatcher would start but would go stale. Log files indicated a bad
password, performed the following: 

  

sbin/service jabberd stop
/sbin/service osa-dispatcher stop
remove jabberd auth db:
rm -Rf /var/lib/jabberd/db/*
/sbin/service jabberd start
/sbin/service osa-dispatcher start 

  

Osa then started without issues. 

  

Presently everything appears to be fine until I try to run 'rhnpush' 

  

Errors in httpd/error_log indicate: 

[Fri Oct 21 11:24:31 2011] [error] [client 127.0.0.1]
PythonHeaderParserHandler
spacewalk.server.apacheServer::HeaderParserHandler: Traceback (most
recent call last): 

[Fri Oct 21 11:24:31 2011] [error] [client 127.0.0.1]
PythonHeaderParserHandler
spacewalk.server.apacheServer::HeaderParserHandler:   File
"/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in
HandlerDispatch\n    result = object(req) 

[Fri Oct 21 11:24:31 2011] [error] [client 127.0.0.1]
PythonHeaderParserHandler
spacewalk.server.apacheServer::HeaderParserHandler:   File
"/usr/lib/python2.4/site-packages/spacewalk/server/apacheHandler.py",
line 73, in headerParserHandler\n    ret =
apacheSession.headerParserHandler(self, req) 

[Fri Oct 21 11:24:31 2011] [error] [client 127.0.0.1]
PythonHeaderParserHandler
spacewalk.server.apacheServer::HeaderParserHandler:   File
"/usr/lib/python2.4/site-packages/spacewalk/common/rhnApache.py", line
75, in headerParserHandler\n    ret = self._init_request_processor(req) 

[Fri Oct 21 11:24:31 2011] [error] [client 127.0.0.1]
PythonHeaderParserHandler
spacewalk.server.apacheServer::HeaderParserHandler:   File
"/usr/lib/python2.4/site-packages/spacewalk/server/apacheHandler.py",
line 109, in _init_request_processor\n    self._req_processor =
apachePOST(self.clientVersion, req) 

[Fri Oct 21 11:24:31 2011] [error] [client 127.0.0.1]
PythonHeaderParserHandler
spacewalk.server.apacheServer::HeaderParserHandler:   File
"/usr/lib/python2.4/site-packages/spacewalk/server/apacheRequest.py",
line 68, in __init__\n    self.parser._parser.returns_unicode = 0 

[Fri Oct 21 11:24:31 2011] [error] [client 127.0.0.1]
PythonHeaderParserHandler
spacewalk.server.apacheServer::HeaderParserHandler: AttributeError:
SgmlopParser instance has no attribute '_parser' 

  

  

All that I have found in googling is to remove the package
'python-sgmlop' and restart Spacewalk services 

I do not have that package installed. 

Is there something else causing the issue or something else I am
missing? 

  

  

  

Thanks, 

Rich 

  

  

  

  

  

From: spacewalk-list-bounces at redhat.com
[mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Gomes, Rich
Sent: Thursday, October 20, 2011 4:19 PM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] issues with host rename 

  

I am still having issues with osa loading the cert. 

  

I went thru every file where I could find the old name and replaced it
with the new name: 

/etc/cobbler/settings 

/etc/pki/spacewalk/jabberd/server.pem 

/var/www/html/pub/RHN-ORG-TRUSTED-SSL-CERT 

/etc/jabberd/c2s.xml-swsave 

/etc/jabberd/sm.xml-swsave 

/etc/sysconfig/rhn/systemid.save 

/etc/pki/tls/certs/spacewalk.crt 

  

  

I am pretty sure that just replacing the name in the certs is not enough
due to the actual hashes not changing. So I ran the following: 

  

rhn-ssl-tool --gen-ca --force --set-common-name="newhostname" 

  

  

Still receiving the error below: 

  

Starting osa-dispatcher: RHN 5802 2011/10/20 16:14:38 -04:00:
('Traceback caught:',) 

RHN 5802 2011/10/20 16:14:38 -04:00: ('Traceback (most recent call
last):\n  File "/usr/share/rhn/osad/jabber_lib.py", line 608, in
connect\n    self.verify_peer(ssl)\n  File
"/usr/share/rhn/osad/jabber_lib.py", line 688, in verify_peer\n    raise
SSLVerifyError("Mismatch: peer name: %s; common name: %s"
%\nSSLVerifyError: Mismatch: peer name: newhostname; common name:
oldhostname.\n',) 

                                                           [FAILED] 

  

  

  

What am I missing here? 

What file is osa pulling the common name from? 

  

  

Thanks, 

Rich 

  

  

  

From: Gomes, Rich 
Sent: Thursday, October 20, 2011 12:39 PM
To: spacewalk-list at redhat.com
Subject: RE: [Spacewalk-list] issues with host rename 

  

Ok, that worked. Thanks!! 

  

Now have an issue when starting osa: 

  

  

Starting osa-dispatcher: RHN 7591 2011/10/20 12:36:08 -04:00:
('Traceback (most recent call last):\n  File
"/usr/share/rhn/osad/jabber_lib.py", line 250, in setup_connection\n
c = self._get_jabber_client(js)\n  File
"/usr/share/rhn/osad/jabber_lib.py", line 307, in _get_jabber_client\n
c.connect()\n  File "/usr/share/rhn/osad/jabber_lib.py", line 564, in
connect\n    jabber.Client.connect(self)\n  File
"/usr/lib/python2.4/site-packages/jabber/xmlstream.py", line 466, in
connect\n    socket.AF_UNSPEC, socket.SOCK_STREAM)\ngaierror: (-2,
\'Name or service not known\')\n',) 

                                                           [  OK  ] 

  

  

  

Thoughts? 

  

From: spacewalk-list-bounces at redhat.com
[mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Larry Letelier
Sent: Thursday, October 20, 2011 11:47 AM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] issues with host rename 

  

On 20/10/11 12:37, Gomes, Rich wrote: 

I am having issues with a SW server (1.5) that I am running. Currently
it is running without issue but there is a need for a name change. 

Since it is a VM, I am cloning it as the new name and then powering off
the original. 

Once the new server is up I do the following: 

  

1 - Change IP to be that of original 

2 - Change hostname in both /etc/hosts and /etc/sysconfig/network 

3 - Reboot and verify name change 

4 - Run spacewalk-hostname-rename script 

  

Each time I receive the following: 

  

[root at newhostname ~]# spacewalk-hostname-rename xx.xx.xx.xx  Validating
IP ... OK ============================================= 

hostname: newhostname 

ip: xx.xx.xx.xx 

============================================= 

Stopping rhn-satellite services ... OK 

Testing DB connection ... ERROR: 

ORA-12505: TNS:listener does not currently know of SID given in connect
descriptor 

  

  

SP2-0306: Invalid option. 

Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}]
[edition=value]] where <logon> ::=
<username>[/<password>][@<connect_identifier>] 

      <proxy> ::=
<proxyuser>[<username>][/<password>][@<connect_identifier>] 

SP2-0306: Invalid option. 

Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}]
[edition=value]] where <logon> ::=
<username>[/<password>][@<connect_identifier>] 

      <proxy> ::=
<proxyuser>[<username>][/<password>][@<connect_identifier>] 

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
FAILED Your database isn't running. 

Fix the problem and run /usr/bin/spacewalk-hostname-rename again 

  

  

  

  

I would think it would be easier to build a new SW server from scratch
but that has not worked out. Every time I try, with version 1.3, 1.4,
and 1.5 everything goes smoothly but Taskomatic service will not stay
running and I have not found a fix for it. 

This server was\is running successfully so I decided to to just clone it
and rename it. 

  

Interestingly, if I change host name back to original, it does me now
good. 

And also, tnsnames and listener.ora both have 'localhost' specified, not
new hostname. 

Changing this to the new hostname does not good either. 

  

  

Has anyone else run into this? 

How can this be fixed? 

  

  

  

Thanks, 

  

Rich 

  

  

  

  

  

  

Rich Gomes | Senior Systems Administrator,  AUCA System Services |
ARAMARK Uniform & Career Apparel 

Tel: 781.763.4508 |  Fax: 781.763.2508 

Rich.Gomes at wearguard-crest.com | www.aramark-uniform.com
<http://www.aramark-uniform.com/>  

  

  

_______________________________________________  
Spacewalk-list mailing list  
Spacewalk-list at redhat.com  
https://www.redhat.com/mailman/listinfo/spacewalk-list  


Rich: 

Try this, 

-> Stop the osa-dispatcher and jabberd service.  
-> #rm -f /var/lib/jabberd/db/*  
   
-> Switch to the oracle user and using sqlplus clear out the client and
dispatcher tables.  
   

   sqlplus $(spacewalk-cfg-get default_db) 

  

   delete from rhnPushDispatcher;  
   delete from rhnpushclient;  
   commit;  
   
   quit  
   
-> Now restart the jabberd and osa-dispatcher services  


Good luck-


-- Larry Letelier 






_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20111024/bde2c683/attachment.htm>


More information about the Spacewalk-list mailing list