This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Jboss shutting down when I close SSH and a 503 error  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am running Jboss 5.1.0 on an Amazon EC2 linux server and I am having 2 problems I need some help with. I'm totally stumped at this point. Jboss seems to not be completely starting up. It pauses on the "started in" info message and when I close my SSH console it shuts itself down. The JMX console is accessible through the web until I shutdown SSH. Any ideas on what is causing this? It was running fine a few days ago. I've tried every fix and workaround I could find but no luck and the logs are not helping.

Also, the second problem is, when Jboss is running, I get a 503 error on my webpage. I'm thinking this may be the memory allotment in Tomcat but I am having trouble finding the Tomcat config files inside jboss.

Thanks in advance for any help.
 
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

First you need to shutdown JBoss completely normally or using the "kill <processid>" command. Then make sure the port JBoss uses (eg 8080) is not occupied or attached.

You also mentioned "when I close SSH console, it shuts itself down". Are you running JBoss interactively? If so your console window is the session. Just like the comand prompt window in Windows OS.

Once you can start JBoss normally, I believe your 503 error will go away.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Randy, welcome to CodeRanch!

The reason why the server is shutting down on SSH termination is because it looks like you started the server from the command prompt. As a result, the process gets tied to the SSH session. You can either run the server as a service or start the server using:

nohup ./run.sh &

so that it doesn't terminate on SSH session closing. It's however better to run it as a service. See these articles for some related details:

https://community.jboss.org/wiki/MysteriousShutdowns
https://community.jboss.org/wiki/StartJBossOnBootWithLinux

 
Randy Mazin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

K. Tsang wrote:Welcome to the Ranch.

First you need to shutdown JBoss completely normally or using the "kill <processid>" command. Then make sure the port JBoss uses (eg 8080) is not occupied or attached.

You also mentioned "when I close SSH console, it shuts itself down". Are you running JBoss interactively? If so your console window is the session. Just like the comand prompt window in Windows OS.

Once you can start JBoss normally, I believe your 503 error will go away.



Thank you both for the help. When I searched for the jboss process it appeared that it was running under 2 process ID's I killed them both.

nohup ./run.sh & is not working.. It just gives me a message "nohup: ignoring input and appending output to ânohup.outâ" starts another process but does not start jboss itself.

I had already seen this one: https://community.jboss.org/wiki/MysteriousShutdowns but I'm not sure where to add -Xrs... it's not very descriptive about the process.

I'm not sure what you mean by "Are you running JBoss interactively" I was running it with sudo ./run.sh which was working fine a few days ago.

Also, this is my first time working with Jboss.

Any thoughts?

 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Randy Mazin wrote:I'm not sure what you mean by "Are you running JBoss interactively" I was running it with sudo ./run.sh which was working fine a few days ago.
Also, this is my first time working with Jboss.
Any thoughts?



Running "interactively" is basically see the jboss log update itself as you access pages. Since you are doing this remotely", killing the console would have kill the interactive session.

From your post "sudo ./run.sh" is interactive. Try

<JBOSS_HOME>/bin/run.sh -b 0.0.0.0 > /dev/null &

The -b flag for accessing anywhere (not just localhost) and the "&" at the end is making it background job.

Also you should start/run JBoss server with the user that owned the JBoss installation folder. If it's root so be it (yet I don't recommend). But that's another story.

Hope this helps.
 
Randy Mazin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

K. Tsang wrote:

Randy Mazin wrote:I'm not sure what you mean by "Are you running JBoss interactively" I was running it with sudo ./run.sh which was working fine a few days ago.
Also, this is my first time working with Jboss.
Any thoughts?



Running "interactively" is basically see the jboss log update itself as you access pages. Since you are doing this remotely", killing the console would have kill the interactive session.

From your post "sudo ./run.sh" is interactive. Try

<JBOSS_HOME>/bin/run.sh -b 0.0.0.0 > /dev/null &

The -b flag for accessing anywhere (not just localhost) and the "&" at the end is making it background job.

Also you should start/run JBoss server with the user that owned the JBoss installation folder. If it's root so be it (yet I don't recommend). But that's another story.

Hope this helps.



Killed processes again, Tried running sudo /opt/jboss/jboss-5.1.0.GA/bin/run.sh -b 0.0.0.0 > /dev/null & and it only returned this: [1] 4360 It started a process but did not run the jboss server. I do not have root user access to this server only sudo.


Update: That actually did work. It was just delayed. Still getting the 503 error though.
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good that the server actually starts again. 503 error... not sure why

Does the jboss log have any clues?

Are you using Apache as the front end then forward to JBoss for java apps? If so it may be the Apache HTTP server that cause the 503.
 
Randy Mazin
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

K. Tsang wrote:Good that the server actually starts again. 503 error... not sure why

Does the jboss log have any clues?

Are you using Apache as the front end then forward to JBoss for java apps? If so it may be the Apache HTTP server that cause the 503.



Apache but apache is up and running. The single portal page hosted in Apache is accessible through http. The logs are not helping. Here is the tomcat status from the web console:

JVM

Free memory: 143.14 MB
Total memory: 346.65 MB
Max memory: 494.93 MB

http-0.0.0.0-8080

Max threads: 200
Current thread count: 4
Current thread busy: 3
Max processing time: 5890 ms
Processing time: 7.144 s
Request count: 29
Error count: 6
Bytes received: 0.00 MB
Bytes sent: 5.64 MB

I've been reading that it may be a memory issue and that I should increase the memory but I have no idea where to do that for tomcat in Jboss 5.1.0. In fact I'm having a hard time finding any of the Tomcat config files. Also, if you notice it says Error count: 6 in that status but I have no idea where to find those specific errors.
 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!