GT4中的globus-start-container和globus-stop-container所遇到的问题

今天在使用GT4时,采用globus-start-container启动容器和globus-stop-container终止容器时遇到一些问题,现归纳如下:
1.首先采用globus-start-container -nosec启动容器,这个命令在运行GT4例子程序中会经常用到。
2.然后使用globus-stop-container终止容器。
但是发现,如果我采用globus-stop-container命令终止容器的使用,会出现:connection refused的错误。
另外一个窗口采用globus-start-container -nosec启动容器的时候,却说Address in use。

百思不得其解,最后参考Globus网站,并通过自己的实践,终于解决了这个问题:
1.首先关于globus-start-container,globus.org上是这样描述的:

Starts a standalone container. By default a secure container is started on port 8443 and is accessible via HTTPS. On successful startup a list of services will be displayed on the console. By default the non secure (HTTP) container is started on port 8080.

2.如果为globus-start-container加上-nosec参数时,即使用globus-start-container -nosec命令时

Starts a non secure (HTTP) container. Please note that this option only disables transport security. Message security still can be used.

3.然后关于globus-stop-container,globus.org上是这样描述的:

Stops a standalone container. By default this command will attempt to stop a container running on localhost:8443 and perform a soft shutdown.

这样就可以明白为什么采用globus-start-container -nosec是在8080端口启动的container,而globus-stop-container要去8443端口关闭container,就会出现connection refused的错误,而且container也没有真正关闭。
而这个时候再次去启动container时,因为上次的container没有关闭,仍然回占用它所使用的端口,所以就会出现address in use的错误了。
所以在一般情况下,直接采用Ctrl-C关闭container是一个好方法。
如果要想通过globus-stop-container来关闭container的话,在启动的时候需要采用globus-start-container不加-nosec参数。

在使用globus-stop-container来关闭container时还要注意一个问题,就是关于权限问题。

By default globus-stop-container must be executed with the same credentials as the container it is running with. If the ShutdownService or the container is configured with separate private key and certificate files (usually /etc/grid-security/containercert.pem and /etc/grid-security/containerkey.pem) do the following to stop the container:

 $ grid-proxy-init -cert /etc/grid-security/containercert.pem /
-key /etc/grid-security/containerkey.pem /
-out containerproxy.pem
$ setenv X509_USER_PROXY containerproxy.pem
$ globus-stop-container
$ unsetenv X509_USER_PROXY
$ rm containerproxy.pem


上面这段话的含义是globus-stop-container使用和container一样的证书来执行该命令,这里使用
containercert.pem和containerkey.pem来生成一个containerproxy.pem,最后使用这个代理证书来关闭
container。如果你遇到说找不到/tmp/x509up-uuid(uid是你用来执行globus-stop-container的用户的uid)
文件的情况,可以试图采用上面的方式来解决这个问题。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值