When I start Server Liferay for the first time everything goes well. But when I stop the server and then I try to start it again, I get the following error:
[ServiceProxyFactory:265] Service
"com.liferay.portal.kernel.cache.SingleVMPool" is unavaiable in 60000
milliseconds while setting field "_singleVMPool" for class
"com.liferay.portal.kernel.cache.SingleVMPoolUtil", will retry...
I have a workaround: delete the %LIFERAY_HOME%\osgi\state folder content and start the server.
How may I solve this issue? Could it be a configuration issue?
When you are using a java agent with Liferay but haven't configured it completely, you can end up with ClassNotFoundExceptions and, in some cases, failures starting the SingleVMPools.
The fix is pretty easy, though, and is covered here: https://community.liferay.com/blogs/-/blogs/liferay-ce-7-x-liferay-dxp-7-x-java-agents
Related
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.
I am trying to debug my code, the eclipse doesn't stating in debug mode, however it is working fine in normal start.
Below is the exception I got in eclipse popup :
Server Tomcat v7.0 Server at localhost was unable to start within 90
seconds. If the server requires more time, try increasing the timeout
in the server editor.
When I look in to the console everything looks fine, please have a look....
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/security/oauth/details.xml]
Mar 11, 2015 11:48:38 AM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from class path resource [dev/com.myPack.plat.data.mongo.config.props/mongo-config.properties]
Please help me on this.
Removing all breakpoints fixed my case
As per the solution, your main problem is that you have included breakpoint in your program. If you don't remember your breakpoint, you can skip those breakpoints during execution of your program. Follow these steps.
Only applicable for Eclipse.
Menu---> Run---> Skip all Breakpoints
Now you can start your tomcat server easily.
Happy learning, happy coding
http://www.oliverspost.com/ for more information
There are multiple reason for not starting tomcat in debug mode in eclipse. Below checkpoint could help you to resolve the issue.
If you are using Window operation system then first check your window firewall specially inbound rule. If it contains javaTM in list then enable rule if it is disable and select enable connection and click on apply and ok.
Check your eclipse preference jre and tomcat runtime configuration. JDK path is more preferable.
Increase timeout if require
Before you start the server, check process in task manager or for mac user check activity monitor. java process need to be kill if it is running.
Restart eclipse and clean build and debug. If issue still persist then take new instance of eclipse. some time eclipse internal setting also restrict tomcat debug mode.
Also there is one other possible solution, Just check out the breakpoints whether they are on line or parameters. i think to remove all those break points is best way to start server in debug mode.
normally this happens when we do pull frequently from git.
Removing breakpoints also worked for me, in fact my problems started when I set a breakpoint in this sentence:
private void process(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
I don't know if the type of the parameters matter, but it was the first time this happens to me.
Restarting the tomcat couple times fixed it for me.
I've inherited a project which i'd like to test in JBoss - the problem is I cant get it to start within Eclipse. It works outside of Eclipse but I have to do a maven build, deploy the WAR files to JBoss and restart JBoss each time I make a change which is a nightmare.
In Eclipse I have added a JBoss 6 server, started it which appears to be fine (i.e. no errors in the console), then I try to run the 2 applications (one server then one client) - however nothing gets printed to the console log - no error or anything. It says started pretty much straight away. Just get a 404 error when going to the localhost:8080/name address.
I understand this may be difficult for someone to assist me here as there is no error message but if anyone has any suggestions or advice it would be much appreciated. I would have thought this should be simple but dont know what im doing wrong...
Eclipse may be running the JBoss server so it listens to a different port. Either that or the 8080 port is already bound so Eclipse can't open it.
Try configuring the JBoss project in Eclipse so it listens at a different port.
[Edit]
Here is a thread on jboss.org that discusses changing the port used by JBoss when running in Eclipse.
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.
I follow this tutorial (http://www.netbeans.org/kb/docs/websvc/rest-mysql.html) and it's success, but when i try with my database, it become error. I already follow step by step , but still error, anyone know how to handle this error? or it's bug too?
MQJMSRA_RA4001:
start:Aborting:Exception starting
EMBEDDED broker=EMBEDDED Broker start
failure:code = 1
java.lang.RuntimeException: EMBEDDED
Broker start failure:code = 1
at com.sun.messaging.jms.ra.EmbeddedBrokerRunner.start(EmbeddedBrokerRunner.java:268)
at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:472)
I had the same issue. Apparently, this happens when you change your server IP address and the lock file keeps the old IP. Simply delete the lock file:
\imq\instances\imqbroker\lock
Source:
http://old.nabble.com/Glassfish-V2-failed-to-start,-broker%3Dembedded,-failure:code-%3D-1-td17728741.html
This seems to be related to bug in GF. Probably upgrade to later GF version will help.