<div dir="ltr">Hi Vipul,<div><br></div><div>Yes, the service is running as evidenced by the output. The problem as shown in the error message was that postgres actually can't update or delete the table stated due to a foreign key constraint validation on a table. </div><div><br></div><div> There's a post on the list about it and the recommendation was to remove it. Any ideas how to remove it from the DB? I'd actually like to log-in to postgres and delete this key being referenced (assuming I know the password for postgres).</div><div><br></div><div>Kind regards,</div><div>Francis</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 17, 2017 at 10:23 PM, Vipul Sharma (GDC) <span dir="ltr"><<a href="mailto:sharma.vipul@in.g4s.com" target="_blank">sharma.vipul@in.g4s.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hey,<br><br></div>When you are running step 8 - Make sure spacewalk service is running, I'm hoping you've must have stopped the service. Service is important to push the data to postgres.<br><br></div>Thanks<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">    V<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 17, 2017 at 3:28 PM, Francis Lee Mondia <span dir="ltr"><<a href="mailto:endace.francis.mondia@gmail.com" target="_blank">endace.francis.mondia@gmail.<wbr>com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Vipul,<div><br></div><div>Thanks for the response.</div><div><br></div><div>Still the same, I'm failing on step 8 on this guide (<a href="https://github.com/spacewalkproject/spacewalk/wiki/ChangeCaCert" target="_blank">https://github.com/spacewalkp<wbr>roject/spacewalk/wiki/ChangeCa<wbr>Cert</a>):</div><div><br></div><div><div>[root@spw01 ~]# rhn-ssl-dbstore -vvv --ca-cert /root/ssl-build/RHN-ORG-TRUSTE<wbr>D-SSL-CERT</div><div>Public CA SSL certificate:  /root/ssl-build/RHN-ORG-TRUST<wbr>ED-SSL-CERT</div><span><div><br></div><div>ERROR: unhandled exception occurred:</div><div>Traceback (most recent call last):</div><div>  File "/usr/bin/rhn-ssl-dbstore", line 43, in <module></div><div>    sys.exit(abs(mod.main() or 0))</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/satellite_tools/<wbr>rhn_ssl_dbstore.py", line 79, in main</div><div>    satCerts.store_rhnCryptoKey(va<wbr>lues.label, values.ca_cert, verbosity=values.verbose)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/satellite_tools/<wbr>satCerts.py", line 673, in store_rhnCryptoKey</div><div>    verbosity=verbosity)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/satellite_tools/<wbr>satCerts.py", line 614, in _checkCertMatch_rhnCryptoKey</div><div>    h.execute(rhn_cryptokey_id=rhn<wbr>_cryptokey_id)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/server/rhnSQL/sq<wbr>l_base.py", line 153, in execute</div><div>    return apply(self._execute_wrapper, (self._execute, ) + p, kw)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/server/rhnSQL/dr<wbr>iver_postgresql.py", line 290, in _execute_wrapper</div><div>    retval = apply(function, p, kw)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/server/rhnSQL/sq<wbr>l_base.py", line 207, in _execute</div><div>    return self._execute_(args, kwargs)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/server/rhnSQL/dr<wbr>iver_postgresql.py", line 309, in _execute_</div><div>    self._real_cursor.execute(self<wbr>.sql, params)</div><div>psycopg2.IntegrityError: update or delete on table "rhncryptokey" violates foreign key constraint "rhn_csssl_cacertid_fk" on table "rhncontentsourcessl"</div><div>DETAIL:  Key (id)=(1) is still referenced from table "rhncontentsourcessl".</div></span></div><div><br></div><div><br></div><div>I think the issue is because the server's RHNS-CA-CERT is expired. I found this [<a href="https://www.centos.org/forums/viewtopic.php?t=49388" target="_blank">https://www.centos.org/forums<wbr>/viewtopic.php?t=49388</a>] but it's referencing a red hat article which is for RHEL 5. </div><div><br></div><div>Where do I get an updated RHNS-CA-CERT? </div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-9133279859230167586h5">On Sun, Jul 16, 2017 at 10:53 AM, Vipul Sharma (GDC) <span dir="ltr"><<a href="mailto:sharma.vipul@in.g4s.com" target="_blank">sharma.vipul@in.g4s.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-9133279859230167586h5"><div dir="ltr">I completely forgot one thing --<div><br></div><div><b>In the above given command - --set-org-unit  should be same as --set-common-name. They should be the FQDN only.</b></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sun, Jul 16, 2017 at 4:20 AM, Vipul Sharma (GDC) <span dir="ltr"><<a href="mailto:sharma.vipul@in.g4s.com" target="_blank">sharma.vipul@in.g4s.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><div dir="ltr">Hi Francis,<div><br></div><div>In order to configure Spacewalk successfully - Follow these steps -</div><div><br></div><div>Make sure your <b>Hostname & FQDN are same.</b></div><div><b><br></b></div><div><b>ex - HOSTNAME = <a href="http://abc.abc.com" target="_blank">abc.abc.com</a> </b></div><div><b>       FQDN = </b><b><a href="http://abc.abc.com" target="_blank">abc.abc.com</a></b></div><div><b><br></b></div><div><b>Now,</b></div><div><b><br></b></div><div>Regenerate all the Certs & Keys --</div><div><br></div><div><div><b>* First change the hostname to FQDN</b></div><div><br></div><div>/usr/bin/rhn-ssl-tool --gen-ca --set-country="abc"  --set-state="abc" --set-city="abc" --set-org="abc" --set-org-unit="<a href="http://abc.com" target="_blank">abc.com</a>" --set-common-name="abc" --set-email="<a href="http://admin.com" target="_blank">admin.com</a>" --force</div></div><div><br></div><div><div><b>*To generate new web-server keys --</b></div><div><br></div><div>/usr/bin/rhn-ssl-tool --gen-server --set-country="abc"  --set-state="abc" --set-city="abc" --set-org="abc" --set-org-unit="<a href="http://abc.com" target="_blank">abc.com</a>" --set-email="<a href="http://admin.com" target="_blank">admin.com</a>"</div></div><div><b><br></b></div><div><div><b>*How to update the changes made to CA and web-server --</b></div><div><br></div><div><a href="https://github.com/spacewalkproject/spacewalk/wiki/ChangeCaCert" target="_blank">https://github.com/spacewalkpr<wbr>oject/spacewalk/wiki/ChangeCaC<wbr>ert</a></div></div><div><br></div><div>Thanks</div><span class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183m_-8645315428319374864HOEnZb"><font color="#888888"><div>    V</div></font></span></div></span><div class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183m_-8645315428319374864HOEnZb"><div class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183m_-8645315428319374864h5"><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sun, Jul 16, 2017 at 2:00 AM, Francis Lee Mondia <span dir="ltr"><<a href="mailto:endace.francis.mondia@gmail.com" target="_blank">endace.francis.mondia@gmail.c<wbr>om</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span>Hi Michael,<div><br></div><div>Thanks for the reply!</div><div><br></div><div>On the following suggestions:</div><div>1. Upgrade to latest version - definitely but I want to settle the SSL issue first (might just do this next week though if SSL isn't resolved)</div><div>2. Spacewalk-hostname-rename</div></span><div>- I've done this but haven't resolved the issue. Had to google how to install the certificate which led me to <span class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRSpan" id="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRSpan_45"><img class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRWebRatingIcon" style="width:16px;height:16px;border:0px"></span><a href="https://access.redhat.com/solutions/10809" style="background-color:rgb(184,234,184)" target="_blank">https://access.redhat.com/solu<wbr>tions/10809</a> </div><div><div class="m_-9133279859230167586m_-6107321330076495836h5"><div>-  Followed that guide in just installing the certificate (copying rpms, re-installing, etc)  but decided to do the the whole shebang instead after encountering the same issue</div><div>- now I'm stuck with this:</div><div><br></div><div><div>[root@spacewalkserver ~]# rhn-ssl-dbstore --ca-cert=/var/www/html/pub/RH<wbr>N-ORG-TRUSTED-SSL-CERT -vvvvvvvv</div><div>Public CA SSL certificate:  /var/www/html/pub/RHN-ORG-TRU<wbr>STED-SSL-CERT</div><div>Nothing to do: certificate to be pushed matches certificate in database.</div><div>Nothing to do: certificate to be pushed matches certificate in database.</div><div><br></div><div>ERROR: unhandled exception occurred:</div><div>Traceback (most recent call last):</div><div>  File "/usr/bin/rhn-ssl-dbstore", line 43, in <module></div><div>    sys.exit(abs(mod.main() or 0))</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/satellite_tools/<wbr>rhn_ssl_dbstore.py", line 79, in main</div><div>    satCerts.store_rhnCryptoKey(va<wbr>lues.label, values.ca_cert, verbosity=values.verbose)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/satellite_tools/<wbr>satCerts.py", line 673, in store_rhnCryptoKey</div><div>    verbosity=verbosity)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/satellite_tools/<wbr>satCerts.py", line 614, in _checkCertMatch_rhnCryptoKey</div><div>    h.execute(rhn_cryptokey_id=rhn<wbr>_cryptokey_id)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/server/rhnSQL/sq<wbr>l_base.py", line 153, in execute</div><div>    return apply(self._execute_wrapper, (self._execute, ) + p, kw)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/server/rhnSQL/dr<wbr>iver_postgresql.py", line 290, in _execute_wrapper</div><div>    retval = apply(function, p, kw)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/server/rhnSQL/sq<wbr>l_base.py", line 207, in _execute</div><div>    return self._execute_(args, kwargs)</div><div>  File "/usr/lib/python2.6/site-packa<wbr>ges/spacewalk/server/rhnSQL/dr<wbr>iver_postgresql.py", line 309, in _execute_</div><div>    self._real_cursor.execute(self<wbr>.sql, params)</div><div>psycopg2.IntegrityError: update or delete on table "rhncryptokey" violates foreign key constraint "rhn_csssl_cacertid_fk" on table "rhncontentsourcessl"</div><div>DETAIL:  Key (id)=(1) is still referenced from table "rhncontentsourcessl".</div><div><br></div></div><div><br></div></div></div><div>- I've found this: [<span class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRSpan" id="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRSpan_46"><img class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRWebRatingIcon" style="width:16px;height:16px;border:0px"></span><a href="https://www.redhat.com/archives/spacewalk-list/2016-January/msg00046.html" style="background-color:rgb(184,234,184)" target="_blank">https://www.redhat.com/archiv<wbr>es/spacewalk-list/2016-January<wbr>/msg00046.html</a>] which states I should remove the assignment first. THIS I DON'T KNOW HOW TO DO.</div><div>- I think it's this [<span class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRSpan" id="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRSpan_47"><img class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRWebRatingIcon" style="width:16px;height:16px;border:0px"></span><a href="http://gatwards.org/techblog/replacing-spacewalk-ssl-certificates" style="background-color:rgb(184,234,184)" target="_blank">http://gatwards.org/techblog/<wbr>replacing-spacewalk-ssl-certif<wbr>icates</a>] shows how to do it but I'm adamant to delete the only pair on it. I've deleted all expired certs before. </div><div><div class="m_-9133279859230167586m_-6107321330076495836h5"><div><br></div><div>Thanks in advance.</div><div><br></div><div>Kind regards,</div><div>Francis</div></div></div></div><div class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183m_-8645315428319374864m_2373334448812464250HOEnZb"><div class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183m_-8645315428319374864m_2373334448812464250h5"><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-9133279859230167586m_-6107321330076495836h5">On Fri, Jul 14, 2017 at 11:35 PM, Michael Mraka <span dir="ltr"><<a href="mailto:michael.mraka@redhat.com" target="_blank">michael.mraka@redhat.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-9133279859230167586m_-6107321330076495836h5">Francis Lee Mondia:<br>
<span>> Hi All,<br>
><br>
> Sorry for this seemingly noob question but I'm new to spacewalk and just<br>
> inherited a system which was not being used for about 2 years and now I've<br>
> been tasked to revive it.<br>
<br>
</span>Hi,<br>
<br>
First of all I'd suggest upgrade to latest Spacewalk (2.6) because there<br>
were a lot of bugs fixed since then (including security issues).<br>
<span><br>
> So I've got the system running, updated the channels, repos and now came<br>
> the process of re-adding hosts to the system. I was being shown the SSL<br>
> certicate error as I think the certificate has expired. I can register<br>
> hosts fine without SSL, and can push package updates to hosts fine without<br>
> it. I do want to resolve this though moving forward. I've tried the<br>
> numerous suggestions I can find (we have a red hat subscription so was able<br>
> to try their solutions too but none worked).<br>
<br>
</span>Install spacewalk-utils package and run spacewalk-hostname-rename script.<br>
It will regenerate all SSL certs.<br>
<span><br>
> I'd also like to know though if upgrading spacewalk to a newer version<br>
> install a new SSL cert. When we first took a look at the system, we<br>
<br>
</span>AFAIR upgrade will not change SSL certs.<br>
<span><br>
> couldn't log-in as the satellite certificate was expired and we had to<br>
> generate one from red hat support to be able to log back in.<br>
><br>
> Hoping for some guidance on this from the community.<br>
><br>
> Kind regards,<br>
> Francis<br>
<br>
</span>Regards,<br>
<br>
<br>
--<br>
Michael Mráka<br>
System Management Engineering, Red Hat<br>
<br>
______________________________<wbr>_________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
</div></div><span class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRSpan" id="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRSpan_48"><img class="m_-9133279859230167586m_-6107321330076495836m_1427753393284844183TSRWebRatingIcon" style="width:16px;height:16px;border:0px"></span><a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" rel="noreferrer" style="background-color:rgb(184,234,184)" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/spacewalk-list</a></blockquote></div><br></div>
</div></div><span><br>______________________________<wbr>_________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/spacewalk-list</a><br></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div><div class="m_-9133279859230167586m_-6107321330076495836HOEnZb"><div class="m_-9133279859230167586m_-6107321330076495836h5">

<br>
<div><font size="1"><font style="line-height:21px;background-color:rgb(255,255,255)" face="Verdana" color="green"><br></font></font></div><font size="1"><font style="line-height:21px;background-color:rgb(255,255,255)" face="Verdana" color="green">Please consider the environment before printing this email.</font><font style="line-height:21px;background-color:rgb(255,255,255)" face="Verdana" color="gray"><br>******************************<wbr>******************************<wbr>*********<br>This communication may contain information which is confidential, personal and/or privileged. It is for the exclusive use of the intended recipient(s).<br>If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited. If you have received it in error please contact the sender immediately by return e-mail. Please then delete the e-mail and any copies of it and do not use or disclose its contents to any person.<br>Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them. Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.<br>This message has been checked for viruses on behalf of the company.<br>******************************<wbr>******************************<wbr>*********</font><font style="line-height:21px;background-color:rgb(255,255,255)" face="Verdana" color="gray"><br><br></font></font></div></div></blockquote></div><br></div>
</blockquote></div><br></div>

<br>
<div><font size="1"><font face="Verdana" color="green" style="line-height:21px;background-color:rgb(255,255,255)"><br></font></font></div><font size="1"><font face="Verdana" color="green" style="line-height:21px;background-color:rgb(255,255,255)">Please consider the environment before printing this email.</font><font face="Verdana" color="gray" style="line-height:21px;background-color:rgb(255,255,255)"><br>******************************<wbr>******************************<wbr>*********<br>This communication may contain information which is confidential, personal and/or privileged. It is for the exclusive use of the intended recipient(s).<br>If you are not the intended recipient(s), please note that any distribution, forwarding, copying or use of this communication or the information in it is strictly prohibited. If you have received it in error please contact the sender immediately by return e-mail. Please then delete the e-mail and any copies of it and do not use or disclose its contents to any person.<br>Any personal views expressed in this e-mail are those of the individual sender and the company does not endorse or accept responsibility for them. Prior to taking any action based upon this e-mail message, you should seek appropriate confirmation of its authenticity.<br>This message has been checked for viruses on behalf of the company.<br>******************************<wbr>******************************<wbr>*********</font><font face="Verdana" color="gray" style="line-height:21px;background-color:rgb(255,255,255)"><br><br></font></font></div></div></blockquote></div><br></div>