LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-17-2014, 09:58 AM   #1
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Blog Entries: 2

Rep: Reputation: 85
Unable to start Apache Tomcat


Hi guys,

When I try starting Apache Tomcat by executing startup.sh, it seems to start properly:

Code:
$ ./startup.sh 
Using CATALINA_BASE:   /home/aaditya/DataLinux/apache/apache-tomcat-7.0.55
Using CATALINA_HOME:   /home/aaditya/DataLinux/apache/apache-tomcat-7.0.55
Using CATALINA_TMPDIR: /home/aaditya/DataLinux/apache/apache-tomcat-7.0.55/temp
Using JRE_HOME:        /usr/lib64/java
Using CLASSPATH:       /home/aaditya/DataLinux/apache/apache-tomcat-7.0.55/bin/bootstrap.jar:/home/aaditya/DataLinux/apache/apache-tomcat-7.0.55/bin/tomcat-juli.jar
Tomcat started.
But when I type localhost:8080 in Firefox, I get:
Quote:
"Unable to connect"
Firefox can't establish a connection to the server at localhost:8080.
I read this thread which seems to shed some light on the topic, and on typing the command netstat -an | grep 8080, I get no output, which means its not starting correctly.

So then I tried looking at the catalina.out log file, and this is what I get:

Quote:
Sep 17, 2014 7:48:39 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: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.security.ProviderException: Could not initialize NSS
at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:223)
at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:103)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:224)
at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:206)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:206)
at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:187)
at sun.security.jca.ProviderList.loadAll(ProviderList.java:281)
at sun.security.jca.ProviderList.removeInvalid(ProviderList.java:298)
at sun.security.jca.Providers.getFullProviderList(Providers.java:176)
at java.security.Security.getProviders(Security.java:458)
at org.apache.catalina.core.JreMemoryLeakPreventionListener.lifecycleEvent(JreMemoryLeakPreventionListe ner.java:407)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:99)
at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
Caused by: java.io.IOException: nssLibDir must be a directory:/usr/lib64/seamonkey
at sun.security.pkcs11.Secmod.initialize(Secmod.java:188)
at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:218)
... 27 more
Sep 17, 2014 7:48:39 PM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_start]) for component [StandardServer[8005]] in state [INITIALIZING]
at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:409)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:144)
at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
The things that seem to stand out are:

java.security.ProviderException: Could not initialize NSS
Caused by: java.io.IOException: nssLibDir must be a directory:/usr/lib64/seamonkey


But I am puzzled why it is looking for seamonkey, and how to rectify it (I dont have seamonkey installed).

Some packages that are installed are:
Code:
$ slackpkg search nss

DONE

The list below shows all packages with name matching "nss".

[ Status           ] [ Repository               ] [ Package                                  ]
   installed                                        mozilla-nss-3.16.4-x86_64-1               
   installed                                        openssh-6.6p1-x86_64-3_slack14.1          
   installed                                        openssl-1.0.1i-x86_64-1_slack14.1         
   installed                                        openssl-solibs-1.0.1i-x86_64-1_slack14.1  
   installed                                        transset-1.0.1-x86_64-1                   
  uninstalled          alienbob                     lxqt-openssh-askpass-0.7.0-x86_64-1alien  
  uninstalled          alienbob                     pyopenssl-0.11-x86_64-1alien              
  uninstalled          multilib                     openssl-solibs-compat32-1.0.1i-x86_64-1_slack14.1compat32  
  uninstalled          multilib                     openssl-compat32-1.0.1i-x86_64-1_slack14.1compat32  

$ slackpkg search jdk

DONE

The list below shows all packages with name matching "jdk".

[ Status           ] [ Repository               ] [ Package                                  ]
   installed           alienbob                     openjdk-7u65_b32-x86_64-2alien            
  uninstalled          alienbob                     openjre-7u65_b32-x86_64-2alien            
  upgrade              slacky                       openjdk-7u65_b32-x86_64-2alien --> openjdk-7u55_b14-x86_64-1sl  

$ slackpkg search icedtea

DONE

The list below shows all packages with name matching "icedtea".

[ Status           ] [ Repository               ] [ Package                                  ]
   installed           alienbob                     icedtea-web-1.5.1-x86_64-1alien           
  upgrade              slacky                       icedtea-web-1.5.1-x86_64-1alien --> icedtea-web-1.5-x86_64-1sl
Thanks in advance for any advice.
 
Old 09-17-2014, 10:08 AM   #2
bosth
Member
 
Registered: Apr 2011
Location: British Columbia, Canada
Posts: 304

Rep: Reputation: 127Reputation: 127
I'd recommend that you use the Tomcat SlackBuild and ensure that you have the dependencies listed there installed as well.
 
Old 09-17-2014, 10:15 AM   #3
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272

Original Poster
Blog Entries: 2

Rep: Reputation: 85
Quote:
Originally Posted by bosth View Post
I'd recommend that you use the Tomcat SlackBuild and ensure that you have the dependencies listed there installed as well.
That thought had crossed my mind, and so I installed commons-daemon and apache-ant, which were the dependencies I did not have installed, but it did not seem to make a difference, same error.

I would like to use the downloaded copy of tomcat, so that I can use it on my other distro too (it works there).
 
Old 09-17-2014, 10:39 AM   #4
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272

Original Poster
Blog Entries: 2

Rep: Reputation: 85
I think I am getting further along..

This is the content of /etc/java/nss.conf

Quote:
name = NSS
nssLibraryDirectory = /usr/lib64/seamonkey
nssDbMode = noDb
attributes = compatibility
handleStartupErrors = ignoreMultipleInitialisation
So probably just need to correct it

Edit-

Solved.
Changed: nssLibraryDirectory = /usr/lib64/

Code:
$ bin/startup.sh 
Using CATALINA_BASE:   /home/aaditya/DataLinux/apache/apache-tomcat-7.0.55
Using CATALINA_HOME:   /home/aaditya/DataLinux/apache/apache-tomcat-7.0.55
Using CATALINA_TMPDIR: /home/aaditya/DataLinux/apache/apache-tomcat-7.0.55/temp
Using JRE_HOME:        /usr/lib64/java
Using CLASSPATH:       /home/aaditya/DataLinux/apache/apache-tomcat-7.0.55/bin/bootstrap.jar:/home/aaditya/DataLinux/apache/apache-tomcat-7.0.55/bin/tomcat-juli.jar
Tomcat started.

$ netstat -an | grep 8080
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN

Last edited by aaditya; 09-17-2014 at 11:56 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] unable to stop start tomcat fachhoch@gmail.com Linux - Newbie 0 05-16-2012 04:08 AM
How to automaticall start apache-tomcat-6.0.20 ytd Linux - General 2 04-27-2010 12:11 AM
Start Tomcat before Apache on boot Swakoo Linux - Server 3 04-10-2007 02:25 AM
Tomcat Unable to Start - Exception PerfectReign Linux - Software 2 08-10-2006 05:24 PM
Unable to start Tomcat 4 on Linux Manav Linux - Newbie 5 08-22-2003 05:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration