Showing posts with label IBM WebSphere. Show all posts
Showing posts with label IBM WebSphere. Show all posts

Sunday, May 20, 2018

Backing up and restoring profile in IBM WebSphere

This is an incomplete article but will give you a good idea about moving WebSphere Application Server profiles from one system to another .
For WebSphere questionaires  refer to site http://www.doubleshout.com and http://middlewareplay.appspot.com


Taking a backup of profile

D:\IBM\WID7_WTE\runtimes\bi_v7\bin>

manageprofiles.bat -backupProfile -profileName qwps -backupFile qwpsBackup

INSTCONFFAILED: Cannot backup profile: For more information, consult D:\IBM\WID7
_WTE\runtimes\bi_v7\logs\manageprofiles\qwps_backupProfile.log.

In windows , you may have problem related to long paths . Therefore shortening the path of the backup file to D:\backupfile.zip   and executed the command again

 D:\IBM\WID7_WTE\runtimes\bi_v7\bin>manageprofiles.bat -backupProfile -profileName qwps -backupFile D:\backupfile.zip



INSTCONFSUCCESS: Success: The profile backup operation was successful.

D:\IBM\WID7_WTE\runtimes\bi_v7\bin>

Restore
  1. In a command prompt, browse to the \bin directory. Type cd \bin.
    For example: cd c:\Program Files\IBM\WebSphere\AppServer\bin
  2. Restore the profile. Type manageprofiles -restoreProfile -backupFile . For example
    manageprofiles -restoreProfile -backupFile c:\backup\AppSrv01yymmdd.zip
    The manageprofiles command-line tool always restores to the same path from which the profile was backed up.
  3. Verify that the profile is restored. Browse to the \profiles directory. For example: \profiles\AppSrv01. If the profile is restored successfully, a folder for the restored profile is displayed.

Note this method does not work across the hetrogenous platforms . If you have backed up in windows , then you can only restore in Windows.



Exporting and importing WAS profile

Server must be running
wsadmin.bat -port SOAP CONNECTOR PORT
where SOAP CONNECTOR PORT  is a variable depending on your server configuration
AdminTask.exportWasprofile(['-archive','D:/qwps.car'])


 Importing to my another standalone profile on Solaris platform where wsadmin.sh is evaluating JACL .I am not interested  to change wsadmin.properties from JACL to Jython. So I will just use the JACL version of the command.

$AdminTask importWasprofile {-archive /export/home/wps/qwps.car}
 
$AdminConfig save 


In order to regenerate the default certificates , change the hostname of node.
Refer to below link
http://ashandish.blogspot.sg/2015/06/changing-host-name-of-websphere-node.html 


Admin Console may not be working after importing the profile .I have imported the profile from Windows to Solaris.May be that's the reason I am not able to access admin console.

use the below command to install the admin console
wsadmin.bat –f deployConsole.py install

IBM link for the same is
http://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/tcon_console_inst_uninst.html 

It says composition unit with name isclite already exists.

I will try to remove and install

wsadmin.sh –f deployConsole.py remove
 
Remove is failing with the error that isclite.ear does not exists 
 
Now , I did a search for files with isclite as string 
 
I removed the directories cus and blas inside 
WAS_INSTALL_ROOT/profiles/PROFILE_NAME/config/cells/CELL_NAME/ ,

Now did again 

wsadmin.bat –f deployConsole.py install 
 
That is also not working and giving the error Virtual Host not found. I am aware of this
error but I can not modify the virtual host until I have admin console .

Before trying something else , I have decided to create a profile with same name , same 
cell name and same node name and then do the import . This way , it will be much cleaner .
 
After creating the profile , I have taken the backup before doing the import .
Started the server1 and now going to do the import .
 
 
 


after doing the reinstall of admin console , I found that   several variables have been created twice like WAS_INSTALL_ROOT , WBI_INSTALL_ROOT and location of few derby databases which were used in windows system such as MEDB , EVENTDB , WPRCSDB , Business Space was imported as it is .
The values of WAS_INSTALL_ROOT , WBI_INSTALL_ROOT can be observed from Environment --> WebSphere Variables
 
 


WBI_INSTALL_ROOT not found
Getting error
EJB Timer Service not started
First component in name DefaultEJBTimerDataSource not found
Viewed the DefaultEJBTimerDataSource by changing preferences to show built-in resources
While doing Test connection , getting error EJBTimerDB not found
used the below command to create all derby databases
setupEventCollector.bat -conntype none -profileName rwps 
whichever was giving error during the test connection  .
Used the same database name as per the datasource parameters
Uninstalled wpsFEMgr_7.0.0 as this is giving errors . I only want to run a web application .
Uninstalled BPCECollector_qnode_server1 as well.
Uninstalled the BSpacewebformsEnabler_qnode_server1
Resources-->Schedulers-->Create tables
 
 







Wednesday, September 7, 2016

Disabling WebSphere administrative security

Earlier I used to go to 
WAS_INSTALL_DIR/profiles/PROFILE_NAME/config/cells/CELLNAME/
and vi the security.xml , search for first string enabled and make enabled="false"
Now, there is no need to edit the security.xml to disable security .

You can just follow the below procedure.
cd WAS_INSTALL_DIR/profiles/PROFILE_NAME/bin/

If you have multiple profiles , then its necessary to run wsadmin.sh from the profile where you want to disable the security.

./wsadmin.sh -conntype NONE
wsadmin> securityoff 
wsadmin>  exit 
Restart the servers.

Sunday, December 13, 2015

Cleaning up the EJBTimers DB


WebSphere will use an internal derby database for EJBTimers to persist .
The ejbtimers will survive the server crash as well as server restart as they are persisted in database.
EJB Timer service settings can be changed via the WebSphere console. The description for settings can be easily found in the IBM knowledge center. 
Below is one of the links for WebSphere 8.5.5
EJBTimer can also be easily configured to persist in a different database like oracle. What we need to define is just a different DataSource with an authentication alias. While server is restarted , WebSphere will automatically create the 4 tables required by EJBTimer service. You may use any DataSource available as EJBTimer tables will not interfere with other schema and table’s .You can also define a prefix for the EJBTimer tables in the EJBTimer service settings. Make sure to have the create table permission for authentication alias you are using.
There are also some other important parameters for EJBTimer like poll interval, number of timer threads which can be used to customize the behavior of EJBTimer as per your requirements.
In case, you are using the default EJBTimer DB which is derby. Then, how can you clean the DB. This is an unanswered question in IBM knowledge center.
The procedure is simple which I have found by trial and error methods.
Stop the server. This server is the server for which you are planning to clean the EJBTimer db.
Go to
WAS_INSTALL_ROOT/profiles/Profile Name/databases/EJBTimers/Server Name/EJBTimerDB
and rename the existing directory EJBTimerDB to  EJBTimerDB_bak.
Later you can remove this directory after few days of testing. I am recommending this as this is a solution I found by trial and error and there is no official documentation for it.
Start the server.
You can verify that after server is restarted, a new directory EJBTimerDB is created
Location of an example directory on windows operating system is shown below.
I have tested the proposed solution in Solaris as well as windows operating system.