Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On Centos 6.4, I am trying to run multiple instances of tomcat based on this tutorial: http://www.openlogic.com/wazi/bid/188102/

in order to illustrate the problem, I copy the default configuration to a new instance /srv/tomcat/solr keeping the same default port values (and I stop the default service /etc/init.d/tomcat6 to avoid port conflicts), as follows:

sudo su -

yum install tomcat6

name=solr

mkdir -p /srv/tomcat/${name}/logs
mkdir /srv/tomcat/${name}/webapps
mkdir /srv/tomcat/${name}/work
mkdir /srv/tomcat/${name}/temp
cp -R /usr/share/tomcat6/conf/ /srv/tomcat/${name}
#rm /srv/tomcat/${name}/conf/tomcat6.conf  # this line is not in the tutorial, but adding it produces the same result
chown -R tomcat. /srv/tomcat/

ln -s /etc/init.d/tomcat6 /etc/init.d/${name}

cat >/etc/sysconfig/${name} <<EOF
CATALINA_BASE="/srv/tomcat/${name}"
CATALINA_PID="/var/run/${name}.pid"
CONNECTOR_PORT="8080"
TOMCAT_LOG="/srv/tomcat/${name}/logs/catalina.out"
EOF

# I keep the default port values at: /srv/tomcat/solr/conf/server.xml

/etc/init.d/tomcat6 stop   # to avoid port conflicts
/etc/init.d/${name} start  # i start my new instance

[root@localhost ~]# /etc/init.d/${name} start
Starting solr:                                             [  OK  ]

[root@localhost ~]# /etc/init.d/${name} status
PID file exists, but process is not running                [FAILED]

[root@localhost ~]# cat /srv/tomcat/solr/logs/catalina.out 
/usr/sbin/tomcat6: line 30: /srv/tomcat/solr/logs/catalina.out: Permission denied

what can be the problem?

share|improve this question
add comment

1 Answer 1

In /etc/sysconfig/${name}, remove the following line

TOMCAT_LOG="/srv/tomcat/${name}/logs/catalina.out"

it's the default path (anyway) and it's causing your error

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.