【文章內(nèi)容簡介】
在,我們來看看訪問 WebSphere 應(yīng)用程序的相關(guān)問題及其解決方法 ……169。 2023 IBM Corporation /redbooks International Technical Support Organization如果不能訪問應(yīng)用程序,該怎么辦?178。您試圖訪問應(yīng)用程序,例如:此處的 HTTP 服務(wù)器實(shí)例端口是 10031178。得到以下答復(fù):SRVE0017W: A WebGroup/Virtual Host to handle /snoop has not been defined.The requested URL /snoop was not found on this 178。您需要使用以下檢查列表查明問題所在:216。第一步:檢查應(yīng)用程序是否安裝和啟動(dòng)216。第二步:檢查 WebSphere 端口216。第三步:訪問 WebSphere 內(nèi)部端口上的應(yīng)用216。第四步:檢查上下文根216。第五步:檢查虛擬主機(jī)216。第六步:檢查日志文件(在 “排除故障 ” 部分討論)1 Firefox 瀏覽器中的消息169。 2023 IBM Corporation /redbooks International Technical Support Organization第一步:檢查應(yīng)用程序是否安裝和啟動(dòng)178。打開 Web Administration for i5/OS 中的WebSphere profile 頁面178。點(diǎn)擊導(dǎo)航樹中的 Manage Installed Application 178。該應(yīng)用程序的狀態(tài)必須是 Running178。如果不是,執(zhí)行以下步驟:216。選擇應(yīng)用程序并點(diǎn)擊 Properties216。將 Application enablement 變?yōu)? Enabled216。啟動(dòng)應(yīng)用程序169。 2023 IBM Corporation /redbooks International Technical Support Organization第二步:檢查 WebSphere 端口178。下一步檢查要確認(rèn) WebSphere 內(nèi)部端口216。您可在內(nèi)部端口上訪問您的應(yīng)用程序178。點(diǎn)擊導(dǎo)航樹中的 Server Ports 178。您所需要的是標(biāo)為 HTTP 的端口169。 2023 IBM Corporation /redbooks International Technical Support Organization第三步:在 WebSphere 內(nèi)部端口上訪問應(yīng)用程序178。在內(nèi)部端口上訪問您的應(yīng)用程序此處的 WAS 內(nèi)部端口是 50001 178。而不是 此處的 HTTP 服務(wù)器實(shí)例端口是 10031169。 2023 IBM Corporation /redbooks International Technical Support Organization第四步:檢查應(yīng)用程序的上下文根178。上下文根 是服務(wù)器上的所有應(yīng)用構(gòu)件的邏輯位置,例如:/WebSphereBank 是該應(yīng)用的上下文根178。要檢查上下文根,請:216。點(diǎn)擊導(dǎo)航樹中的 Manage Installed Applications216。選擇您的應(yīng)用程序并點(diǎn)擊 Properties1216。點(diǎn)擊 Virtual Host Mapped to Web Modules 標(biāo)簽1 在您選擇了應(yīng)用程序之后才會顯示該按鈕。169。 2023 IBM Corporation /redbooks International Technical Support Organization第五步:檢查虛擬主機(jī)178。虛擬主機(jī)的功能像 IP 過濾器:216。它有一個(gè) 主機(jī)表 和專用服務(wù)器 , IP 地址 /主機(jī)名和端口號在主機(jī)表中的允許訪問 WebSphere 中的應(yīng)用程序178。通過使用多個(gè)虛擬主機(jī),您可將您的系統(tǒng)對客戶端顯示為多個(gè)服務(wù)器WebSphere Application ServerHTTP 服務(wù)器 1虛擬主機(jī) 1:?FirstServer虛擬主機(jī) 2:?SecondServerFirstAppSecondAppHTTP 服務(wù)器 2映射映射x訪問受阻169。 2023 IBM Corporation /redbooks International Technical Support Organization第五步:檢查虛擬主機(jī)(續(xù))178。每個(gè)應(yīng)用程序都被映射到虛擬主機(jī)中178。有兩個(gè)默認(rèn)的虛擬主機(jī):216。default_host – 該主機(jī)用于您的企業(yè)應(yīng)用程序216。admin_host – 該主機(jī)用于 WebSphere 內(nèi)部應(yīng)用程序,不應(yīng)用于企業(yè)應(yīng)用程序178。點(diǎn)擊導(dǎo)航樹中的 Manage Virtual Hosts 178。選擇您的虛擬主機(jī)并點(diǎn)擊 Properties169。 2023 IBM Corporation /redbooks International Technical Support Organization第五步:檢查虛擬主機(jī)(續(xù))178。主機(jī)表顯示 IP 地址 /主機(jī)名和端口號178。您還可看到相關(guān)的 HTTP 服務(wù)器 1。 這是使用 Web Administration for i5/OS 的優(yōu)勢所在 178。如果您希望通過 HTTP 服務(wù)器訪問您的應(yīng)用程序,則它的名稱和端口號必須包含在該主機(jī)表中1 注:只有當(dāng) HTTP 服務(wù)器和 WebSphere profile 在同一服務(wù)器上配置時(shí),這一支持才可使用。169。 2023 IBM Corporation /redbooks International Technical Support Organization檢查列表總結(jié)178。通過使用檢查列表,您可確定訪問應(yīng)用程序時(shí)存在的問題178。如果您對 WebSphere profile 配置進(jìn)行某些改變(例如虛擬主機(jī)表),則需要 重啟 WebSphere profile 和 HTTP 服務(wù)器實(shí)例169。 2023 IBM Corporation /redbooks International Technical Support Organization發(fā)展迅速 ——WebSphere Administrative Console169。 2023 IBM Corporation /redbooks International Technical Support Organization啟動(dòng) WebSphere Admin Console178。從 Web Administration for i5/OS 頁面啟動(dòng) WAS Admin Console178?;蛘甙褳g覽器指向: system host name: admin port/ibm/console169。 2023 IBM Corporation /redbooks International Technical Support OrganizationWeb 服務(wù)器定義178。Web 服務(wù)器定義是一組表示您的 Web 服務(wù)器的配置參數(shù)178。它為 Web 服務(wù)器插件提供配置參數(shù),因此應(yīng)用服務(wù)器和 Web 服務(wù)器彼此之間可互相通信169。 2023 IBM Corporation /redbooks International Technical Support Organization插件HTTP服務(wù)器客戶端 HTTP 請求WebSphere ApplicationServerDB2Web 服務(wù)器定義(續(xù))169。 2023 IBM Corporation /redbooks International Technical Support OrganizationWeb 服務(wù)器定義(續(xù))WebSphere Application ServerHTTP 服務(wù)器 1HTTP 服務(wù)器 2Web 服務(wù)器定義 1虛擬主機(jī):?FirstServer?SecondServerFirstApp映射Web 服務(wù)器定義 2 SecondApp映射映射映射 代表 HTTP 服務(wù)器實(shí)例和 Web 服務(wù)器定義之間的關(guān)聯(lián)FirstServer:80SecondServer:80169。 2023 IBM Corporation /redbooks International Technical Support Organization如何添加 Web 服務(wù)器定義178。IBM Web Administration for i5/OS 是創(chuàng)建 Web 服務(wù)器定義的最佳工具216。當(dāng)您成對創(chuàng)建 WebSphere profile/HTTP 服務(wù)器實(shí)例時(shí)216。當(dāng)您配置現(xiàn)有的 HTTP 服務(wù)器實(shí)例,使之和 WebSphere profile 配套使用時(shí)178。但在許多情況下需要使用 WebSphere Admin Console169。 2023 IBM Corporation /redbooks International Technical Support Organization分析 HTTP 服務(wù)器 WAS profile 配置178?!亲罴褑?dòng)位置178。在 WAS Admin Console 中打開文件:216。插件屬性面板包含:175。 關(guān)于文件位置的信息175。 View 按鈕顯示文件內(nèi)容169。 2023 IBM Corporation /redbooks International Technical Support Organization查看 文件178。請看幾個(gè)參數(shù)(標(biāo)簽)216。VirtualHostGroup216。Transport216。UriGroupLog LogLevel=Error Name=/QIBM/UserData/WebSphere/AppServer/V6/Base/profiles/demo/logs/IHS_MYSYSTEM_DEMO// Property Name=ESIEnable Value=true/ Property Name=ESIMaxCacheSize Value=1024/ Property Name=ESIInvalidationMonitor Value=false/ VirtualHostGroup Name=default_host VirtualHost Name=*:50001/ VirtualHost Name=*:50003/ VirtualHost Name=*:10030/ /VirtualHostGroup ServerCluster CloneSeparatorChange=false LoadBalance=Round Robin Name=demo_MYSYSTEM_demo_Cluster PostBufferSize=64 PostSizeLimit=1 RemoveSpecialHeaders=true RetryInterval=60 Server ConnectTimeout=0 ExtendedHandshake=false MaxConnections=1 Name=MYSYSTEM_demo_demo ServerIOTimeout=0 WaitForContinue=false Transport Hostname=“ Port=50001 Protocol=/ Transport Hostname= Port=50003 Protocol= Property Name=keyring Value=/QIBM/UserData/WebSphere/AppServer/V6/Base/profiles/demo/etc// Property Name=stashfile Value=/QIBM/UserData/WebSphere/AppServer/V6/Base/profiles/demo/etc// /Transport /Server /ServerCluster UriGroup Name=default_host_demo_MYSYSTEM_demo_Cluster_URIs Uri AffinityCookie=JSESSIONID AffinityURLIdentifier=jsessionid Name=/snoop/*/ Uri AffinityCookie=JSESSIONID AffinityURLIdentifier=jsessionid Name=/hello/ Uri AffinityCookie=JSESSIONID AffinityURLIdentifier=jsessionid Name=/hitcount/ Uri AffinityCookie=JSESSIONID AffinityURLIdentifier=jsessionid Name=*.jsp/ Uri AffinityCookie=JSESSIONID AffinityURLIdentifier=jsessionid Name=*.jsv/ Uri AffinityCookie=JSESSIONID AffinityURLIdentifier=jsessionid Name=*.jsw/ Uri AffinityCookie=JSESSIONID AffinityURLIdentifier=jsessioni