啓動 WLS 時的身份驗證錯誤 .

問題描述
WebLogic Server 不啓動,並拋出與管理密碼、管理受權或 LDAP 有關的錯誤。
 java

 

故障排除
請注意,並不是下面全部任務都須要完成。有些問題僅經過執行幾項任務就能夠解決。web

快速連接
•爲何發生此問題?
◦啓動身份無效(WLS 7.0 和 WLS 8.1)
◦內嵌的 LDAP:丟失管理密碼(WLS 7.0 和 WLS 8.1)
◦內嵌的 LDAP:更改管理密碼後被管服務器不啓動(WLS 7.0 和 WLS 8.1)
◦WebLogic 服務器與 LDAP 服務器鏈接失敗(WLS 7.0 和 WLS 8.1)
◦LDAP 服務器:鏈接錯誤(WLS 7.0 和 WLS 8.1)
◦LDAP 服務器:WebLogic 管理用戶啓動服務器時被拒絕(WLS 7.0 和 WLS 8.1)
◦WebLogic 做爲 NT 服務:錯誤 1058
◦WebLogic 做爲 NT 服務:錯誤 1067
◦File Realm 中的系統用戶密碼損壞 (WLS 6.1)
•如何設置調試標誌
 安全

•已知的 WebLogic Server 問題 服務器

爲何發生此問題?
要啓動 WebLogic Server 實例,必須提供擁有服務器啓動權限的用戶的 Credential。
將根據某個安全 Realm(即 File Realm、LDAP、RDBMS LDAP 等)檢查 Credential。若是啓動時提供的信息與安全 Realm 中的信息不匹配,或安全 Realm 損壞,WebLogic Server 將不會啓動。dom

下面是在若干種狀況下查明故障和解決問題的方法。ide

啓動身份無效(WLS 7.0 和 WLS 8.1)
啓動 WebLogic Server 時拋出如下錯誤:
 
The WebLogic Server did not start up properly.
Reason: weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid;
 
該錯誤代表啓動身份文件 (boot.properties) 中的用戶名和/或密碼無效。多是在建立啓動身份文件後更改過啓動身份。請使用正確的用戶名和密碼編輯和更新啓動身份文件。首次使用更新後的啓動身份文件啓動服務器時會將這些新值加密。
解決方法:
以明文形式更改 boot.properties 中的參數值。「boot.properties」一般位於域根目錄中。
例如:
 
username=weblogic
password=weblogic812
設置屬性後,從新啓動服務器。
返回頁首工具

內嵌的 LDAP:丟失管理密碼(WLS 7.0 和 WLS 8.1)ui

管理密碼已丟失。加密

解決方法:
因爲沒有覆蓋用戶 ID 密碼的方法,所以必須建立新的管理員用戶 ID,而後使用它來啓動 WebLogic。如下是丟失管理員密碼後恢復管理用戶的步驟。
假定建立了一個用戶 ID「adminuser」,密碼是「weblogic」 調試

1.將目錄更改成域目錄:cd mydomain
2.java -cp D:/bea/weblogic615/server/lib/weblogic.jar weblogic.security.utils.AdminAccount adminuser weblogic . (注意:命令的末尾有一個句點)
3.rm myserver/ldap/DefaultAuthenticatormyrealmInit.initialized
4.rm boot.properties(若是有)
5.以「adminuser」爲管理員用戶 ID 從新啓動管理服務器
返回頁首  
內嵌的 LDAP:更改管理密碼後被管服務器沒法啓動(WLS 7.0 和 WLS 8.1)
WebLogic Server 沒法正常啓動。
拋出了異常:
 
weblogic.management.configuration.ConfigurationException: [Configuration Management:150021]The admin
server failed to authenticate the identity of the user weblogic starting the managed server. The reason for the error is .
 
解決方法:
若是更改管理密碼時被管服務器有故障,就會出現該異常。
刪除被管服務器中的 ldap 目錄。
LDAP 目錄位於被管根目錄下,名稱是 ldap。
若是被管服務器名稱爲 myManaged1,則 LDAP 目錄將是 ./myManaged1/ldap


WebLogic Server 與 LDAP 服務器鏈接失敗
拋出錯誤,說明 WLS 與 LDAP 服務器鏈接失敗。可能的成因是 LDAP Server 未啓動或主機地址和/或端口無效 

 
<13 juil. 2004 16 h 42 CEST> <Debug> <SecurityDebug> <000000> <new LDAP connection to host localhost port 389 use local connection is false>
<13 juil. 2004 16 h 42 CEST> <Debug> <SecurityDebug> <000000> <created new LDAP connection LDAPConnection { ldapVersion:2 bindDN:""}>
<13 juil. 2004 16 h 42 CEST> <Debug> <SecurityDebug> <000000> <connection failed netscape.ldap.LDAPException: failed to connect to server ldap://localhost:389 (91)>

 
解決方法:

•驗證 LDAP 服務器是否已啓動
•驗證主機地址和端口是否有效
返回頁首

LDAP 服務器:鏈接錯誤(錯誤 49)

 
<30 juin 2004 15 h 07 CEST> <Debug> <SecurityDebug> <000000> <new LDAP connection to host localhost port 389 use local connection is false>
<30 juin 2004 15 h 07 CEST> <Debug> <SecurityDebug> <000000> <created new LDAP connection LDAPConnection { ldapVersion:2 bindDN:""}>
<30 juin 2004 15 h 07 CEST> <Debug> <SecurityDebug> <000000> <connection failed netscape.ldap.LDAPException: error result (49)>

 
解決方法:
提供的用於鏈接 LDAP 服務器的用戶 ID 無效。
檢查 config.xml 並驗證如下參數:
  Credential="weblogic"
  Principal="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot"  
       <weblogic.security.providers.authentication.IPlanetAuthenticator
            ControlFlag="SUFFICIENT"
            Credential="weblogic"
            GroupBaseDN="ou=groups"
            Name="Security:Name=RealmIPlanetAuthenticator"
            Principal="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot"
            Realm="Security:Name=Realm" UserBaseDN="dc=bea,dc=com"/>

 

 

要解決該問題,請使用如下方法之一更正 uid 或密碼 (Credential),而後從新啓動 WebLogic Server。

1.編輯 config.xml 並更改 uid 或密碼,而後從新啓動
2.將 config.xml.booted 複製到 config.xml,從新啓動服務器,而後更改 Credential(uid/密碼)

返回頁首

LDAP 服務器:WebLogic 管理用戶啓動服務器時被拒絕
WebLogic Server 管理用戶在啓動服務器時可能遭到拒絕。三個可能的成因以下:

1.與 LDAP 鏈接時發生錯誤 32
2.與 LDAP 鏈接時身份驗證失敗
3.不容許用戶 XXXXXX 啓動服務器

1. 與 LDAP 鏈接時發生錯誤 32
 
<30 juin 2004 15 h 10 CEST> <Debug> <SecurityDebug> <000000> <connection succeeded>
<30 juin 2004 15 h 10 CEST> <Debug> <SecurityDebug> <000000> <DN for user weblogic: uid=weblogic,dc=bea,dc=com>
<30 juin 2004 15 h 10 CEST> <Debug> <SecurityDebug> <000000> <search("ou=groups", "(&(uniquemember=uid=weblogic,dc=bea,d
c=com)(objectclass=groupofuniquenames))", base DN & below)>
<30 juin 2004 15 h 10 CEST> <Debug> <SecurityDebug> <000000> <returnConnection conn:LDAPConnection {ldap://localhost:389
 ldapVersion:3 bindDN:"uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot"}>
netscape.ldap.LDAPException: error result (32)

 

 

解決方法:
在 LDAP 中未找到 WebLogic 應在與 LDAP 鏈接時使用的 LDAP 用戶(本例中爲「weblogic」),所以必須建立該用戶。

關於建立用戶 ID 的方法,請參考 LDAP 服務器文檔。

2. 與 LDAP 鏈接時身份驗證失敗
 
<30 juin 2004 15 h 29 CEST> <Debug> <SecurityDebug> <000000> <returnConnection conn:LDAPConnection {ldap://localhost:389
 ldapVersion:3 bindDN:"uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot"}>
javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User admin denied

 

 

解決方法:
config.xml. 中的管理用戶密碼錯誤。

更改 config.xml 中的「credential」以使用正確的密碼。

<weblogic.security.providers.authentication.IPlanetAuthenticator
            Credential="weblogic"  

3. 不容許用戶 XXXXXX 啓動服務器
 
<30 juin 2004 16 h 40 CEST> <Critical> <Security> <BEA-090404> <User weblogic is not permitted to boot the server;
The server policy may have changed in such a way that the user is no longer able to boot the server.
Reboot the server with the administrative user account or contact the system administrator to update the server policy definitions.>

 

 

解決方法:
LDAP 管理員組中沒有與 LDAP 鏈接所使用的 LDAP 用戶「weblogic」。
將此用戶添加到管理員組。有關說明,請參考 LDAP 文檔。

返回頁首

WebLogic 做爲 NT 服務:錯誤 1058
WLS 沒法在 Windows 2000 上做爲 Windows NT 服務啓動,併產生如下錯誤:
「Could not start the <Service Name> service on //<Computer Name>.Error 1058:The specified service is disabled and cannot be started.」

解決方法:
爲該服務啓用 Windows 硬件配置文件。
如下是在 Windows 2000 上啓用的操做步驟:

1.依次單擊「開始」、「設置」、「控制面板」、「管理工具」、「服務」。
2.在「服務」窗口中,右鍵單擊相應的服務,而後選擇「屬性」。
3.單擊「登陸」選項卡,在窗口底部的白色區域中,能夠將每一個硬件配置文件在「已啓用」和「已禁用」間切換。經過單擊將相應的配置文件設置爲「已啓用」。
Microsoft 知識庫文章 175155(位於 http://support.microsoft.com/kb/q175155/)也介紹了以上步驟。

WebLogic 做爲 NT 服務:錯誤 1067
將 WLS 域做爲 NT 服務安裝後,啓動它時發生「Microsoft Error: 1067」。
此錯誤提供的只是通常性信息,未提供任何與真正問題有關的線索。下面的狀況可能會致使此「1067」錯誤及 WebLogic Server 沒法做爲服務正常啓動。
CONFIGURATION:安裝在 Windows NT 上的 WLS 6.x、7.x。

解決方法:
服務繼承系統屬性。若是系統 PATH 變量中有空格,服務就沒法啓動。舉一個例子,下面是系統路徑的一個片斷:「C:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin;」。Visual Studio 目錄名中的空格會致使 beasvc 產生「1067」非描述性錯誤而啓動失敗。

清理系統 PATH 環境變量,使之不包含空格。

返回頁首

File Realm 中的系統用戶密碼 (WLS 6.1)
WebLogic Server 不能正常啓動。

 
Exception raised:
java.lang.SecurityException: Authentication for user system denied
        at weblogic.security.SecurityService.initializeSuid(SecurityService.java:410)
        at weblogic.security.SecurityService.initialize(SecurityService.java:120)
        at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:421)
        at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:213)
        at weblogic.Server.main(Server.java:35)
Reason: Fatal initialization exception

 

 

解決方法:
File Realm 中的系統用戶密碼因爲某種緣由在客戶域中損壞,於是 WebLogic Server 沒法啓動。

建立 fileRealm.properties 和 SerializedSystemIni.dat(位於域根目錄中)的備份。
若是有能夠成功啓動的域,請將正常域中的如下文件複製到問題域:

1.fileRealm.properties
2.SerializedSystemIni.dat

備註:因爲加密/解密須要由以上文件共同完成,所以兩個文件都必須複製,才能使加密/解密正常進行。
返回頁首

 

 

如何設置調試標誌
設置調試標誌有助於解決許多 LDAP 問題。編輯 config.xml 文件並添加如下屬性:
    StdoutDebugEnabled="true" StdoutSeverityLevel="64"
    <ServerDebug DebugSecurityAdjudicator="true" DebugSecurityAtn="true"
        DebugSecurityAtz="true" DebugSecurityRoleMap="true" Name="myserver"/>
以下面所示:

 
   <Server ListenAddress="" ListenPort="6151" Name="myserver"
        NativeIOEnabled="true" ReliableDeliveryPolicy="RMDefaultPolicy"
        ServerVersion="8.1.2.0" StdoutDebugEnabled="true" StdoutSeverityLevel="64">
        <SSL Enabled="false" HostnameVerificationIgnored="false"
            IdentityAndTrustLocations="KeyStores" Name="myserver"/>
        <ServerDebug DebugSecurityAdjudicator="true"
            DebugSecurityAtn="true" DebugSecurityAtz="true"
            DebugSecurityRoleMap="true" Name="myserver"/>
    </Server>
    <ServerDebug DebugSecurityAdjudicator="true" DebugSecurityAtn="true"
        DebugSecurityAtz="true" DebugSecurityRoleMap="true" Name="myserver"/>

 

 

已知的 WebLogic Server 問題

CR076945 (English)  WLS 7.0 - 因爲 LDAP 文件可能已損壞而沒法啓動 WLS。

此外,您能夠按期查看所用 WLS 版本的「Release Notes」,瞭解 Service Pack 中的「Known Issues」或「Resolved Issues」的詳細信息及瀏覽與身份驗證有關的問題。  方便起見,下面提供了這些發行說明的連接:

•WLS 8.1 Release Notes (English)
•WLS 7.0 Release Notes (English)
•WLS 6.1 Release Notes (English)
使用搜索功能也能夠搜索到「Release Notes」,還能夠搜索到其它支持解決辦法及與 CR 有關的信息,如須要更多幫助?中所提到的內容。若是客戶簽定了技術支持合同,則能夠登陸 http://support.bea.com/,登陸後會看到爲 Solutions 和 Bug Central 提供的 Browse portlet,可在其中按產品版本瀏覽最新提供的 CR。  

相關文章
相關標籤/搜索