天天看點

RHN用戶端注冊的時候報SSL錯誤

RHN Server  資訊:

IP :                192.168.3.2

Hostname:    desktop2.example.com

RHN Client  IP資訊

IP:                  192.168.3.3

Hostname:      buildRPM

1.通過圖形化界面注冊:

[root@buildRPM ~]# rhn_register

按照正常流程操作,報錯

<a target="_blank" href="http://blog.51cto.com/attachment/201307/203349365.jpg"></a>

2.通過激活key注冊

【1】配置/etc/sysconfig/rhn/up2date 中的參數

1

2

3

4

<code>[root@buildRPM ~]</code><code># grep serverURL  /etc/sysconfig/rhn/up2date   |tail -n 1</code>

<code>serverURL=https:</code><code>//desktop2</code><code>.example.com</code><code>/XMLRPC</code>

<code>[root@buildRPM ~]</code><code># grep ssl  /etc/sysconfig/rhn/up2date   |tail -n 1</code>

<code>sslCACert=</code><code>/tmp/RHN-ORG-TRUSTED-SSL-CERT</code>

【2】通過指定激活Key注冊

<code>[root@buildRPM ~]</code><code># rhnreg_ks  --activationkey=2-key401</code>

<code>An error has occurred:</code>

<code>The SSL certificate failed verification.</code>

<code>See </code><code>/var/log/up2date</code> <code>for</code> <code>more</code> <code>information</code>

看到莫有,報錯,不管怎樣,就是注冊不了了,檢視日志檔案也看不出什麼頭緒。

删除/var/www/html/pub目錄中的SSL檔案,重新拷貝,再測試還是不行。

大概知道跟時間是有關系的,準确的說我覺得是跟時區有關系,于是乎檢查了RHN伺服器跟一些用戶端機器上的時間,果然不一樣,然後檢視原因,才知道,用戶端機器是通過 RHN上面的PXE伺服器安裝的,而在配置Kickstart檔案的時候,時區并沒有選擇跟RHN伺服器一樣的時區,比如

RHN 伺服器的時區是 Asia/Shanghai

RHN 用戶端的時區是 America/New_York

kickstart配置的時候時區選擇了 America/New_York,是以裝出來的機器時區必定是這個,是以導緻SSL校驗失敗了。

解決方法:修改時區,修改時間即可。

在RHN伺服器上面配置kickstart檔案的時候,将System Details下的 Locale選項設定成跟RHN伺服器一樣的時區,否則,安裝出來的用戶端機器是不會注冊成功的。

如何檢視目前系統時區:

5

<code>[root@buildRPM ~]</code><code># cat /etc/sysconfig/clock</code>

<code># The time zone of the system is defined by the contents of /etc/localtime.</code>

<code># This file is only for evaluation by system-config-date, do not rely on its</code>

<code># contents elsewhere.</code>

<code>ZONE=</code><code>"Asia/Shanghai"</code>

<code></code>

本文轉自 暗黑魔君 51CTO部落格,原文連結:http://blog.51cto.com/clovemfong/1246705,如需轉載請自行聯系原作者

繼續閱讀