<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-49  評論-67  文章-27  trackbacks-0

    1?????? 目的

    在進行 Globus 項目開發的過程中,需要在 Windows 下通過 Web 服務調用 Globus 的服務(如 RFT )。但是在編寫程序的時候遇到了一系列的問題。幾經周折,終于搞定。遂將解決方法總計如下,以供大家參考。

    2?????? 證書問題

    由于 Globus 的安全問題,需要使用證書才能訪問服務。這里,有三種證書,分別是 CA 證書、用戶證書和代理證書。我們可以從以及安裝好 Globus Linux 主機上將用戶證書(連同用戶的私鑰)和 CA 證書一同拷貝到 Windows 上使用。

    用戶證書和用戶私鑰通常位于用戶根目錄中:

    $HOME\.globus\usercert.pem

    $HOME\.globus\userkey.pem

    用戶證書和用戶私鑰用來生成代理證書。

    CA 證書在校驗用戶證書的有效性時使用,位于

    /etc/grid-security/certificates/a3989c00.0

    代理證書是訪問 Globus 服務時實際使用的證書,它可以通過上面的證書來生成。但是生成代理證書需要進行如下操作。

    2.1 ?? 安裝 ws-core

    設置環境變量 GLOBUS_LOCATION

    set %GLOBUS_LOCATION%=some_where_ws-core_installed

    下載 ws-core-4.0.1-bin.zip (這里面的版本由需要決定)文件,解壓到 %GLOBUS_LOCATION 目錄下。

    2.2 ?? 安裝 cog-jglobus

    設置環境變量 COG_INSTALL_PATH

    set %COG_INSTALL_PATH=some_where_cog-jglobus_installed

    http://wiki.cogkit.org 下載 cog-jglobus-1.4-bin.zip ,解壓到 %COG_INSTALL_PATH 目錄。

    運行:

    %COG_INSTALL_PATH\bin\setup

    根據提示,指定用戶證書、私鑰, CA 證書以及代理證書的位置。

    成功安裝后,會在 Windows 用戶根目錄下生成 .globus 目錄,并在該目錄下建立一個 cog.properties 文件。該文件內容大致如下:

    #Java CoG Kit Configuration File

    #Tue Dec 12 18:34:00 CST 2006

    usercert=C\:\\Documents and Settings\\Administrator\\.globus\\usercert.pem

    userkey=C\:\\Documents and Settings\\Administrator\\.globus\\userkey.pem

    proxy=C\:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\x509up_u_administrator

    cacert=C\:\\Documents and Settings\\cert\\a3989c00.0

    后面, grid-proxy-init 會根據這個文件來查找和生成證書。

    如果沒有正確設置 cog.properties 文件,會產生如下異常:

    Exception in thread "main" . Caused by AxisFault

    ?faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException

    ?faultSubcode:

    ?faultString: org.globus.common.ChainedIOException : Authentication failed [Caused by: Failure unspecified at GSS-API level [Caused by: Unknown CA]]

    ?faultActor:

    ?faultNode:

    ?faultDetail:

    ??? {http://xml.apache.org/axis/}stackTrace:Authentication failed. Caused by Failure unspecified at GSS-API level. Caused by COM.claymoresystems.ptls.SSLThrewAlertException : Unknown CA

    這是由于無法定位 CA 證書造成的。

    2.3 ?? 生成代理證書

    運行 grid-proxy-init 獲得用戶的代理證書:

    %GLOBUS_LOCATION\bin\grid-proxy-init

    這樣可以在指定位置生成代理證書。通常這樣生成的代理證書只有 12 小時的有效期。為了方便開發,可以加入 -hours 參數為代理證書指定一個相對比較長的有效期。

    如果沒有代理證書,就會拋出如下異常:

    Exception in thread "main" org.globus.gsi.GlobusCredentialException: Proxy file (C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\x509up_u_administrator) not found.

    ??? at org.globus.gsi.GlobusCredential.<init>(GlobusCredential.java:98)

    ?????? at org.globus.gsi.GlobusCredential.getDefaultCredential(GlobusCredential.java:526)

    3?????? 配置域名

    由于在證書中使用了域名,如果此時域名服務器無法對服務器的 IP 地址進行解析,需要修改 hosts 文件來指定域名。

    否則,會拋出類似如下的異常:

    [main] ERROR delegation.DelegationUtil? - org.globus.common.ChainedIOException : Authentication failed [Caused by: Operation unauthorized (Mechanism level: Authorization failed. Expected "/CN=host/192.168.1.129" target but received "/O=Grid/OU=GlobusTest/OU=simpleCA-mci.uestc.edu.cn/CN=host/mci.uestc.edu.cn")]

    Exception in thread "main" . Caused by AxisFault

    ?faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException

    ?faultSubcode:

    ?faultString: org.globus.common.ChainedIOException : Authentication failed [Caused by: Operation unauthorized (Mechanism level: Authorization failed. Expected &quot;/CN=host/192.168.1.129&quot; target but received &quot;/O=Grid/OU=GlobusTest/OU=simpleCA-mci.uestc.edu.cn/CN=host/mci.uestc.edu.cn&quot;)]

    ?faultActor:

    ?faultNode:

    ?faultDetail:

    ??? {http://xml.apache.org/axis/}stackTrace:Authentication failed. Caused by GSSException : Operation unauthorized (Mechanism level: Authorization failed. Expected &quot;/CN=host/192.168.1.129&quot; target but received &quot;/O=Grid/OU=GlobusTest/OU=simpleCA-mci.uestc.edu.cn/CN=host/mci.uestc.edu.cn&quot;)

    4?????? 配置 Eclipse

    為了使程序可以正常執行,還需要對 Eclipse 工程進行配置。

    4.1 ?? 指定 client-config.wsdd

    Eclipse 工程的虛擬機參數中加入 -Daxis.ClientConfigFile=share\client-config.wsdd 來指定 client-config.wsdd 文件。可以從 Linux 上拷貝 $GLOBUS_LOCATION\client-config.wsdd 得到。

    否則,會拋出如下異常:

    [main] ERROR delegation.DelegationUtil? - No client transport named 'https' found!

    Exception in thread "main" . Caused by AxisFault

    ?faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.generalException

    ?faultSubcode:

    ?faultString: No client transport named 'https' found!

    ?faultActor:

    ?faultNode:

    ?faultDetail:

    ??? {http://xml.apache.org/axis/}stackTrace:No client transport named 'https' found!

    4.2 ?? 指定 ws-core 安裝路徑

    Eclipse 工程的虛擬機參數中加入 -DGLOBUS_LOCATION=%GLOBUS_LOCATION 指定 Windows ws-core 的安裝路徑。

    否則,可能拋出如下異常:

    Exception in thread "main" Container failed to initialize. Caused by org.apache.axis.ConfigurationException : Configuration file directory '.\etc' does not exist or is not a directory or is not readable.

    org.apache.axis.ConfigurationException : Configuration file directory '.\etc' does not exist or is not a directory or is not readable.

    5?????? 總結

    以上是在 Windows 平臺下基于 Web 服務開發 Globus 應用時遇到的問題以及解決辦法。

    posted on 2006-12-12 22:19 思考 閱讀(2785) 評論(1)  編輯  收藏 所屬分類: Grid Computing

    評論:
    # re: Windows平臺下基于Web服務開發Globus應用[未登錄] 2007-07-25 13:52 | 飛馬
    我也想在Windows 下通過 Web 服務調用 Globus 的服務(如 GRAM、RFT等),你本文沒有提到如何具體編程調用RFT,能否公開一下,謝謝
    我的msn:flyhorse2k@hotmail.com
    希望能得到你的指導。  回復  更多評論
      
    主站蜘蛛池模板: 亚洲午夜无码久久久久| 一区二区免费在线观看| 亚洲人成色77777| 国产在线观看免费完整版中文版 | 国产成人精品久久免费动漫| 日产久久强奸免费的看| 亚洲一区二区观看播放| 亚洲av网址在线观看| 国产午夜亚洲精品理论片不卡 | 亚洲无删减国产精品一区| 亚洲国产高清在线一区二区三区| 成人爽A毛片免费看| 最好看最新的中文字幕免费| 国色精品va在线观看免费视频 | 国产精品视频永久免费播放| 无码精品人妻一区二区三区免费看| 一道本不卡免费视频| 国产精品手机在线亚洲| 亚洲永久网址在线观看| 亚洲AV无码一区二区三区人| 亚洲精品人成电影网| 亚洲日韩图片专区第1页| 亚洲男人都懂得羞羞网站| 久久91亚洲人成电影网站| 亚洲中文字幕不卡无码| 亚洲国产综合精品一区在线播放| 国产一级高清免费观看| 国产色爽免费视频| 免费人成视频x8x8入口| 免费一级毛片女人图片| 亚洲av成人一区二区三区在线观看| 日本一线a视频免费观看| 国产精品无码一二区免费| 日本成人免费在线| 国产成人精品男人免费| 免费a级毛片无码av| 亚洲一本大道无码av天堂| 国产成人精品久久亚洲高清不卡 | 亚洲精品无码久久久久AV麻豆| 亚洲视频一区二区| 亚洲男同帅GAY片在线观看|