Why isn't RAD (Eclipse) able to properly detect WAS server startup? - java

If I start WAS 6.1 under RAD 8.0.4.1, I see the server start in the console:
[9/24/12 17:21:18:671 EDT] 0000000a WsServerImpl A WSVR0001I: Server server1 open for e-business
RAD continues to indicate that it's waiting for server startup in the progress pane: "Starting WebSphere Application Server v6.1 at localhost". This is a pain because it eventually times out and tells me the server never started even though it's running and responding to requests and it seems like this state means publishing updates as I change code fails to work.
I don't see any errors in the console during server startup - same for the WebSphere 6.1 Launcher's console.
Is there a simple way to fix this?

This question I believe has been asked a few times.
Read this technote and see if any of those suggestions help
http://www-01.ibm.com/support/docview.wss?uid=swg21207553
HTH

Related

webSphere Application server stuck at Starting

I'm using WebSphere 8.5.5.8. In eclipse, I have WebSphere V8.5. When I start the server it gets stuck at 100%. Although it prints
WSVR0001I: Server server1 open for e-business
but it does not completely start and times out. I have tried increasing timeout but it doesn't help.
I do not get any exceptions and I couldn't find any exception in logs as well.
And when it times out it keeps stopping as well and in the end, I have to use task manager to stop it by force.
Within eclipse, if I try to test the connection I get
ADMC0016E: The system cannot create a SOAP connector to connect to host localhost at port 8881.
when it's stopping I can access the admin console as well.

IntelliJ throwing Java.Net.SocketException: unable to open debugger, "socket closed"

I have seen several topics on this problem, but all of them are either for Android Studio or Glassfish.
Problem:
I'm sending a POST Request from Postman to a web app hosted in WebSphere. I set a breakpoint in the web service code in IntelliJ, but when I fire up the debugger, I get this error:
Error running 'WebSphere Traditional 8.5.5.0': Unable to open debugger port
(127.x.x.x:xxxxx): java.net.SocketException "socket closed"
WebSphere Debug Configuration in IntelliJ:
Things I've tried:
read this SO post and discovered the WebSphere debug configuration
restart the app server
restart the web service
restart IntelliJ
restart my PC
read several Android Studio posts on the same subject
read the JavaDoc on Java.net.SocketException
blasphemed
Questions:
If the issue is simply that I need to change the debug port, how can I determine what to change it to?
If necessary, where in the WebSphere Application Server admin console would I navigate to if I wanted to check the sockets? I'm very new to WebSphere AS and the documentation is a bit scattered.
The problem was human error.
Because of my poor understanding of WebSphere, I was starting the server manually, and then starting the web service in IntelliJ.
IntelliJ was trying to launch the server for me, but when it saw that the server was already running, it threw an error stating that the socket was closed.
The solution was simply to let IntelliJ to launch the server as part of the Run process.

Tomcat restarts with errors (exit 143), runs and then fails after time

This is my first time asking a question on Stack Overflow. I recently configured an Ubuntu 16.04 virtual private server to host a web application. I run ngnix on a Tomcat server that reads and writes to a MySQL database. The application runs fine except for the fact that Tomcat restarts itself once in a while which results in a 500 error that stems from a "broken-pipe" when anyone tries to login (i.e. make a connection to the database).
I will post an image of the 500 next time it happens. I went into my vps and looked at my Tomcat restart message. This is what I see: Tomcat status message.
I also did a little diving into the Tomcat logs and this is a log file that corresponds with that restart time: Tomcat log file
I did some research to try and solve this myself, but with no success. I believe that the exit=143 is the process being terminated by another program or the system itself. I also have done some moving of the mysql-connector-java.jar. I read that it should be located in the Tomcat/lib directory and not in the WEB-INF of the web application. Perhaps I need to configure other settings.
Any help or any direction would be much appreciated. I've fought this issue for a week with having learned much, but accomplished little.
Thanks
Look at the timeline. It starts at 19:49:23.766 in the Tomcat log with this message:
A valid shutdown command was received via the shutdown port. Stopping the Server instance.
Exit code 143 is a result of that shutdown and doesn't indicate anything.
The question you need answered is: Who send that shutdown command, and why?
On a side note: The earlier messages indicates that Tomcat lost connection to the database, and that you didn't configure a validation query. You should always configure that, since database connections in the connection pool will go stale, and that needs to be detected.
Theory: Do you have some monitoring service running that tests your application being up? Does that monitoring detect a timed-out database connection, classify that as a hung webapp and auto-restart Tomcat?
While I don't think I am able to see to the core of the problem you have with your overall setup given the small excerpt of your log files, one thing strikes the eye. In the Tomcat log, there is the line
A valid shutdown command was received via the shutdown port. Stopping the server instance.
This explains why the server was restarted. Someone (some external process, a malicious attacker, script, or whatever. Could be anything depending on the setup of your server) sent a shutdown command to Tomcat's shutdown port (8005 by default) which made the Tomcat shut down.
Refer to OWASP's recommendations for securing a Tomcat server instance for fixing this possible security whole.
Regarding the ostensible Hibernate problems you have, I don't get enough information from your logs to make a useful statement. But you can leave the MySQL jar in Tomcat/lib, since this is not the root cause of your problem.

503 Service Unavailable error Apache Tomcat

I try to deploy my Java project Apache Tomcat server but sometimes it gets down and returns me this page
Tomcat is installed on the Digitalocean's Ubuntu 14.04 and droplet's properties are 512Mb/1CPU, 20GB SSD Disk, 1000 GB transfer. I took the lowest option for test purposes. The site is visited by nobody except me and from the graphs I observe that the server is not overloaded at all. Most of the time everything works fine until suddenly the server returns 503. After I restart it keeps working fine again till the next 503 error in several days. I'd like to know what could cause this error: my mistake on configuring the server or maybe problems on server side?
That mean tomcat is not running. You can use the alias command to up the tomcat service or just go in the current directory and start the service.
Example: # tomcatup
/opt/tomcat8/bin/startup.sh

GWT and an unreproducable 503 error

I have a web-application built with GWT (2.0.3) and run on Apache Tomcat 6.
My application uses long polling to enable client-server conversations.
When a client is unable to connect to the server it displays a disconnected message on the page and grays out the controls until it is able to resume conversation with the server.
This happens through the use of the onFailure method of the rpc services; I keep track on how many consequtive exceptions I've received and if it passes a defined threshhold the above scenario happens.
This allows notifying the user of a problem while in the background continuing to resume the server conversation.
This has been the configuration for about 6 months, and without a problem.
I compiled the application after a change and wanted to see it in stand-alone mode so I started up tomcat (not via eclipse) and everything seemed to work fine.
When I ctrl+c'd the apache (while having clients up) I saw the clients displaying a 503 error instead of my app with the disconnected message.
I then tried to reproduce the issue but was unable as the next times the app behaved as expected.
I'm not sure if it's relevant but recently I added an UncaughtExceptionHandler to my module's onModuleLoad.
Has anyone encountered such an issue?
Do you know how I can make my client immune to such an issue?
Thanks a lot,
Ittai
Probably your app tried to connect to server while it was in process of shutting down. Some of the services might have already shut so the request failed with internal server error.
I've got similar issue having an apache httpd in front of the tomcat and stopping tomcat while one of the "background" async requests were being made, due to the security redirection policy the failing request ends redirecting the browser and voilĂ  our 503 error page.

Categories