JBOSS Application Server getting hanged on Production environment - jboss

Can someone please give detailed way to monitor JBOSS app server ?
The production application running on JBOSS server starts working fine after restarting the server. How do I identify what is the cause behind it?

To see what is "hung", try getting a thread dump from your JBoss instance by running it in the foreground from a command shell. Then on Linux, send a kill -3 [PID] to JBoss to dump its thread state to stdout. On Windows, you would type Control-Break in the CMD shell running JBoss. Alternatively, use a monitoring tool like VisualVM.

Related

Can't access local Sinatra server (win10 + Ubuntu on Windows)?

I can't seem to access Sinatra's local server. I have a win10 machine and I have my servers running in an Ubuntu on Windows. Sinatra has been installed without docs because installation would hang otherwise. This is the server log:
dario#DESKTOP-LSFERHU:~/dev/ruby/sinatra$ ruby first_app.rb
[2017-07-05 15:47:38] INFO WEBrick 1.3.1
[2017-07-05 15:47:38] INFO ruby 2.3.1 (2016-04-26) [x86_64-linux-gnu]
== Sinatra (v2.0.0) has taken the stage on 4567 for development with backup from WEBrick
[2017-07-05 15:47:38] INFO WEBrick::HTTPServer#start: pid=19509 port=4567
This is the app's content:
require 'sinatra'
set :bind, '0.0.0.0'
get ('/apple') do
"Here's an apple"
end
localhost:4567 hangs waiting.
I added the "set :bind" directive as a last hope, but it changes nothing. I can access no problem other local servers (for example a node server on port 5000). I turned off AVG in case, but again made no difference. Different browsers, no difference. Unsure where to go. Ideas?
It seems that the AVG antivirus, before I managed to shut it off, had somehow interfered with the server process. It somehow froze it. Any attempt I would make at starting a new server would only apparently work, while in reality conflict with this frozen process. I was unable to kill the process with any usual method (kill -KILL or so). I rebooted, added the ruby binary to the list of exceptions for AVG, and now the server works just fine. The Ubuntu on Windows had nothing to do with it.

how to run swift server single process

I'm trying to run a swift based web server using Kitura on Ubuntu.
This is following command to start hello word server.
.build/debug/helloworld
I can launch standalone process using .build/debug/helloworld &
but launching with that creates multiple process if execute again.
Or I've to kill old process then start new If I want to run only single process.
I've followed following tutorial to get server up running. But don't want to use Bluemix to deploy application. Instead I want to launch it on AWS ubuntu.
http://www.kitura.io/en/starter/gettingstarted.html
I assume there must be more easy and proper way to do this.
As you can see I'm almost newbie for servers.
You have to kill the Kitura process in order to stop a Kitura Server app - there is no other way to stop it.
If you just want to test your server you can run it inside a screen session. Screen is an essential utility for managing remote servers via ssh.
If you want to run it properly as a service/daemon you should look into systemd.

How to forcefully stop websphere liberty server in windows 7

Suddenly Websphere server is automatically started.
I stop many times but started again automatically.
Even I removed project from the web sphere and removed websphere from the project and Again add for the same.. But still I it is starting.
I also run the below command,
Server stop server_name
below Message is showing
Stopping server server_name
So it is not stoping. How to stop forcefully? or Kill existing process?
Your question doesn't state what OS you're running on, but Liberty doesn't currently ship with any means to automatically start the server (like a Windows service), so when you say "started again automatically", it is more likely that the server is never shutdown. Liberty runs as a process that can be killed and the process id can be determined by looking at the messages.log file in the server logs directory. The preamble of the file will contain a line like this:
process = 11488#YourHostName
Depending on the OS you're running on, you can use the kill command (Linux or MacOS), or the Windows Task manager to end the process. When you restart the server, you may want to specify the --clean option like this:
server start defaultServer --clean

Exception when I try to run a liferay portlet on my tomcat server

This is what I get:
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8099; nested exception is: java.net.BindException: Address already in use: JVM_Bind.
I have to mention that I use liferay 7.0 ga3 and tomcat 8.0.32, my ide is eclipse luna.
I tried to run in command line start rmiregistry some_port, but it didn't do nothing, just popped up a window and did effectively nothing.
Thank you!
Tomcat uses port 8099 for JMX communication (which is crucial for debugging). There is already another process using this port. Here are some possibilities:
In general, it is more practical just to finish the other process. A LOT OF TIMES, the other process is Spotify. Are you using Spotify? If so, just finish it, start Liferay and then reopen Spotify. Annoying but straightforward.
You started another Tomcat bundle. In this case, you only have to shut it down.
A previous Liferay execution just crashed and let a rogue Java process listening on the port. In this case, go to the terminal and execute jps:
$ jps
28058 org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
1787 Bootstrap
14207 Jps
Kill the process that is labeled Bootstrap:
$ kill -9 1787
Technically, you could change the port on Tomcat. Open the server configuration, click on "Open Launch Configuration." Then, go to the "Arguments" tab and look for 8099. Basically, follow the GIF below:
However, I do not know all the consequences of it. I used to do it with Tomcat servers without LDS, not sure what problems it could bring with LDS.
Please check whether the shutdown port mentioned in the server.xml file under liferay-dxp-(version)-ga1\tomcat-(version)\conf folder.
Use the below command to find the ports running in your windows machine:
netstat /nao | findstr "80"
then change the shutdown port to any available ports, say 8010:
<Server port="8010" shutdown="SHUTDOWN">
restart the server.
Please try this step if the shutdown port is already in use.

How can I start XServer in Linux through apache user triggered by Perl script running in background?

I am trying to launch MS Office through WINE using a Perl script hosted by apache
and and triggered by other application. I am getting the following error message in
log files "Application trying to create a window but no driver could not be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly".
If I run the script directly on shell prompt using root user then WINE starts
XServer properly and execute MS MSoffice in addition to that if I set xhost +local:apache on shell prompt then also it works fine.
How can I start the XServer from apache user?
It is an exceedingly bad idea to start a X server per httpd worker. If you insist on doing this though, use Xvfb.
My recommendation would be to have a separate daemon handle the document conversion/creation, and use a message queue to pass it jobs.