`
iwindyforest
  • 浏览: 230042 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Using wsadmin to restore WAS server configuration

 
阅读更多

 

RAD is a terrible IDE, but sometimes you have to work on it.

 

One of the most frequently happened problem is that we always get an error like below:

AdminTask.importWasprofile(['-archive', '******.metadata/.plugins/com.ibm.ws.ast.st.v6.core/tmp0/WAS60ServerConfig.car'])
com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  File "<input>", line 1, in ?
TypeError: importWasprofile(): 1st arg can't be coerced to String

 

This is an error happened when we are trying to use .car file to restore the WAS configuration, you probably do it by this approach, right click a server profile in the server tab, select Server Configuration --> Restore...

Most times you will get the above error, I have tried many times on different versions of RAD, none of any attempt has been successfull.

 

This problem has been a pain in the ass for a very long time, till I found I can use wsadmin to restore the configuration instead of using the context menu of RAD.

 

Here is the steps:

 

1. Start the WAS Server

2. Run wsadmin in a cmd shell :

C:\Program Files\IBM\SDP\runtimes\base_v6\bin>wsadmin -conntype SOAP -host 127.0.0.1 -port 8881 -user wsadmin -password wsadmin 

Note: The host should be the server ip address, and the port number here may be different with yours, please check the SOAP port number of your own server.

if the your server profile is created with an admin user name and password, you should add -user wsadmin -password wsadmin at the end of the command line.

3. Once you have connected to the server you could get a prompt of wsadmin> and execute the following command:

wsadmin>$AdminTask importWasprofile {-archive C:\WAS60ServerConfig.car}
wsadmin>$AdminConfig save

Note: C:\WAS60ServerConfig.car is the .car file you should have and be used.and wait until it is executed.

4. Exit the cmd shell and it's done.

 

 To export current profile config for backup:

wsadmin>$AdminTask exportWasprofile {-archive C:\WAS60ServerConfig.car}

 

 To delete a profile:

IBM\WebSphere\AppServer\bin>manageprofiles.bat -delete -profileName AppSrv01

IBM\WebSphere\AppServer\bin>manageprofiles.bat -validateAndUpdateRegistry

 

 

 

 

 

 

 

分享到:
评论

相关推荐

    wsadmin自动部署的jython脚本

    wsadmin自动部署脚本 ...有创建serer,创建MQ,MQ connection factory,MQ listner, JDBC provider, DataSource,Websphere Variable等等一套方法,亲测,可以直接在WAS6 server下的wsadmin运行。

    启动WAS Server的Jython脚本

    启动IBM WAS集群上的所有服务器,使用Jython实现,调用方法wsadmin.sh -f StartAllServers.py

    wsadmin使用

    wsadmin基本使用

    wsadmin auto deploy

    it is a sample for websphere application server's asset wsadmin. use wsadmin & jacl you can auto deploy your enterprise archive file.

    sample code for WebSphere Application Server Administration Using Jython

    WebSphere Application Server Administration Using Jython 是很经典,费了好久才在CSDN上找到,还没有代码参考,故特意在此放上,供参考。

    利用wsadmin生成javacore,heapdump文件

    NULL 博文链接:https://airong.iteye.com/blog/439789

    WAS自动部署技术总结

    WAS自动部署技术总结 关于websphere实现自动化部署的相关技术,以及wsadmin工具、was性能基础、如何实现自动化部署的设计和实现均有详细描述。

    was-installer:WebSphere应用程序部署(传统)脚本

    WAS-installer是用于在IBM WebSphere Application Server单元中部署一组应用程序(以EAR形式提供)的工具。 它使用系统目录(最好在dmgr服务器上)作为可部署EAR所在的热文件夹以及描述单元中应用程序拓扑的xml文档...

    [英文]用jython管理websphere applicatoin server

    英文资料,详尽讲述了如何用jython脚本管理websphere application server。

    MQ创建脚本

    基于SecureCRT上去创建MQ队列管理器的脚本基于供大家参考!

    wasSmooth-开源

    wasSmooth 是一个 jython 库,用于简化 IBM WebSphere Application Server 管理员使用 wsadmin 的工作。 这个想法是创建有意义的类,这些类可以很容易地用来创建强大的脚本,而没有 wsadmin 所需的通常的胡言乱语。

    通过20%的工作获得80%的性能改善jmeter实战

    它侧重于使用wsadmin和Jython进行命令行优化,而不是使用GUI技术。通过应用一些根据经验获得的方法,能够通过最少的管理工作使WebSphereApplicationServer最佳地利用可用的硬件资源。这里描述的技术适用于任何性能...

Global site tag (gtag.js) - Google Analytics