my dog learned polymorphism*
The moose likes Websphere and the fly likes How to start or run a application on newly created server2 on WebSphere Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "How to start or run a application on newly created server2 on WebSphere" Watch "How to start or run a application on newly created server2 on WebSphere" New topic
Author

How to start or run a application on newly created server2 on WebSphere

chandubcs
Ranch Hand

Joined: Jun 03, 2001
Posts: 47
Hi all,
I have created an "server2" on WebSphere Application Server 5.0. Basically, the default "server1" is for other purposes and "server2" is for application deployment. So, I created "server2" server on same node where server1 resides i.e my local machine and deployed an enterprise applcation (.EAR) into it. Does anyone have idea how to use that application URL in browser.
When I deployed my enterprise application in "server1", I was using the URL http://localhost:9080/Web1/test.jsp. What are the steps taken to deploy and use a enterprise application in another server "server2".
Thanks,
Chandra
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

Chandra,
You have two choices to differentiate the URLs: you can change the port (in the admin console) or the context root (in the web.xml when you deploy.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
chandubcs
Ranch Hand

Joined: Jun 03, 2001
Posts: 47
Hi,
Could you let me know how to do that please, since I am very new to Websphere.
When I start Admin console I was getting the URL "http://localhost:9090/admin/secure/logon.do" where I can see "server1" & "server2" in Application servers list. In Enterprise Applications menu, I can see my enterprise application deployed in "server2", but the status of it is "Unavailable", how do I start it and execute it from "server2" URL.
Thanks,
Chandra
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

I'm still using 4.0. The ideas are similar, but the actual steps in the admin console are probably different.
It's proabably easiest to change the context root. Just search the web.xml file for the old context root, change it and redeploy.
chandubcs
Ranch Hand

Joined: Jun 03, 2001
Posts: 47
I have created 2 virtual hosts "server2_host" & "server2_admin" with ports 9081 & 9091 on "server2". From the dos promt I have started the "server2", but in the admin console "http://jh5375dt02.ait.itservices.sbc.com:9090/admin/secure/logon.do" I can see only server1 is started and when I tried to start the deployed enterprise application, it gives error message as "The application can not be started on server server2. Make sure the server is started."
Any more suggestions please?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

Chandra,
I get that message sometimes when the server is partially started. Try doing a "force stop" on the server and then starting.
Also, look for error error messages when starting the server (in standard out.) Your application may be giving some useful message.
chandubcs
Ranch Hand

Joined: Jun 03, 2001
Posts: 47
When I started server1 and server2, I got no error messages. You can see the below lines where I have started 2 servers from DOS prompt.
----------------------------------------
C:\Program Files\WebSphere\AppServer\bin>startServer server2
ADMU0116I: Tool information is being logged in file C:\Program
Files\WebSphere\AppServer\logs\server2\startServer.log
ADMU3100I: Reading configuration for server: server2
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server server2 open for e-business; process id is 1820
C:\Program Files\WebSphere\AppServer\bin>startServer server1
ADMU0116I: Tool information is being logged in file C:\Program
Files\WebSphere\AppServer\logs\server1\startServer.log
ADMU3100I: Reading configuration for server: server1
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server server1 open for e-business; process id is 1240
----------------------------------------
What is the "force stop", how to do that.
Thanks,
Chandra
chandubcs
Ranch Hand

Joined: Jun 03, 2001
Posts: 47
When I deployed the application "MainTest" and restarted server2, I got error messages like...
Failed to Start Transport on host server2_admin, port 9091. The most likely cause is that the port is already in use. Please ensure that no other applications are using this port and restart the server. com.ibm.ws.webcontainer.exception.TransportException: Failed to start transport http: java.net.UnknownHostException: server2_admin
.............
[1/6/04 17:02:09:071 EST] 65640016 ApplicationMg A WSVR0217I: Stopping application: MainTest
...........
Server server2 failed to start com.ibm.ws.exception.RuntimeError
---- Begin backtrace for nested exception
com.ibm.ws.webcontainer.exception.TransportException: Failed to start transport http: java.net.UnknownHostException: server2_admin
Any help?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

Chandra,
According to the message you posted, something else is using port 9091. Try using a different port.
In 4.0, there is a "force stop" option when you right click the application server or enterprise app. It is a stronger version of stop that will kill anything that was half started.
chandubcs
Ranch Hand

Joined: Jun 03, 2001
Posts: 47
I cleared that port error, now the application is deployed in 2 servers. When I clicked on application name from admin console, I can see two servers are listed under target mappings property. The server1 status shows its STARTED, but server2 status shows its UNAVAILABLE. I'm starting and stopping servers from MS-Dos prompt, the server1 is starting and showing in admin console, but server2 is not showing its status that is has started.
When I try to start the enterprise application (deployed in server1 & server2) from admin console, the application is deployed and its working fine on server1, but not on server2, I was getting an error message "The application can not be started on server server2. Make sure the server is started"
When I use serverStatus.bat command from DOS window, it shows both are started.
C:\Program Files\WebSphere\AppServer\bin>serverStatus -all
ADMU0116I: Tool information is being logged in file C:\Program
Files\WebSphere\AppServer\logs\serverStatus.log
ADMU0500I: Retrieving server status for all servers
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: server1
ADMU0506I: Server name: server2
ADMU0508I: The Application Server "server1" is STARTED
ADMU0508I: The Application Server "server2" is STARTED
Does anyone know how to make server2 status as started in admin console?
Thanks much
sailaja parepalli
Ranch Hand

Joined: Jan 23, 2003
Posts: 33
Chandra,
Have you tried deploying it separately on both the virtual servers?
I don't know whether it is a very good option or not, but I mean you can select the first server in the options when you deploy for the first time, and likewise select the second server while deploying for the second time.
This is allowed in WAS 4.0. I think it is possible with 5.0 also.


Sailu<br />IBM 486, SCJP, Brainbench CJP
chandubcs
Ranch Hand

Joined: Jun 03, 2001
Posts: 47
I tried to deploy the enterprise application only on my second server "server2", it got deployed with no problems, but the deployed enterprise application status is shown as 'Unavailable', where I cannot start the application.
Any ideas?
Rickey Mooney
Greenhorn

Joined: Aug 11, 2002
Posts: 4
Since I first read your problem I have played around with i. Here is what I found:
First the workaround is to use wsinstance bat file (in WAS_HOME/bin directory there is a wsinstance subdirectory. You can lookup information from the IBM info web site.
The WebSphere Application Server V5. base system is a single application Server according to IBM SW260 skills transfer class so that might explain the problems that you are having. If you can use the WebSphere Application Server Network Deployment V5 which supports multiple application servers (or create multiple standalone application servers using the wsinstance software mentioned above). Good luck
[ January 20, 2004: Message edited by: Rickey H Mooney ]
Tony Chen
Ranch Hand

Joined: Jan 29, 2001
Posts: 286
http://localhost:9081/Web2/test2.jsp
9081 is the HTTP port of server2, and Web2 is the context root of your new app on server2, test2.jsp is the page name.


SCJP Java 2 - IBM Certified Enterprise Developer - WebSphere V4.0 & V5.0 - IBM Certified System Administrator - WebSphere Network Deployment V6.0 - Canadian Securities Course (CSC) Certification
Tony Chen
Ranch Hand

Joined: Jan 29, 2001
Posts: 286
Originally posted by Chandra Shekar:
I tried to deploy the enterprise application only on my second server "server2", it got deployed with no problems, but the deployed enterprise application status is shown as 'Unavailable', where I cannot start the application.
Any ideas?

The admin console (web app) you are accessing is running on server1 which can only administer (start/stop, etc) things on server1 itself. To have admin console manage runtime stuffs on server2, you need to perform one of the below:
1. install another admin console to server2;
2. map the installed admin console on server1 to both server1 and server2;
3. install ND and use the admin console on the dmgr;
Good luck!
Tony
Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 207
Hi Tony,

How to map the admin console to both server1 and server2?


Thanks
Benson
Andrea Soto
Greenhorn

Joined: Sep 29, 2005
Posts: 1
Benson,

Go to Applications > Enterprise Applications > adminconsole > Map modules to application servers. Select the server and check de module, then clic Apply.

You must add the the admin port for the new server to the virtual host admin_host.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to start or run a application on newly created server2 on WebSphere
 
Similar Threads
EJB - JNDI lookups across 2 app server on the same machine?
very very urgent...pl respond..
Get the Server reference in the application
application "Unavailable" in a new server instance
In Websphere unable to access Default Application using url: http:\\localhost\snoop