setting nohup in linux for logging and start admin console without startup script

Generally the Application Server Startup logs which has the information of ATG Modules,ATG Classpath,ATG Version etc running under Managed Weblogic Server will not be logged to the logs folder under the ATG Application Server log path (ATG_HOME/server/ATGProduction/logs).Ideally the Application Server would be logging this to the console which includes the output from the stdout and stderr,but as a best practice you may need to manually capture these console logs to some file,otherwise it might loose once the console buffer is filled,its also very difficult to read and thereby troubleshoot an issue.

Also in Unix if you run a startup script of an Application Server, The same Server will shutdown if you accidentaly  close the window or somehow the connection is lost to that session. So inorder to address the above issues you can try the below steps

I have taken a typical example of Weblogic Application Server.You may change the based on your Application Server startup scripts.

1. ./startWeblogic.sh ATGProductionStartup.log 2>&1

Here ATGProductionStartup.log  is the filename where the logs will be written
and 2>&1  will do the redirect from stderr to stdout so the file can capture both the logs.

2.  nohup  ./startWeblogic.sh &

This will create a file nohup.out in the same folder and the logs are written in this file , you may press ctrl+c , and use
tail -100f nohup.out to see the server console logs getting genrated dynamically.

Also if your console requires a username and password you need to do some modifications to the configurations

copy the folder security from domain_home/servers/AdminServer/security folder to a temporary location,modify the boot.properties file,change the value of username and password from encrypted values to non encrypted text string(eg->
username=weblogic
password=weblogic123),and paste the entire security folder  to your
domain_home/servers/ATGProduction folder.Restart your server.Repeat the steps for other managed Weblogic Servers.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...