You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Loai Abdallatif <lo...@gmail.com> on 2018/03/17 13:16:34 UTC
I cant start Tomcat instances
Dear Colleagues
I'm new to tomcat, I have successfully installed the service but when I
tried to run three instances I coudnt due to error below
: the this I did is copied the cataline Home to three instances tomcat0,
tomcat1, and tomcat2 directories
and in each directory I have configured the connectors ports, AJP port and
addresses .
the tomcat main instance is working but I think the problem is that in
CATALINA_BASE .but I dont know how to instruct the statup script
root@appserver01:/opt/tomcat0# ./startup-instance0.sh
./startup-instance0.sh: line 3: ./startup.sh: No such file or directory
root@appserver01:/opt/tomcat0#
root@appserver01:/opt/tomcat0#
root@appserver01:/opt/tomcat0# cat startup-instance0.sh
export CATALINA_BASE=/opt/tomcat0
cd $CATALINA_HOME/bin
./startup.sh
Re: I cant start Tomcat instances
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Loai,
On 3/17/18 1:58 PM, Loai Abdallatif wrote:
> On Sat, Mar 17, 2018 at 3:39 PM, Olaf Kock <to...@olafkock.de>
> wrote:
>
>> On 17.03.2018 14:16, Loai Abdallatif wrote:
>>
>>> Dear Colleagues I'm new to tomcat, I have successfully
>>> installed the service but when I tried to run three instances I
>>> coudnt due to error below
>>>
>>> : the this I did is copied the cataline Home to three instances
>>> tomcat0, tomcat1, and tomcat2 directories
>>>
>>> and in each directory I have configured the connectors ports,
>>> AJP port and addresses . the tomcat main instance is working
>>> but I think the problem is that in CATALINA_BASE .but I dont
>>> know how to instruct the statup script
>>>
>>>
>>> root@appserver01:/opt/tomcat0# ./startup-instance0.sh
>>> ./startup-instance0.sh: line 3: ./startup.sh: No such file or
>>> directory root@appserver01:/opt/tomcat0#
>>> root@appserver01:/opt/tomcat0# root@appserver01:/opt/tomcat0#
>>> cat startup-instance0.sh export CATALINA_BASE=/opt/tomcat0 cd
>>> $CATALINA_HOME/bin ./startup.sh
>>>
>>
>> well,
>>
>> ./startup.sh: No such file or directory
>>
>> Did you see that you set CATALINA_BASE (note: BASE) and then cd
>> to the undefined CATALINA_HOME/bin (note: HOME)? You probably
>> didn't intend this: Both are typically undefined on a system
>> level, so you're probably not cding into the directory you
>> intend.
>>
> Thanks Olaf
>
> so how to tell the tomcat the instance 0 to take its config from
> tomcat0 directory.
Have a look at the RUNNING.txt file under the "Advanced" heading. It
explains how to use a single Tomcat binary install (rooted at
CATALINA_HOME) and separate configurations for each instance you want
to run (each rooted under a different CATALINA_BASE). Note the
difference between those two environment variable names.
I think you want your script to look like this:
== CUT ==
export CATALINA_HOME="/opt/apache-tomcat-8.5.29"
export CATALINA_BASE="/opt/tomcat0"
"$CATALINA_HOME/bin/startup.sh"
== CUT ==
There is no need to "cd" to the directory which contains the script.
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqvuvMdHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFhv7hAAsc8c6lVzHjyFrlLe
X++61J9cJ7PXkKJcMXHzX0bZnkB2jiG3kr9oDcH5ajZ772A9eJsUMmChP3fXA2EU
nxN67Crsv7X09oWqr81swmh6BL4FSkYX5wO3V8KoMUTbev/Lw+snksEdp3534HZ7
ZslXsPNPUku3GK4/BIPnXxDCGR8u2wmb2qTIIfOxYvgklWyIifkJMVf9642evICA
UiBha66gu01XeYPejH8rMGX5/1itg59wJi6xPsgi6Ig/JZtKCkqxCy9rUuWn6dQB
AhRjLO826Uj2Pn8I9gU+Gq4gv11Ah8RTRcDIxzVpqMLIpuFHkMa9te9K2ra9eCrM
oQ4QAtEyJ/i3cxx31oM/MONDdD33cGnmRYo+6La003Wtl50zadYaza9K06APnHe8
+I9RtUFNiCYfa+EtxCo+QQOwz1BDnfm9yQyNWDJexHM/xIbykoeg3E9Tzwur8Phc
zUZgv1gV0KFtLH24x1ogblu+j8jDD6mWCUoV2eNA51lNyEaGdnXvd7gG95kAajsc
3qZkXBml40YbPlM3/JtxIx/0pCTaexslosGo3WaIWrtKSPQbPNUVoZOHzSVq9MR2
AcM+sjNcqYV9d9Cee0W3XANnqh5ileoasDT2gvV5WDqP8EEEFp7f/OePGNUD6Aj7
eBA8gpMLiUC7LUKYugHRuMxNbxQ=
=jzxn
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: I cant start Tomcat instances
Posted by Loai Abdallatif <lo...@gmail.com>.
Thanks Olaf
so how to tell the tomcat the instance 0 to take its config from tomcat0
directory .
On Sat, Mar 17, 2018 at 3:39 PM, Olaf Kock <to...@olafkock.de> wrote:
>
>
> On 17.03.2018 14:16, Loai Abdallatif wrote:
>
>> Dear Colleagues
>> I'm new to tomcat, I have successfully installed the service but when I
>> tried to run three instances I coudnt due to error below
>>
>> : the this I did is copied the cataline Home to three instances tomcat0,
>> tomcat1, and tomcat2 directories
>>
>> and in each directory I have configured the connectors ports, AJP port and
>> addresses .
>> the tomcat main instance is working but I think the problem is that in
>> CATALINA_BASE .but I dont know how to instruct the statup script
>>
>>
>> root@appserver01:/opt/tomcat0# ./startup-instance0.sh
>> ./startup-instance0.sh: line 3: ./startup.sh: No such file or directory
>> root@appserver01:/opt/tomcat0#
>> root@appserver01:/opt/tomcat0#
>> root@appserver01:/opt/tomcat0# cat startup-instance0.sh
>> export CATALINA_BASE=/opt/tomcat0
>> cd $CATALINA_HOME/bin
>> ./startup.sh
>>
>
> well,
>
> ./startup.sh: No such file or directory
>
> Did you see that you set CATALINA_BASE (note: BASE) and then cd to the
> undefined CATALINA_HOME/bin (note: HOME)? You probably didn't intend this:
> Both are typically undefined on a system level, so you're probably not
> cding into the directory you intend.
>
> Olaf
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: I cant start Tomcat instances
Posted by Olaf Kock <to...@olafkock.de>.
On 17.03.2018 14:16, Loai Abdallatif wrote:
> Dear Colleagues
> I'm new to tomcat, I have successfully installed the service but when I
> tried to run three instances I coudnt due to error below
>
> : the this I did is copied the cataline Home to three instances tomcat0,
> tomcat1, and tomcat2 directories
>
> and in each directory I have configured the connectors ports, AJP port and
> addresses .
> the tomcat main instance is working but I think the problem is that in
> CATALINA_BASE .but I dont know how to instruct the statup script
>
>
> root@appserver01:/opt/tomcat0# ./startup-instance0.sh
> ./startup-instance0.sh: line 3: ./startup.sh: No such file or directory
> root@appserver01:/opt/tomcat0#
> root@appserver01:/opt/tomcat0#
> root@appserver01:/opt/tomcat0# cat startup-instance0.sh
> export CATALINA_BASE=/opt/tomcat0
> cd $CATALINA_HOME/bin
> ./startup.sh
well,
./startup.sh: No such file or directory
Did you see that you set CATALINA_BASE (note: BASE) and then cd to the undefined CATALINA_HOME/bin (note: HOME)? You probably didn't intend this: Both are typically undefined on a system level, so you're probably not cding into the directory you intend.
Olaf
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: I cant start Tomcat instances
Posted by Loai Abdallatif <lo...@gmail.com>.
Thanks Olaf very much , I will review he steps
On Sun, Mar 18, 2018 at 12:13 PM, Olaf Kock <to...@olafkock.de> wrote:
>
>
> On 17.03.2018 19:16, Loai Abdallatif wrote:
>
>> actually all of them has X permissions
>>
>> -rwxr--r-- 1 root root 70 Mar 17 11:59 shutdown-instance0.sh
>> -rwxr--r-- 1 root root 70 Mar 17 11:48 shutdown-instance1.sh
>> -rwxr--r-- 1 root root 70 Mar 17 11:59 shutdown-instance2.sh
>> -rwxr--r-- 1 root root 69 Mar 17 11:58 startup-instance0.sh
>> -rwxr--r-- 1 tomcat root 69 Mar 17 11:46 startup-instance1.sh
>> -rwxr--r-- 1 tomcat root 69 Mar 17 11:59 startup-instance2.sh
>>
>
> well, there's one problem: The first 4 files have x permission for root,
> but not for the unprivileged user "tomcat" - and I hope that you're not
> starting tomcat as root. You'd look for rwxr-xr-x permission on those files.
>
> Following up on my other answer, to have both in one:
>
> root@appserver01:/opt/tomcat0# cat startup-instance0.sh
>>>> export CATALINA_BASE=/opt/tomcat0
>>>> cd $CATALINA_HOME/bin
>>>> ./startup.sh
>>>>
>>>
> Note that you set BASE but cd to HOME - try to see what happens by
> changing the file to
>
> echo "running as user: "
> whoami
> export CATALINA_BASE=/opt/tomcat0
> echo "cd-ing to " $CATALINA_HOME/bin
> cd $CATALINA_HOME/bin
> echo "current working directory after cd"
> pwd
> ./startup.sh
>
> Note: I've copied from your file and just added some lines.
>
> report that output.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: I cant start Tomcat instances
Posted by Olaf Kock <to...@olafkock.de>.
On 17.03.2018 19:16, Loai Abdallatif wrote:
> actually all of them has X permissions
>
> -rwxr--r-- 1 root root 70 Mar 17 11:59 shutdown-instance0.sh
> -rwxr--r-- 1 root root 70 Mar 17 11:48 shutdown-instance1.sh
> -rwxr--r-- 1 root root 70 Mar 17 11:59 shutdown-instance2.sh
> -rwxr--r-- 1 root root 69 Mar 17 11:58 startup-instance0.sh
> -rwxr--r-- 1 tomcat root 69 Mar 17 11:46 startup-instance1.sh
> -rwxr--r-- 1 tomcat root 69 Mar 17 11:59 startup-instance2.sh
well, there's one problem: The first 4 files have x permission for root,
but not for the unprivileged user "tomcat" - and I hope that you're not
starting tomcat as root. You'd look for rwxr-xr-x permission on those files.
Following up on my other answer, to have both in one:
>>> root@appserver01:/opt/tomcat0# cat startup-instance0.sh
>>> export CATALINA_BASE=/opt/tomcat0
>>> cd $CATALINA_HOME/bin
>>> ./startup.sh
Note that you set BASE but cd to HOME - try to see what happens by
changing the file to
echo "running as user: "
whoami
export CATALINA_BASE=/opt/tomcat0
echo "cd-ing to " $CATALINA_HOME/bin
cd $CATALINA_HOME/bin
echo "current working directory after cd"
pwd
./startup.sh
Note: I've copied from your file and just added some lines.
report that output.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: I cant start Tomcat instances
Posted by Loai Abdallatif <lo...@gmail.com>.
actually all of them has X permissions
-rwxr--r-- 1 root root 70 Mar 17 11:59 shutdown-instance0.sh
-rwxr--r-- 1 root root 70 Mar 17 11:48 shutdown-instance1.sh
-rwxr--r-- 1 root root 70 Mar 17 11:59 shutdown-instance2.sh
-rwxr--r-- 1 root root 69 Mar 17 11:58 startup-instance0.sh
-rwxr--r-- 1 tomcat root 69 Mar 17 11:46 startup-instance1.sh
-rwxr--r-- 1 tomcat root 69 Mar 17 11:59 startup-instance2.sh
On Sat, Mar 17, 2018 at 3:39 PM, Stefan Frei <st...@gmail.com>
wrote:
> check the permissons on the .sh files (chmod +x)
>
> 2018-03-17 14:16 GMT+01:00 Loai Abdallatif <lo...@gmail.com>:
> > Dear Colleagues
> > I'm new to tomcat, I have successfully installed the service but when I
> > tried to run three instances I coudnt due to error below
> >
> > : the this I did is copied the cataline Home to three instances tomcat0,
> > tomcat1, and tomcat2 directories
> >
> > and in each directory I have configured the connectors ports, AJP port
> and
> > addresses .
> > the tomcat main instance is working but I think the problem is that in
> > CATALINA_BASE .but I dont know how to instruct the statup script
> >
> >
> > root@appserver01:/opt/tomcat0# ./startup-instance0.sh
> > ./startup-instance0.sh: line 3: ./startup.sh: No such file or directory
> > root@appserver01:/opt/tomcat0#
> > root@appserver01:/opt/tomcat0#
> > root@appserver01:/opt/tomcat0# cat startup-instance0.sh
> > export CATALINA_BASE=/opt/tomcat0
> > cd $CATALINA_HOME/bin
> > ./startup.sh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: I cant start Tomcat instances
Posted by Stefan Frei <st...@gmail.com>.
check the permissons on the .sh files (chmod +x)
2018-03-17 14:16 GMT+01:00 Loai Abdallatif <lo...@gmail.com>:
> Dear Colleagues
> I'm new to tomcat, I have successfully installed the service but when I
> tried to run three instances I coudnt due to error below
>
> : the this I did is copied the cataline Home to three instances tomcat0,
> tomcat1, and tomcat2 directories
>
> and in each directory I have configured the connectors ports, AJP port and
> addresses .
> the tomcat main instance is working but I think the problem is that in
> CATALINA_BASE .but I dont know how to instruct the statup script
>
>
> root@appserver01:/opt/tomcat0# ./startup-instance0.sh
> ./startup-instance0.sh: line 3: ./startup.sh: No such file or directory
> root@appserver01:/opt/tomcat0#
> root@appserver01:/opt/tomcat0#
> root@appserver01:/opt/tomcat0# cat startup-instance0.sh
> export CATALINA_BASE=/opt/tomcat0
> cd $CATALINA_HOME/bin
> ./startup.sh
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org