0 sessions of application deployed in tomcat - session

I'm using Tomcat 8.5.50. I deployed an application, but I get 404 accessing any resource of that application. Tomcat manager is running (localhost:8080/manager/html/list) though and it says the app is also running. However, in Sessions column of the manager there are 0 sessions of the /app and 1 session of /manager.
Why are there 0 sessions?

Related

Failed to validate newly established connection - Grails 4

We are using Grails 4 framework for our web application with oracle database. Everything work fine when we host the application locally. However, when we migrated the application to production environment, application is getting disconnected with database server intermittently. On checking the tomcat logs we are getting " SQLexception Failed to validate newly established connection" error.
SQL error
Application.yml

IBM Mobilefirst 8.0 session persistence error

Setup:
2 HTTP Servers
1 Load Balancer between 2 HTTP server and 2 MobileFirst servers
2 MobileFirst server 8.0 s on Liberty Farm 8.5.5
IBM DB2
i am facing an issue with session affinity during mobilefirst server failover. when it failed over to other server, the console says the session has expired.
i followed the below link to configure the session persistence for Liberty but the procedure is not clear. i created sessions database but it doesn't create any table under that.
http://www.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/twlp_admin_session_persistence.html
the web plugin config.xml files is configured to point so it's like HTTP server > LB > mobilefirst servers.

Deploying Confluence to OpenShift?

I deployed Confluence 5.1 as a WAR to an OpenShift Tomcat 6 Cartridge.
Visiting the instance with my web-browser I get:
Error occurred during template rendering: Velocimacro : Error using VM library : template/includes/macros-deprecated.vm. Contact your administrator for assistance.
With the relevant portion of the server logs saying:
2013-04-14 05:32:03,322 FATAL [ContainerBackgroundProcessor[StandardEngine[Catalina]]] [atlassian.spring.container.SpringContainerContext] getComponent Spring Application context has not been set
2013-04-14 05:32:03,323 ERROR [ContainerBackgroundProcessor[StandardEngine[Catalina]]] [confluence.user.listeners.UserSessionExpiryListener] sessionDestroyed Application server does not give us access to expired sessions. Listeners that depend on receiving LogoutEvent will not be reliable. This web server is probably unsupported.
java.lang.IllegalStateException: Spring Application context has not been set
Atlassian support tells me to chown the Tomcat directories; but OpenShift doesn't seem to allow this.
How can I successfully install Confluence 5.1 on OpenShift?
You could use a DIY cartridge and deploy tomcat yourself. Using an action hook (for example the deploy hook) you could also adjust permissions if this is still required.

Restoring JSF application state using memcached as session fail-over

I set up two equal tomcat servers that host the same web application (Sun RI JSF 2 / Tomahawk). For load balancing and fail-over scenarios I use an nginx server as reverse proxy delegating the request to the one or the other server. Right now one tomcat is defines as backup solution, so that tomcat server 1 handles all the requests. When I kill the process of tomcat 1, nginx nicely delegates the following requests to tomcat server 2. In order to reuse the session data I configured both tomcat servers to use memcached as session store. JSF is configured to store its state on the server.
Concerning the log files, this setup looks quite nice and session data is read and stored using the memcached server. This for example facilitates using the web application without the need to login again even if tomcat 1 has been shut down.
Nevertheless it seems as if my (session scoped) backing beans are not stored or being used after restoring the session respectively. Form fields are left empty that are supposed to be filled with the data from the session bean.
Is it possible to do such things with the mentioned technologies at all?
With memcached-session-manager and OWB you should use tomcat < 7.0.22 as in this version the notification of ServletRequestListeners got changed (which is the mechanism used by OWB for failover support).
I'm currently working on a new version of msm that works with OWB and tomcat >= 7.0.22.

Jetty / Tomcat session saving

Where does Tomcat or Jetty saves the sessionids (without session persistence configuration)? Does it go anywhere in the file system, or does it stay just in memory?
Tomcat uses the StandardManager by default to manage it's session data. During run-time this data is not persisted to a store and exists only in memory. When you shutdown Tomcat it will try to persist all the session data to $TOMCAT_HOME/work/Catalina///SESSIONS.ser. Tomcat will try to reload these session on next startup and it will also delete the SESSIONS.ser file after a successful start. If your server dies or you execute a kill -9 this session data will be lost.
Documentation for the StandardManager is here http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html
I don't know Jetty very well but Jetty does not have any persistence by default so the sessions are in memory. You can enable persistence if you want and its documented here docs.codehaus.org/display/JETTY/Persisting+Sessions.
Hope this helps.

Resources