启动 tws 中间件后,发现 端口 31116 没有开

本文详细介绍了中间件 WAS 启动时报错端口未启动的解决方案,包括登录 root 账户执行命令检查并启动应用服务器,以及后续的检查与维护操作。通过查看日志和使用 telnet 检测端口状态,最终成功解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天启动中间件was 的时候报错:

Tivoli Workload Scheduler (UNIX)/PLANMAN 8.4 (20070922) Licensed Materials - Property of IBM(R)
5698-WSH
(C) Copyright IBM Corp 1998, 2007 All rights reserved.
US Government User Restricted Rights
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
IBM is a registered trademark of International Business Machines
Corporation in the United States, other countries, or both.
Installed for user "mdm".
Locale LANG set to the following: "en"
AWSBEH023E Unable to establish communication with the server on host "127.0.0.1" using port "31116".

-------------

上面是报一个端口没有启动起来:
telnet 127.0.0.1 31116 是没有起来。

AWSBEH023E Unable to establish communication with the server on host "127.0.0.1" using port "31116".

下面上网查了一下 解决方法:

-------

CauseThe error message

AWSBEH023E Unable to establish communication with the server on host "127.0.0.1" using port "31116"

is generated when the application server has not been started correctly.

 

Resolving the problemLogin as root and execute the following command:


# TWShome/appserver/profiles/twsprofile/bin/serverStatus.sh server1 -user TWSuser -password password

If the server it is working fine you should get a message like the following:

ADMU0116I: Tool information is being logged in file
/space/msf_99/appserver/profiles/twsprofile/logs/server1/serverStatus.log
ADMU0128I: Starting tool with the twsprofile profile
ADMU0500I: Retrieving server status for server1
ADMU0508I: The Application Server "server1" is STARTED

If the server is down you can try to restart it executing the following command:

# TWShome/appserver/profiles/twsprofile/bin/startServer.sh server1 -user TWSuser -password password

Check the log of application server under TWShome/appserver/profiles/twsprofile/logs/server1
in order to troubleshoot the problem further.


注意:上面的path 的实际路径是:
/opt/mdm/appserver/profiles/twsprofile/bin
/opt/mdm/appserver/profiles/twsprofile/logs/server1/serverStatus.log


下面执行一下看看:

[root@wen bin]# ./serverStatus.sh server1 -user mdm -password aaaaaa
ADMU0116I: Tool information is being logged in file
           /opt/mdm/appserver/profiles/twsprofile/logs/server1/serverStatus.log
ADMU0128I: Starting tool with the twsprofile profile
ADMU0500I: Retrieving server status for server1
ADMU0509I: The Application Server "server1" cannot be reached. It appears to be
           stopped.
          
---

看一下log:
 
[root@wen bin]# tail -40 /opt/mdm/appserver/profiles/twsprofile/logs/server1/serverStatus.log
************ Start Display Current Environment ************
Host Operating System is Linux, version 2.6.9-34.EL
Java version = J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20070426 (JIT enabled)
J9VM - 20070420_12448_lHdSMR
JIT  - 20070419_1806_r8
GC   - 200704_19, Java Compiler = j9jit23, Java VM name = IBM J9 VM
was.install.root = /opt/mdm/appserver
user.install.root = /opt/mdm/appserver/profiles/twsprofile
Java Home = /opt/mdm/appserver/java/jre
ws.ext.dirs = /opt/mdm/appserver/java/lib:/opt/mdm/appserver/classes:/opt/mdm/appserver/lib:/opt/mdm/appserver/installedChannels:/opt/mdm/appserver/lib/ext:/opt/mdm/appserver/web/help:/opt/mdm/appserver/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime
Classpath = /opt/mdm/appserver/profiles/twsprofile/properties:/opt/mdm/appserver/properties:/opt/mdm/appserver/lib/startup.jar:/opt/mdm/appserver/lib/bootstrap.jar:/opt/mdm/appserver/lib/j2ee.jar:/opt/mdm/appserver/lib/lmproxy.jar:/opt/mdm/appserver/lib/urlprotocols.jar:/opt/mdm/appserver/java/lib/tools.jar
Java Library path = /opt/mdm/appserver/java/jre/bin:/opt/mdm/appserver/java/jre/bin:/opt/mdm/appserver/java/jre/bin/classic:/opt/mdm/appserver/java/jre/bin:/opt/mdm/bin:/opt/mdm/appserver/bin:/opt/IBM/db2/V8.1/lib:/home/db2inst1/sqllib/lib:/usr/lib
Current trace specification = *=info
************* End Display Current Environment *************
[10/1/12 9:36:29:798 CST] 0000000a ManagerAdmin  I   TRAS0017I: The startup trace state is *=info.
[10/1/12 9:36:29:976 CST] 0000000a AdminTool     A   ADMU0128I: Starting tool with the twsprofile profile
[10/1/12 9:36:29:977 CST] 0000000a AdminTool     A   ADMU0500I: Retrieving server status for server1
[10/1/12 9:36:34:137 CST] 0000000a SSLConfigMana I   CWPKI0027I: Disabling default hostname verification for HTTPS URL connections.
[10/1/12 9:36:34:303 CST] 0000000a AdminTool     A   ADMU0509I: The Application Server "server1" cannot be reached. It appears to be stopped.

从上面的log 上看,还是 hostname 的问题。

 

后来,启动mdm :

-----

[root@wen bin]# su - mdm
Tivoli Workload Scheduler Environment Successfully Set !!!
[mdm@wen ~]$ StartUp
TWS for UNIX/STARTUP 8.4
Licensed Materials - Property of IBM(R)
5698-WSH
(C) Copyright IBM Corp 1998, 2007 All rights reserved.
US Government User Restricted Rights
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
IBM is a registered trademark of International Business Machines
Corporation in the United States, other countries, or both.
Program code level: 20070922
Tivoli Workload Scheduler Environment Successfully Set !!!
Tivoli Workload Scheduler (UNIX)/CONMAN 8.4 (20070922) Licensed Materials - Property of IBM(R)
5698-WSH
(C) Copyright IBM Corp 1998, 2007 All rights reserved.
US Government User Restricted Rights
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
IBM is a registered trademark of International Business Machines
Corporation in the United States, other countries, or both.
Installed for user "mdm".
Locale LANG set to the following: "en"
Scheduled for (Exp) 10/26/09 (#34) on WEN.  Batchman down.  Limit: 0, Fence: 0, Audit Level: 0
%startappserver; wait
AWSBHU620I A start command was issued for the application server on workstation "WEN".

 

好,现在发现已经启动好了。


[mdm@wen ~]$ exit
logout

[root@wen bin]# ./serverStatus.sh server1 -username mdm -password aaaaaa
ADMU0116I: Tool information is being logged in file
           /opt/mdm/appserver/profiles/twsprofile/logs/server1/serverStatus.log
ADMU0128I: Starting tool with the twsprofile profile
ADMU0500I: Retrieving server status for server1
ADMU0508I: The Application Server "server1" is STARTED

好,看到 server1 已经启动了。

 

下面检查一下port:

 

[root@wen bin]# telnet 127.0.0.1 31116
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.

Connection closed by foreign host.

端口已近启动好了。哈哈

 

后来做维护,把server 给停了:

[root@wen twsprofile]# cd /opt/mdm/appserver/profiles/twsprofile/bin/
[root@wen bin]# ./stopServer.sh server1 -username mdm -password aaaaaa
ADMU0116I: Tool information is being logged in file
           /opt/mdm/appserver/profiles/twsprofile/logs/server1/stopServer.log
ADMU0128I: Starting tool with the twsprofile profile
ADMU3100I: Reading configuration for server: server1
ADMU3201I: Server stop request issued. Waiting for stop status.
ADMU4000I: Server server1 stop completed.

注意,先ps -ef |grep java 看一下process 是用root 起的。

再退到root 下进行process stop。

### TWS蓝牙耳机关机控制的软件实现 对于TWS(True Wireless Stereo)蓝牙耳机而言,其关机状态通常由硬件按钮触发并通过固件逻辑来处理。然而,在某些情况下,可以通过修改或扩展底层固件中的特定部分来实现更加定制化的关机行为。 #### 修改固件以支持远程关操作 为了使TWS设备能够响应来自外部应用的命令完成机或关机动作,发者可以在固件层面引入新的API接口用于接收这些指令并执行相应动作。具体来说: - **创建自定义命令**:基于现有SDK框架下的`app_ibrt_customif_cmd.cpp`文件位置添加新函数入口点,允许应用程序发送特殊编码的消息至耳机端[^3]。 ```cpp void handleCustomCommand(uint8_t* data, int length){ // 解析传入的数据包 if (data[0] == CMD_POWER_ON && length >= MIN_CMD_LEN){ powerOnDevice(); }else if(data[0] == CMD_POWER_OFF && length >= MIN_CMD_LEN){ powerOffDevice(); } } ``` - **定义电源管理流程**:编写内部方法`powerOnDevice()` 和 `powerOffDevice()`,负责实际调用驱动层服务改变物理供电状况或者模拟按键事件激活预设机制。 - **安全验证措施**:考虑到潜在风险因素,在放此类敏感权限前应当加入身份认证环节确保只有授权客户端才具备操控能力。 上述方案依赖于制造商提供的发环境和支持文档,不同品牌间可能存在差异性,因此建议先查阅目标产品的官方资料获取最准确指导说明。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

shenghuiping2001

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值