Grails 2.1 apps deployment on tomcat cluster - apache

I had build a stand alone application on grails 2.1 which uses quart scheduler.
Now I need to deploy this application on Apache tomcat cluster using mod_jk connector.
I am running multiple instance of tomcat and and using Delta Manager for managing the session, but it's not working as I am able to log in the first tomcat instance deployed apps but when I am trying to log into the second instance ,then it won't fetch user information from database and give message that user name or password incorrect.
Even if I stop the first instance, still it won't let me log into the system. I try to find solution online for this problem but didn't get any information on how to deploy grails 2.1 web application on tomcat cluster using mod_jk connector. All the information is available for grails 1.3 version which is pretty old and not relevant for grails 2.1.
Any help would be appreciated.

Related

Apache Tomac Web Server and LOG4J Framework

I am new to Web Service and LAMP Stack.Currently I am working on a Web Application.It is a PHP Based Application that uses Apache Tomcat Web Server 8.0.26 ,MySQL Database ad Linux operating system(LAMP Stack).It has Web Services in Spring.
Following are the issues I am facing with the Application:-
1) Responses are slow over a period of few weeks from a web service hosted on tomcat.
Temporary Solution:-The problem is solved when we restart the Web Server.
2) What are the tools we can use to monitor tomcat / performance ?
Regards
Kaustubh
Take the dump of heap usage before and after of slow down and analyze. And also check your connection pooling with the database, check whether logs are getting rotated properly or not, check the number of active sessions in tomcat admin console.

Cannot Access Tomcat 7 Admin when multiple webapps are installed

I installed Apache Tomcat 7. During the install, it asks if I want to do a full install or if I want to install just the web service. I chose to install the full package (Tomcat and a web service). When it finished, I had a windows service I could start. I could then view/use the web-based tomcat admin panel.
I shut down the service and re-ran the installer to setup an additional web service. I will have a couple dozen web apps to setup. During the install, I selected the "Web Service Only" so I could install the additional web app without installing Tomcat again. The installation finished OK.
I checked the installation folders and see both of my web services setup in the webapps folder. I start the tomcat service OK. When I attempt to view the web-based admin panel for either web service .. the originally installed web service and the second web service, tomcat seems to hang. When I attempt to shutdown the service, it doesn't shutdown properly and displays the windows error "unable to shutdown service". Eventually I can kill the process.
What could be causing this issue? I'm new to Tomcat on Windows so I apologize if I did not provide enough information. The web-based admin panel DOES work when I have a single webapp. When I have two or more webapps, the admin panel quits working (hangs).
Any ideas?
If you have Tomcat install a separate service for each web application, then you should be able to control each of them separately. They will be running separate JVMs, separate Tomcat services, etc.
If you had instead intended to have a single service with multiple applications deployed on it, then it appears that you may have made a mistake and configured multiple services instead.
From the command-line, you can launch the Tomcat service manager and specify exactly which of the Windows Services you'd like to control. For example:
C:\path\to\tomcat> tomcat8w.exe //ES//MyService
(Where MyService is the name you gave to your Windows Service when you configured it.)
You can find more information on Tomcat's Windows Service Documentation.

How to solve management service not starting up in Worklight 6.2

I have installed Worklight 6.2 on Linux, using Liberty 8.5.5 and DB2 10.5. Created the DB2 databases for WRKLGHT and WLREPORT. Have executed the Server Configuration Tool and successfully created a Worklight Server configuration (did not have any errors in the Console view when running the Ant tasks, tables were created successfully in the database, and configuration shows deployed status in the SCT). Created a runtime environment in the SCT, also seemed to succeed (no errors in Console view, tables created/updated, runtime environment shows deployed in the SCT). Stopped and restarted the Liberty server.
Can hit Worklight admin at (/worklightconsole) and log in successfully using my demo user, however it then indicates there are no runtime environments. When trying to access runtime environment at /worklight/console (which should be the correct URL given how I created the runtime config in SCT using my Worklight project WAR), I get various errors: first "Service unavailable since initialization is not yet complete." then after retrying for about a minute or two I get "javax.servlet.ServletException: java.lang.RuntimeException: Timeout while waiting for the management service to start up at com.worklight.core.auth.impl.AuthenticationFilter.isWaitingForInitialization(AuthenticationFilter.java:561)".
Seems the management service is not starting up successfully. Upon reviewing the messages.log I see the following error precede it: "FWLSE0242E: Failed to synchronize application runtime information. The servlet initialization failed and the servlet will deny serve. The most common reason is a failure in JMX communication with the ''worklightadmin'' service. You need to restart the web application after fixing the problem. [project worklight]" and this creates an FFDC log.
I know this is a lot of information but trying to be complete. Anything I should check to fix the JMX communication issue and get the management service starting?
Thank you for the replies back. Turns out there is an issue with Liberty (I was on 8.5.5.0) and the IBM JDK I was using (1.7_64). Swapped out to the Oracle JRE (1.7.0_60-b19), pointed Liberty to use it, and the problem was solved. I am pursuing a fix with the Liberty team through IBM Support for this issue.
I cannot give a unique solution, but I can explain the situation and this may lead to a solution.
The runtime servlet initialization tries to contact the Worklight Admin service. The Worklight Admin service is a web application that must be running when the runtime starts. The runtime was not able to find the Worklight Admin service. It waited a while, in case that the Worklight Admin service is just starting up, but then gave up due to a timeout because within a given time, it could not find the Worklight Admin service.
Possible reasons:
the web server is not at all configured to run the Worklight Admin service. In your case, this seems not the problem, since you can access the Worklight Console. You should also see in the log file whether the Worklight Admin service did start.
the worklightadmin service might never start up ... this could be a configuration problem, e.g. with the WLADMIN data base. This could also be detected from the server logs.
when the runtimes and the Worklight Admin service start up together, it might be that the Worklight Admin service simply takes too long to start. Let's say you have 100 webapps, and the runtime starts first and the Worklight Admin service starts last, it could be that the 98 other webapps take too much time to start. In that case, make your web server lighter ... run only Worklight on that webserver, nothing else.
the Worklight Admin service starts, but the runtime cannot communicate with it. This indicates that the JMX communication is misconfigured. Follow the documentation of the webserver how to configure JMX. For liberty, see http://www-01.ibm.com/support/knowledgecenter/SSD28V_8.5.5/com.ibm.websphere.wlp.core.doc/ae/twlp_admin_restconnector.html?cp=SSD28V_8.5.5%2F1-5-2-10-1&lang=en

weblogic AS: application deployed on a cluster with two managed servers

I'm on Weblogic AS 10.3.5, I have two managed servers pointed to a cluster, so I have two url, one for the first managed server, the other one for the second.
I will deploy my application on the cluster, so will I reach it on both the url? will the application deployed and running on both the servers?
How does it work? Can you give me some references, please?
Is it clear?
Thanks a lot!
First, you shouldn't be using WebLogic 10.3.5 anymore since it has reached the last stage of support called Sustained Support. Consider to upgrade at least to WebLogic 10.3.6.
Related to your question, I believe you are talking about a Web Application and how to access it. First you need to read about Load Balancing in a Cluster. For the web part (JSP and Servlets) basically you have to options: setup a Web Server (like Apache HTTP) to make use of the WebLogic Plug-in, that will then be connected to the WebLogic cluster. The other easier option is to simply use an LBR (load balance router hardware).
These are the "software" solutions you have for Load Balancing your web application in a clustered WebLogic:
WebLogic Server supports the following Web servers and associated
proxy plug-ins:
WebLogic Server with the HttpClusterServlet
Netscape Enterprise Server with the Netscape (proxy) plug-in
Apache with the Apache Server (proxy) plug-in
Microsoft Internet Information Server with the Microsoft-IIS (proxy) plug-in
You can read more about this options at the Configure Proxy Plug-ins documentation page for WebLogic 10.3.6.

issues on download Apache Tomcat

I am trying to install Apache Tomcat, but I find to different files:
one is CORE while another is Deployer
which one should I choose?
Download CORE. From the documentation:
the Client Deployer, which is a command shell based script that interacts with the Tomcat Manager but provides additional functionality such as compiling and validating web applications as well as packaging web application into web application resource (WAR) files
The deployer is just a tool. It does not include the Tomcat server.