tomcat cannot find jaas.config

Support for webhosts that use CentOS
Post Reply
jford
Posts: 7
Joined: 2015/12/29 17:21:29

tomcat cannot find jaas.config

Post by jford » 2015/12/29 17:52:25

EDIT

Problem solved. Value of the JAVA_OPTS assignment (everything after the first equals sign) needs to be in double quotes. With that fix, webapp now running with jaas security funcitonal.

Jerry

----------------------------------------------------------------------------------------------------------------------------------------------

I am unable to run tomcat with jaas security on my CentOS 5.5 server. When I start tomcat, I see this in the terminal output:

Code: Select all

/opt/apache-tomcat-8.0.30/conf/../bin/catalina.sh: line 250: -Djava.security.auth.login.config==/opt/apache-tomcat-8.0.30/conf/jaas.config: No such file or directory
The file location is specified in catalina.sh as...

Code: Select all

JAVA_OPTS=$JAVA_OPTS -Djava.security.auth.login.config==$CATALINA_BASE/conf/jaas.config
But the file jaas.config does exist at the specified location. I can see it in a directory listing, and I can edit it in vi.

I use an eApps cloud server running CentOS 5.5. I have a webapp installed by .war file in Tomcat 8.0.30.

The webapp was developed on a Windows 10 machine and deployed via .war file to a tomcat 8.0.27 server installed on the Windows 10 localhost. The webapp runs correctly in that environment (with the config file specifiecation in the catalina.bat file).

Can you help me understand why the file that does exist cannot be found when Tomcat starts?

Thanks.

Jerry

aks
Posts: 2558
Joined: 2014/09/20 11:22:14

Re: tomcat cannot find jaas.config

Post by aks » 2015/12/31 19:49:42

Please mark as resolved then.

jford
Posts: 7
Joined: 2015/12/29 17:21:29

Re: tomcat cannot find jaas.config

Post by jford » 2015/12/31 21:15:29

AKS:

Happy to mark as resolved if only I knew how. I don't see any suitable control, other than what I already did---edit with a note saying it works.

Jerry

User avatar
TrevorH
Forum Moderator
Posts: 23854
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: tomcat cannot find jaas.config

Post by TrevorH » 2016/01/01 10:45:29

You edit your post and change the subject.

Please please do not run CentOS 5.5. It's ancient and massively out of date with numerous security vulnerabilities. The latest and only supported CentOS 5 version is 5.11 and is a simple yum update away. CentOS 5.5 dates from March 2010 so is approaching its 6th birthday which in computer security terms is somewhere near drawing its old age pension...

You can see the full list of all fixes released for RHEL 5 on http://rhn.redhat.com/errata/rhel-server-errata.html and you are missing all updates since 2010! :-(
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

jford
Posts: 7
Joined: 2015/12/29 17:21:29

Re: tomcat cannot find jaas.config

Post by jford » 2016/01/03 18:34:37

TrevorH:

Okay, thanks. Good advice.

I tried this...

Code: Select all

yum -c 'yum update'
...and got this...

Code: Select all

Error: Missing Dependency: libsqlite3.so.0 is needed by package nss-3.19.1-2.el5_11.i386 (updates)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
Running package-cleanup --problems produced this...

Code: Select all

Setting up yum
Reading local RPM database
Processing all local requires
No problems found
So now what do I do?

Jerry

User avatar
TrevorH
Forum Moderator
Posts: 23854
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: tomcat cannot find jaas.config

Post by TrevorH » 2016/01/03 20:22:13

What is the output of rpm -q sqlite
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

jford
Posts: 7
Joined: 2015/12/29 17:21:29

Re: tomcat cannot find jaas.config

Post by jford » 2016/01/03 20:53:19

running rpm -q sqlite yields this...

sqlite-3.6.17-leapps

User avatar
TrevorH
Forum Moderator
Posts: 23854
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: tomcat cannot find jaas.config

Post by TrevorH » 2016/01/03 21:40:52

Yes, that's not a CentOS package. Ours is sqlite-sqlite-3.3.6-7. I'd say that sqlite is on the list of things never ever to replace on a CentOS system since yum depends on it as well as many other system utils. Your next step is to work out where that copy came from, why it was installed, whether it's necessary for something else or if whatever it was that installed it actually requires a newer sqlite. In the end you are going to have to remove it and replace it with the CentOS shipped copy but that will be tricky to do since if you try to remove it then it will want to uninstall half the rest of your system. You might try yum downgrade sqlite with whichever repo provided the newer copy disabled so that it picks up the original CentOS one as the downgrade but check carefully what else will be affected by this before you reply Y to the prompt to go ahead.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply