Apache Tomcat is not finishing startup after deployed in Minikube - Kubernetes - apache

I am trying to deploy a tomcat docker container in the Kubernetes and start the application deployed.
I have installed tomcat inside the docker container and copied my application war file in the tomcat webapps folder. When i ssh into the docker container and tried to start the tomcat server by running the catalina.sh file, tomcat server started deploying my app.war file and stayed there. Tomcat server is not finish starting up.
I tried looking at the logs, but did not help much to track down this issue. I tried deploying the same war file in the docker, it worked perfectly there.
Note: When i restart the minikube, i can see that tomcat tried to deploy the war and also tried to start the server as well. But when i restart the tomcat by navigating to the /tomcat/bin folder and running the catalina.sh start, tomcat server just deployed the war file and not starting up the server.
Here is what the catalina.out looks like
Jan 30, 2018 4:06:09 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Jan 30, 2018 4:06:09 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Jan 30, 2018 4:06:09 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 854 ms
Jan 30, 2018 4:06:09 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 30, 2018 4:06:09 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.82
Jan 30, 2018 4:06:09 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /usr/local/tomcat/webapps/app.war
I appreciate any help on this ..

This issue was happening because of lack of memory for the Node. In my case it is Minikube which is acting as a Node. After i allotted more memory to minikube, i am able to deploy and start my application from tomcat docker container.

Related

Unable to ssh VM after hardware configuration change

I followed the recommandation to reduce the size of my VM (number of CPU from 4 to 2 and memory from 16GO to 8 Go). After updating the configuration and restarting the VM i was not able to access the VM via ssh.
The VM has an external IP.
The troublshoot diagnostic using gcloud does not show any error or issue in the log. Everything is fine regarding the firewall configuration.
I tried to create a new VM under my project (same project as the original VM). I cannot access it with ssh. If i create a new project and a new VM instance under this new project then I can ssh it. --> The problem seems to be related to the project itself.
I tried to access vie serial port and I am getting these errors:
Mar 8 20:31:11 myvm systemd[1]: Started Google OSConfig Agent.
Mar 8 20:32:11 myvm OSConfigAgent[1173]: 2022-03-08T20:32:11.5643Z OSConfigAgent Critical main.go:100: Error parsing metadata, agent cannot start: network error when requesting metadata, make sure your instance has an active network and can reach the metadata server: Get http://169.254.169.254/computeMetadata/v1/?recursive=true&alt=json&wait_for_change=true&last_etag=0&timeout_sec=60: dial tcp 169.254.169.254:80: connect: network is unreachable
Mar 8 20:32:11 myvm systemd[1]: google-osconfig-agent.service: Main process exited, code=exited, status=1/FAILURE
Mar 8 20:32:11 myvm systemd[1]: google-osconfig-agent.service: Failed with result 'exit-code'.
Mar 8 20:32:12 myvm systemd[1]: google-osconfig-agent.service: Service hold-off time over, scheduling restart.
Mar 8 20:32:12 myvm systemd[1]: google-osconfig-agent.service: Scheduled restart job, restart counter is at 4.
I am blocked... I am asking for your support. Any idea or suggestion?

weblogic server hangs in running phase in Jdeveloper 12.2.1.4 when i try to start Integrated web logic server

<Aug 11, 2020 5:08:07,659 PM IST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.> <Aug 11, 2020 5:08:07,773 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
It never says server has been started successfully. I'm facing this issue from the time I started using Jdeveloper 12.2.1.4. I tried to delete the default domain.. Cleaned up the folder system<> folder form AppData/Roaming but still the issue is not yet solved
The solution for this was to disable the proxy settings in tools-> preferences -> Web browser and proxy -> set the proxy to no proxy

Tomcat 7 deployed Web Application 404 Status

I have deployed a web application to Tomcat 7.0.47 however I see a 404 status.
I can access Tomcat homepage and Tomcat Application Manager without issues.
Here are the log files:
catalina.2016-07-13
Jul 13, 2016 8:51:29 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_31\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;F:\MATLAB\R2014a\runtime\win64;F:\MATLAB\R2014a\bin;C:\Program Files\MATLAB\R2012a\runtime\win64;C:\Program Files\MATLAB\R2012a\bin;C:\Program Files (x86)\PharosSystems\Core;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP\;C:\Program Files\apache-maven-3.3.9-bin\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;.
Jul 13, 2016 8:51:29 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jul 13, 2016 8:51:29 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jul 13, 2016 8:51:29 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 514 ms
Jul 13, 2016 8:51:29 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 13, 2016 8:51:29 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Jul 13, 2016 8:51:29 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\apache-tomcat-7.0.47\webapps\cs144.war
Jul 13, 2016 8:51:30 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.47\webapps\docs
Jul 13, 2016 8:51:30 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.47\webapps\examples
Jul 13, 2016 8:51:30 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.47\webapps\host-manager
Jul 13, 2016 8:51:31 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.47\webapps\manager
Jul 13, 2016 8:51:31 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.47\webapps\ROOT
Jul 13, 2016 8:51:31 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.47\webapps\Struts2Example
Jul 13, 2016 8:51:31 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.47\webapps\zurmo
Jul 13, 2016 8:51:31 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jul 13, 2016 8:51:31 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jul 13, 2016 8:51:31 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1435 ms
localhost.2016-07-13
Jul 13, 2016 8:51:30 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 13, 2016 8:51:30 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 13, 2016 8:51:30 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache#7a1f7380')
localhost_access_log.2016-07-13
0:0:0:0:0:0:0:1 - admin [13/Jul/2016:08:53:14 +0430] "POST /manager/html/upload?org.apache.catalina.filters.CSRF_NONCE=210FE5528CB1E9D58F23E5A11655B102 HTTP/1.1" 403 3287
0:0:0:0:0:0:0:1 - - [13/Jul/2016:08:53:14 +0430] "GET /favicon.ico HTTP/1.1" 200 21630
0:0:0:0:0:0:0:1 - - [13/Jul/2016:08:53:18 +0430] "GET /manager/ HTTP/1.1" 302 -
0:0:0:0:0:0:0:1 - admin [13/Jul/2016:08:53:18 +0430] "GET /manager/html?org.apache.catalina.filters.CSRF_NONCE=7D8792E571C6ABBD8D35351293AF54B8 HTTP/1.1" 200 20949
0:0:0:0:0:0:0:1 - - [13/Jul/2016:08:53:33 +0430] "GET /cs144/ HTTP/1.1" 404 963
manager.2016-07-13
Jul 13, 2016 8:53:14 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost'
Jul 13, 2016 8:53:14 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Global resources are available
Jul 13, 2016 8:53:18 AM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
What you need to do is use the facility in web.xml.
The servlet spec provides a facility for applications to indicate what file(s) should be used when the client doesn't specify one in a path -- e.g. GET /directory/. You can specify as many files as you want, and the first one found will be used. So you could have e.g. index.html in there as well as anything else you might want. The default list is (in order):
index.html
index.htm
index.jsp
If you specify a <welcome-file-list> in your web.xml, you'll override the default. So, if you want to be able to fall-back to the original list, you'll need to specify all of the options.
Example:
web.xml
...
...
<welcome-file-list>
<welcome-file>results.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
...
...
The web.xml file should be in your application's WEB-INF/web.xml, and probably already exists. Make sure you follow the schema and put it in the right place.

ERROR: Initialization failure: Cannot create configuration

i'm trying to get CouldBees working. Heres the error i get when im running:
C:\cloudbees-sdk-1.5.0>bees init --proxyHost=localhost --proxyPort=8008 (or 8080)
You have not created a CloudBees configuration profile, let's create
one now... Enter your default CloudBees API end point [us | eu]: eu
Enter your CloudBees account email address: abs#abs.com
Enter your CloudBees account password: Jul 18, 2013 1:32:09 PM
org.apache.commons.httpclient.HttpMethodDirector execute WithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing
request: Connection refused: connect Jul 18, 2013 1:32:09 PM
org.apache.commons.httpclient.HttpMethodDirector execute WithRetry
INFO: Retrying request Jul 18, 2013 1:32:10 PM
org.apache.commons.httpclient.HttpMethodDirector execute WithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing
request: Connection refused: connect Jul 18, 2013 1:32:10 PM
org.apache.commons.httpclient.HttpMethodDirector execute WithRetry
INFO: Retrying request Jul 18, 2013 1:32:11 PM
org.apache.commons.httpclient.HttpMethodDirector execute WithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing
request: Connection refused: connect Jul 18, 2013 1:32:11 PM
org.apache.commons.httpclient.HttpMethodDirector execute WithRetry
INFO: Retrying request
ERROR: Initialization failure: Cannot create configuration
Can anyone read out what's causing this error?
It looks like the SDK can't establish Internet connections to the CloudBees website. If you are running behind a proxy, you will need to use proxy flags to connect.
bees init --proxyHost=YOUR_PROXY_HOST --proxyPort=YOUR_PROXY_PORT
This is covered in the CloudBees SDK docs: Running behind a proxy
It helps, to set the system time exactly to six hours ago (US-time).
Also cloudbees documentation sais, that You should create on your file system (under Windows7) c:\Users\Your_User.bees\bees.config file, which contains following line (if you want to call cloudbbees eu server):
bees.api.url=https\://api-eu.cloudbees.com/api>
but actually it didn't help in my case (maybe outdated version)

jdbc connection on tomcat server

I will try to formulate as best as I can.
First, web application(Spring MVC with Spring Jdbc) worked well until I started messing out with versions of STS(Spring Tool Suite based on Eclipse) and JDK+JRE7 to get features of Java 7.
Second, the current problem is that Apache Tomcat 6 or 7(I have both which I reinstalled for reason I don't remember) seems to be affecting the connection to the database. Saying directly: it fails to get jdbc connection
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: No suitable driver found for jdbc:postgresql:postgres
and it happens whenever I try to do any operation on database from my web application.
The line jdbc:postgresql:postgres is OK just in case, because it worked before and it effectively says to connect to local database with name postgres(and also because of the point below).
Another important point to mention is that under vFabric tc Server everything works flawlessly without any problems whatsoever.
Third, the database is PostgreSql along with Apache DBCP pooling.
Fourth, the maven jdbc driver dependencies seems to work well, as again if they didn't vFabric tc Server would also fail same as Apache Tomcat which leads to me to an idea that Apache Tomcat is itself the culprit.
Some of the information produced during server start-up:
Dec 14, 2011 4:54:32 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\ProgramFiles\Java\jdk1.7.0_02\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files\Apache Software Foundation\apache-maven-3.0.3\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\QuickTime\QTSystem\;.
Dec 14, 2011 4:54:32 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 14, 2011 4:54:32 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 14, 2011 4:54:32 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 849 ms
Dec 14, 2011 4:54:32 PM org.apache.catalina.core.StandardServicestartInternal
INFO: Starting service Catalina
Dec 14, 2011 4:54:32 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
Dec 14, 2011 4:54:33 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\User\Documents\workspace-sts\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\project.xml
Dec 14, 2011 4:54:33 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:project' did not find a matching property.
Dec 14, 2011 4:54:34 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Dec 14, 2011 4:54:37 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Dec 14, 2011 4:54:37 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 14, 2011 4:54:37 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4664 ms
I am really desperate please help.
UPDATE:
Still sitting in front looking at sad screen, so I decided to include all the .xml configuration.
<bean id="dataSource" class="org.apache.commons.dbcp.PoolingDataSource">
<constructor-arg ref="connectionPool"/>
</bean>
<bean id ="connectionPool" class="org.apache.commons.pool.impl.GenericObjectPool">
<constructor-arg><null/></constructor-arg>
</bean>
<bean id="poolableConnectionFactory" class="org.apache.commons.dbcp.PoolableConnectionFactory" >
<constructor-arg ref="connectionFactory"/>
<constructor-arg ref="connectionPool"/>
<constructor-arg><null/></constructor-arg>
<constructor-arg><null/></constructor-arg>
<constructor-arg value="false"/>
<constructor-arg value="true"/>
</bean>
<bean id="connectionFactory" class="org.apache.commons.dbcp.DriverManagerConnectionFactory">
<constructor-arg value="jdbc:postgresql:postgres"/>
<constructor-arg value="postgres"/>
<constructor-arg value="myCorrectPassword"/>
</bean>
In grl, I'd say that DB drivers should probably go into the common lib folder on Tomcat.
Usually those drivers are used for several applications.
Additionally, if you set your pool in the context.xml, this is required.