现在的位置: 首页 > 综合 > 正文

更改Webshpere的profile端口及删除profile

2013年03月21日 ⁄ 综合 ⁄ 共 1117字 ⁄ 字号 评论关闭

应用使用Websphere作为中间件,新建了个profile,准备发布,都没什么问题,但是在新建这个profile时,其他的profile没有启动,结果新建的profile用的端口,其他的也有用,造成的结果是几个profile不能同时启动,一个启动后再启动另一个报端口冲突,日志中报CREATE_LISTENER_FAILED_4错误。解决方式无外乎两个:

 

1)懒方法:删一个profile,然后再新建一个,新建时,确保所有profile都启动了,这样就不会用人家的端口了。删除profile的方法如下:(WAS6.1,没试过WAS6.0,因为不喜欢删了再建,没技术含量)

1.在目录IBM\WebSphere\AppServer\properties里,找到文件profileRegistry.xml。去掉想删除的profile的配置。
2.在目录IBM\WebSphere\AppServer\properties\fsdb里,找到以你profile名字命名的bat文件,删除它。
3.将profile的实际存储目录及内容删除,如:\IBM\WebSphere\AppServer\profiles\AppSrv01。

或者使用命令:

manageprofiles.bat -delete -profileName 你profile的名字。

2)修改现有profile配置的方法:这才像个搞计算机该用的方法。

1. WAS6.0

a)打开IBM\WebSphere6\AppServer\profiles\AppSrv01\logs\portdef.props,修改冲突的端口。

b)打开IBM\WebSphere6\AppServer\profiles\AppSrv01\config\cells\你的cell\nodes\你的node\serverindex.xml,修改冲突的端口。

重启后就可以了。

2. WAS6.1

a)打开\IBM\WebSphere\AppServer\profiles\AppSrv01\config\cells\你的cell\virtualhosts.xml,修改冲突的端口。

b)打开\IBM\WebSphere\AppServer\profiles\AppSrv01\config\cells\你的cell\nodes\你的node\serverindex.xml,修改冲突的端口。

重启后就可以了。

 

当然,要想查都有哪些端口冲突了,可以使用命令:netstat -na | grep 端口号 ,看有没有内容就可以了。

原地址:http://blog.csdn.net/lcrystal623/article/details/6906247

【上篇】
【下篇】

抱歉!评论已关闭.