<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?????? 目的

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

    2?????? 證書問題

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

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

    $HOME\.globus\usercert.pem

    $HOME\.globus\userkey.pem

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

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

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

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

    2.1 ?? 安裝 ws-core

    設(shè)置環(huán)境變量 GLOBUS_LOCATION

    set %GLOBUS_LOCATION%=some_where_ws-core_installed

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

    2.2 ?? 安裝 cog-jglobus

    設(shè)置環(huán)境變量 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

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

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

    #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 會根據(jù)這個文件來查找和生成證書。

    如果沒有正確設(shè)置 cog.properties 文件,會產(chǎn)生如下異常:

    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 小時的有效期。為了方便開發(fā),可以加入 -hours 參數(shù)為代理證書指定一個相對比較長的有效期。

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

    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?????? 配置域名

    由于在證書中使用了域名,如果此時域名服務(wù)器無法對服務(wù)器的 IP 地址進(jìn)行解析,需要修改 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

    為了使程序可以正常執(zhí)行,還需要對 Eclipse 工程進(jìn)行配置。

    4.1 ?? 指定 client-config.wsdd

    Eclipse 工程的虛擬機參數(shù)中加入 -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 工程的虛擬機參數(shù)中加入 -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?????? 總結(jié)

    以上是在 Windows 平臺下基于 Web 服務(wù)開發(fā) Globus 應(yīng)用時遇到的問題以及解決辦法。

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

    評論:
    # re: Windows平臺下基于Web服務(wù)開發(fā)Globus應(yīng)用[未登錄] 2007-07-25 13:52 | 飛馬
    我也想在Windows 下通過 Web 服務(wù)調(diào)用 Globus 的服務(wù)(如 GRAM、RFT等),你本文沒有提到如何具體編程調(diào)用RFT,能否公開一下,謝謝
    我的msn:flyhorse2k@hotmail.com
    希望能得到你的指導(dǎo)。  回復(fù)  更多評論
      
    主站蜘蛛池模板: 久久久久久一品道精品免费看 | 国产精品久久免费| 亚洲精品无码久久久久sm| 黄网站在线播放视频免费观看| 国产1024精品视频专区免费| 亚洲国产精品热久久| 国产精品区免费视频| 亚洲va中文字幕无码久久| AAA日本高清在线播放免费观看| 国产亚洲成AV人片在线观黄桃 | 国内精品一级毛片免费看| 国产成人亚洲精品青草天美| EEUSS影院WWW在线观看免费| 亚洲码国产精品高潮在线| 你懂的免费在线观看| 亚洲大片在线观看| 最近中文字幕2019高清免费| 亚洲精品亚洲人成在线麻豆| 韩国免费一级成人毛片| 亚洲日韩久久综合中文字幕| 国产亚洲精品免费| 久久99久久成人免费播放| 国产AV无码专区亚洲A∨毛片| 久久99热精品免费观看牛牛| 亚洲另类春色国产精品| 成人免费视频一区| 一进一出60分钟免费视频| 国产亚洲AV无码AV男人的天堂 | 亚洲日本va一区二区三区| 四虎免费永久在线播放| 韩国免费a级作爱片无码| 亚洲ⅴ国产v天堂a无码二区| 免费无码又黄又爽又刺激| 亚洲av无码一区二区三区四区| 国产成人毛片亚洲精品| 性xxxxx大片免费视频| 亚洲中文字幕无码久久2020| 国产性爱在线观看亚洲黄色一级片| 亚欧免费一级毛片| 久久亚洲AV成人无码国产最大| 国产亚洲人成A在线V网站|