我正在尝试连接到一个t3网址,我被告知有一个空白的用户名和密码但是,我不知道如何在connect()调用中传递一个空的用户名和密码。我怎么能这样做?
当我执行connect('', '', 't3://hostname:port')
时,WLST会尝试使用用户名' weblogic'来连接到指定的网址。我不知道从哪里来的?
---更新---
请忽略上述内容......请参阅Sandra的评论。
我尝试运行的脚本是WebLogic Server JMS WLST Script – Who is Connected To My Server中显示的脚本。虽然我已经轻轻修改它以将用户名,密码和url作为参数传递到脚本中......
我已将脚本保存到名为listJmsQueueConsumers.py
的文件中,并按如下方式运行脚本:
$ source /opttest/bea/wlserver_10.3/server/bin/setWLSEnv.sh
$ java weblogic.WLST listJmsQueueConsumers.py "username" "password" "t3://ip-address:port"
其中,用户名,密码和网址是管理员的用户名,密码和指向weblogic服务器管理员端口的网址。
现在,当我运行脚本时,出现以下错误:
Caused by: java.net.ConnectException: t3://ip-address:port: Destination unreachable; nested exception is:
java.net.SocketException: Connection reset; No available router to destination
我还尝试使用相同的网址运行脚本,但使用协议t3s
,当我使用t3s
运行脚本时,我得到:
Caused by: java.net.ConnectException: t3s://ip-address:port: Destination unreachable; nested exception is:
javax.net.ssl.SSLKeyException: [Security:090542]Certificate chain received from bc2-06-v1.compass.cnsonline.net - ip-address was not trusted causing SSL handshake failure. Check the certificate chain to determine if it should be trusted or not. If it should be trusted, then update the client trusted CA configuration to trust the CA certificate that signed the peer certificate chain. If you are connecting to a WLS server that is using demo certificates (the default WLS server behavior), and you want this client to trust demo certificates, then specify -Dweblogic.security.TrustKeyStore=DemoTrust on the command line for this client.; No available router to destination
我很确定我使用的IP地址和端口是服务器的IP地址和管理员端口,但我不确定错误的实际含义。我是否需要某种SSL证书才能通过t3s协议进行连接?
答案 0 :(得分:0)
您需要将证书从WebLogic服务器导入到本地Java客户端JVM使用的本地密钥库。我使用名为KeyStore Explorer(http://keystore-explorer.sourceforge.net/)的工具来执行此操作。其他好的选项列在这里How to properly import a selfsigned certificate into Java keystore that is available to all Java applications by default?