Tomcat won't use setenv.sh
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have Tomcat installed as service.
It's CATALINA_HOME
and CATALINA_BASE
are same:
-Dcatalina.base=/usr/share/tomcat7 -Dcatalina.home=/usr/share/tomcat7
I added setenv.sh
script to /usr/share/tomcat7/bin
with next lines:
$ cat /usr/share/tomcat7/bin/setenv.sh
#!/usr/bin/env bash
export JAVA_OPTS="-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9090
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=54.***.***.65"
But still haven't changes in Tomcat's behavior - no new port opened, no new options is ps aux | grep java
:
# netstat -anp | grep 9090 | wc -l
0
# ps aux | grep java
tomcat 32063 96.6 23.5 1904000 399872 ? Sl 09:04 3:07 /usr/lib/jvm/jre/bin/java -Xms512M -Xmx1024M -javaagent:/usr/share/tomcat7/newrelic/newrelic.jar -classpath :/usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat7 -Dcatalina.home=/usr/share/tomcat7 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat7/temp -Djava.util.logging.config.file=/usr/share/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start
File owned by tomcat
user and have exec
bit:
# ls -l /usr/share/tomcat7/bin/setenv.sh
-rwxr-xr-x 1 tomcat tomcat 329 Jun 15 08:52 /usr/share/tomcat7/bin/setenv.sh
java tomcat
add a comment |
I have Tomcat installed as service.
It's CATALINA_HOME
and CATALINA_BASE
are same:
-Dcatalina.base=/usr/share/tomcat7 -Dcatalina.home=/usr/share/tomcat7
I added setenv.sh
script to /usr/share/tomcat7/bin
with next lines:
$ cat /usr/share/tomcat7/bin/setenv.sh
#!/usr/bin/env bash
export JAVA_OPTS="-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9090
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=54.***.***.65"
But still haven't changes in Tomcat's behavior - no new port opened, no new options is ps aux | grep java
:
# netstat -anp | grep 9090 | wc -l
0
# ps aux | grep java
tomcat 32063 96.6 23.5 1904000 399872 ? Sl 09:04 3:07 /usr/lib/jvm/jre/bin/java -Xms512M -Xmx1024M -javaagent:/usr/share/tomcat7/newrelic/newrelic.jar -classpath :/usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat7 -Dcatalina.home=/usr/share/tomcat7 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat7/temp -Djava.util.logging.config.file=/usr/share/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start
File owned by tomcat
user and have exec
bit:
# ls -l /usr/share/tomcat7/bin/setenv.sh
-rwxr-xr-x 1 tomcat tomcat 329 Jun 15 08:52 /usr/share/tomcat7/bin/setenv.sh
java tomcat
Did you find a solution to this problem? If so, please post your answer here, as I am facing a similar issue - setenv.sh is just not being picked up by tomcat7.
– nonbeing
Nov 19 '15 at 10:43
@noumenon Hi. Thanks fore reminder. My solution added as answer.
– setevoy
Nov 19 '15 at 19:57
add a comment |
I have Tomcat installed as service.
It's CATALINA_HOME
and CATALINA_BASE
are same:
-Dcatalina.base=/usr/share/tomcat7 -Dcatalina.home=/usr/share/tomcat7
I added setenv.sh
script to /usr/share/tomcat7/bin
with next lines:
$ cat /usr/share/tomcat7/bin/setenv.sh
#!/usr/bin/env bash
export JAVA_OPTS="-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9090
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=54.***.***.65"
But still haven't changes in Tomcat's behavior - no new port opened, no new options is ps aux | grep java
:
# netstat -anp | grep 9090 | wc -l
0
# ps aux | grep java
tomcat 32063 96.6 23.5 1904000 399872 ? Sl 09:04 3:07 /usr/lib/jvm/jre/bin/java -Xms512M -Xmx1024M -javaagent:/usr/share/tomcat7/newrelic/newrelic.jar -classpath :/usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat7 -Dcatalina.home=/usr/share/tomcat7 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat7/temp -Djava.util.logging.config.file=/usr/share/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start
File owned by tomcat
user and have exec
bit:
# ls -l /usr/share/tomcat7/bin/setenv.sh
-rwxr-xr-x 1 tomcat tomcat 329 Jun 15 08:52 /usr/share/tomcat7/bin/setenv.sh
java tomcat
I have Tomcat installed as service.
It's CATALINA_HOME
and CATALINA_BASE
are same:
-Dcatalina.base=/usr/share/tomcat7 -Dcatalina.home=/usr/share/tomcat7
I added setenv.sh
script to /usr/share/tomcat7/bin
with next lines:
$ cat /usr/share/tomcat7/bin/setenv.sh
#!/usr/bin/env bash
export JAVA_OPTS="-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9090
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=54.***.***.65"
But still haven't changes in Tomcat's behavior - no new port opened, no new options is ps aux | grep java
:
# netstat -anp | grep 9090 | wc -l
0
# ps aux | grep java
tomcat 32063 96.6 23.5 1904000 399872 ? Sl 09:04 3:07 /usr/lib/jvm/jre/bin/java -Xms512M -Xmx1024M -javaagent:/usr/share/tomcat7/newrelic/newrelic.jar -classpath :/usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat7 -Dcatalina.home=/usr/share/tomcat7 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat7/temp -Djava.util.logging.config.file=/usr/share/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start
File owned by tomcat
user and have exec
bit:
# ls -l /usr/share/tomcat7/bin/setenv.sh
-rwxr-xr-x 1 tomcat tomcat 329 Jun 15 08:52 /usr/share/tomcat7/bin/setenv.sh
java tomcat
java tomcat
asked Jun 15 '15 at 9:13
setevoysetevoy
5391824
5391824
Did you find a solution to this problem? If so, please post your answer here, as I am facing a similar issue - setenv.sh is just not being picked up by tomcat7.
– nonbeing
Nov 19 '15 at 10:43
@noumenon Hi. Thanks fore reminder. My solution added as answer.
– setevoy
Nov 19 '15 at 19:57
add a comment |
Did you find a solution to this problem? If so, please post your answer here, as I am facing a similar issue - setenv.sh is just not being picked up by tomcat7.
– nonbeing
Nov 19 '15 at 10:43
@noumenon Hi. Thanks fore reminder. My solution added as answer.
– setevoy
Nov 19 '15 at 19:57
Did you find a solution to this problem? If so, please post your answer here, as I am facing a similar issue - setenv.sh is just not being picked up by tomcat7.
– nonbeing
Nov 19 '15 at 10:43
Did you find a solution to this problem? If so, please post your answer here, as I am facing a similar issue - setenv.sh is just not being picked up by tomcat7.
– nonbeing
Nov 19 '15 at 10:43
@noumenon Hi. Thanks fore reminder. My solution added as answer.
– setevoy
Nov 19 '15 at 19:57
@noumenon Hi. Thanks fore reminder. My solution added as answer.
– setevoy
Nov 19 '15 at 19:57
add a comment |
3 Answers
3
active
oldest
votes
The environment variable you should set is called 'CATALINA_OPTS'.
Here is an example in the tomcat documentation, which is also related to monitoring:
Apache Tomcat 7 - Monitoring and Managing Tomcat
Thanks, but no: stackoverflow.com/questions/11222365/…
– setevoy
Jun 15 '15 at 12:30
3
Where does the tomcat documentation contradict with that stackoverflow question/answer?
– stoeff
Jun 15 '15 at 20:48
add a comment |
According to my blog my solution was set JAVA_OPTS
with $CATALINA_HOME/conf/tomcat7.conf
, e.g.:
# You can pass some parameters to java here if you wish to
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
JAVA_OPTS="-Xms512M -Xmx1024M -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=54.***.***.65"
And result after Tomcat's restart was:
# ps aux | grep java
tomcat 1359 96.6 13.0 1887508 220732 ? Sl 09:19 0:44 /usr/lib/jvm/jre/bin/java -Xms512M -Xmx1024M -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -[...]
P.S. Don't forget create copy of you default configuration files. Then grep -r JAVA_OPTS etc/*
to find it in # documentation
will be more helpful :-)
1
Nah, CATALINA_OPTS works better, without bogus errors on shutdown. And my tomcat7 picks up bin/setenv.sh without a problem.
– kubanczyk
Nov 19 '15 at 21:06
3
Thanks! The key part of the solution is to use$CATALINA_HOME/conf/tomcat7.conf
instead of/usr/share/tomcat7/bin/setenv.sh
. I can finally set any command-line args (or env variables) for Tomcat7. I am using tomcat7 installed from the yum repo on Amazon-Linux, not the tomcat zip from tomcat.apache.org - and apparently this is why setenv.sh is not being picked up.
– nonbeing
Nov 21 '15 at 2:35
@noumenon Glad can help you. Btw - I faced with thus issue also with Tomcat from yum repo for Amazon Linux.
– setevoy
Nov 21 '15 at 15:47
@kubanczyk Are you ready to claim - every "equal" software installations on "equal" operation systems will work in proper way?
– setevoy
Nov 21 '15 at 15:50
add a comment |
Just for reference, but in Tomcat 8.5.38 (didn't check 7 though), my custom setenv.sh
was still picked up fine. I like to use this e.g. for setting the $CLASSPATH, which I find more maintenance-friendly and I don't have to adapt Tomcat's own startup files, and it makes my custom changes more visible.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f209747%2ftomcat-wont-use-setenv-sh%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
The environment variable you should set is called 'CATALINA_OPTS'.
Here is an example in the tomcat documentation, which is also related to monitoring:
Apache Tomcat 7 - Monitoring and Managing Tomcat
Thanks, but no: stackoverflow.com/questions/11222365/…
– setevoy
Jun 15 '15 at 12:30
3
Where does the tomcat documentation contradict with that stackoverflow question/answer?
– stoeff
Jun 15 '15 at 20:48
add a comment |
The environment variable you should set is called 'CATALINA_OPTS'.
Here is an example in the tomcat documentation, which is also related to monitoring:
Apache Tomcat 7 - Monitoring and Managing Tomcat
Thanks, but no: stackoverflow.com/questions/11222365/…
– setevoy
Jun 15 '15 at 12:30
3
Where does the tomcat documentation contradict with that stackoverflow question/answer?
– stoeff
Jun 15 '15 at 20:48
add a comment |
The environment variable you should set is called 'CATALINA_OPTS'.
Here is an example in the tomcat documentation, which is also related to monitoring:
Apache Tomcat 7 - Monitoring and Managing Tomcat
The environment variable you should set is called 'CATALINA_OPTS'.
Here is an example in the tomcat documentation, which is also related to monitoring:
Apache Tomcat 7 - Monitoring and Managing Tomcat
answered Jun 15 '15 at 12:07
stoeffstoeff
38026
38026
Thanks, but no: stackoverflow.com/questions/11222365/…
– setevoy
Jun 15 '15 at 12:30
3
Where does the tomcat documentation contradict with that stackoverflow question/answer?
– stoeff
Jun 15 '15 at 20:48
add a comment |
Thanks, but no: stackoverflow.com/questions/11222365/…
– setevoy
Jun 15 '15 at 12:30
3
Where does the tomcat documentation contradict with that stackoverflow question/answer?
– stoeff
Jun 15 '15 at 20:48
Thanks, but no: stackoverflow.com/questions/11222365/…
– setevoy
Jun 15 '15 at 12:30
Thanks, but no: stackoverflow.com/questions/11222365/…
– setevoy
Jun 15 '15 at 12:30
3
3
Where does the tomcat documentation contradict with that stackoverflow question/answer?
– stoeff
Jun 15 '15 at 20:48
Where does the tomcat documentation contradict with that stackoverflow question/answer?
– stoeff
Jun 15 '15 at 20:48
add a comment |
According to my blog my solution was set JAVA_OPTS
with $CATALINA_HOME/conf/tomcat7.conf
, e.g.:
# You can pass some parameters to java here if you wish to
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
JAVA_OPTS="-Xms512M -Xmx1024M -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=54.***.***.65"
And result after Tomcat's restart was:
# ps aux | grep java
tomcat 1359 96.6 13.0 1887508 220732 ? Sl 09:19 0:44 /usr/lib/jvm/jre/bin/java -Xms512M -Xmx1024M -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -[...]
P.S. Don't forget create copy of you default configuration files. Then grep -r JAVA_OPTS etc/*
to find it in # documentation
will be more helpful :-)
1
Nah, CATALINA_OPTS works better, without bogus errors on shutdown. And my tomcat7 picks up bin/setenv.sh without a problem.
– kubanczyk
Nov 19 '15 at 21:06
3
Thanks! The key part of the solution is to use$CATALINA_HOME/conf/tomcat7.conf
instead of/usr/share/tomcat7/bin/setenv.sh
. I can finally set any command-line args (or env variables) for Tomcat7. I am using tomcat7 installed from the yum repo on Amazon-Linux, not the tomcat zip from tomcat.apache.org - and apparently this is why setenv.sh is not being picked up.
– nonbeing
Nov 21 '15 at 2:35
@noumenon Glad can help you. Btw - I faced with thus issue also with Tomcat from yum repo for Amazon Linux.
– setevoy
Nov 21 '15 at 15:47
@kubanczyk Are you ready to claim - every "equal" software installations on "equal" operation systems will work in proper way?
– setevoy
Nov 21 '15 at 15:50
add a comment |
According to my blog my solution was set JAVA_OPTS
with $CATALINA_HOME/conf/tomcat7.conf
, e.g.:
# You can pass some parameters to java here if you wish to
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
JAVA_OPTS="-Xms512M -Xmx1024M -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=54.***.***.65"
And result after Tomcat's restart was:
# ps aux | grep java
tomcat 1359 96.6 13.0 1887508 220732 ? Sl 09:19 0:44 /usr/lib/jvm/jre/bin/java -Xms512M -Xmx1024M -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -[...]
P.S. Don't forget create copy of you default configuration files. Then grep -r JAVA_OPTS etc/*
to find it in # documentation
will be more helpful :-)
1
Nah, CATALINA_OPTS works better, without bogus errors on shutdown. And my tomcat7 picks up bin/setenv.sh without a problem.
– kubanczyk
Nov 19 '15 at 21:06
3
Thanks! The key part of the solution is to use$CATALINA_HOME/conf/tomcat7.conf
instead of/usr/share/tomcat7/bin/setenv.sh
. I can finally set any command-line args (or env variables) for Tomcat7. I am using tomcat7 installed from the yum repo on Amazon-Linux, not the tomcat zip from tomcat.apache.org - and apparently this is why setenv.sh is not being picked up.
– nonbeing
Nov 21 '15 at 2:35
@noumenon Glad can help you. Btw - I faced with thus issue also with Tomcat from yum repo for Amazon Linux.
– setevoy
Nov 21 '15 at 15:47
@kubanczyk Are you ready to claim - every "equal" software installations on "equal" operation systems will work in proper way?
– setevoy
Nov 21 '15 at 15:50
add a comment |
According to my blog my solution was set JAVA_OPTS
with $CATALINA_HOME/conf/tomcat7.conf
, e.g.:
# You can pass some parameters to java here if you wish to
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
JAVA_OPTS="-Xms512M -Xmx1024M -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=54.***.***.65"
And result after Tomcat's restart was:
# ps aux | grep java
tomcat 1359 96.6 13.0 1887508 220732 ? Sl 09:19 0:44 /usr/lib/jvm/jre/bin/java -Xms512M -Xmx1024M -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -[...]
P.S. Don't forget create copy of you default configuration files. Then grep -r JAVA_OPTS etc/*
to find it in # documentation
will be more helpful :-)
According to my blog my solution was set JAVA_OPTS
with $CATALINA_HOME/conf/tomcat7.conf
, e.g.:
# You can pass some parameters to java here if you wish to
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"
JAVA_OPTS="-Xms512M -Xmx1024M -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=54.***.***.65"
And result after Tomcat's restart was:
# ps aux | grep java
tomcat 1359 96.6 13.0 1887508 220732 ? Sl 09:19 0:44 /usr/lib/jvm/jre/bin/java -Xms512M -Xmx1024M -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -[...]
P.S. Don't forget create copy of you default configuration files. Then grep -r JAVA_OPTS etc/*
to find it in # documentation
will be more helpful :-)
edited Nov 20 '15 at 7:01
answered Nov 19 '15 at 19:56
setevoysetevoy
5391824
5391824
1
Nah, CATALINA_OPTS works better, without bogus errors on shutdown. And my tomcat7 picks up bin/setenv.sh without a problem.
– kubanczyk
Nov 19 '15 at 21:06
3
Thanks! The key part of the solution is to use$CATALINA_HOME/conf/tomcat7.conf
instead of/usr/share/tomcat7/bin/setenv.sh
. I can finally set any command-line args (or env variables) for Tomcat7. I am using tomcat7 installed from the yum repo on Amazon-Linux, not the tomcat zip from tomcat.apache.org - and apparently this is why setenv.sh is not being picked up.
– nonbeing
Nov 21 '15 at 2:35
@noumenon Glad can help you. Btw - I faced with thus issue also with Tomcat from yum repo for Amazon Linux.
– setevoy
Nov 21 '15 at 15:47
@kubanczyk Are you ready to claim - every "equal" software installations on "equal" operation systems will work in proper way?
– setevoy
Nov 21 '15 at 15:50
add a comment |
1
Nah, CATALINA_OPTS works better, without bogus errors on shutdown. And my tomcat7 picks up bin/setenv.sh without a problem.
– kubanczyk
Nov 19 '15 at 21:06
3
Thanks! The key part of the solution is to use$CATALINA_HOME/conf/tomcat7.conf
instead of/usr/share/tomcat7/bin/setenv.sh
. I can finally set any command-line args (or env variables) for Tomcat7. I am using tomcat7 installed from the yum repo on Amazon-Linux, not the tomcat zip from tomcat.apache.org - and apparently this is why setenv.sh is not being picked up.
– nonbeing
Nov 21 '15 at 2:35
@noumenon Glad can help you. Btw - I faced with thus issue also with Tomcat from yum repo for Amazon Linux.
– setevoy
Nov 21 '15 at 15:47
@kubanczyk Are you ready to claim - every "equal" software installations on "equal" operation systems will work in proper way?
– setevoy
Nov 21 '15 at 15:50
1
1
Nah, CATALINA_OPTS works better, without bogus errors on shutdown. And my tomcat7 picks up bin/setenv.sh without a problem.
– kubanczyk
Nov 19 '15 at 21:06
Nah, CATALINA_OPTS works better, without bogus errors on shutdown. And my tomcat7 picks up bin/setenv.sh without a problem.
– kubanczyk
Nov 19 '15 at 21:06
3
3
Thanks! The key part of the solution is to use
$CATALINA_HOME/conf/tomcat7.conf
instead of /usr/share/tomcat7/bin/setenv.sh
. I can finally set any command-line args (or env variables) for Tomcat7. I am using tomcat7 installed from the yum repo on Amazon-Linux, not the tomcat zip from tomcat.apache.org - and apparently this is why setenv.sh is not being picked up.– nonbeing
Nov 21 '15 at 2:35
Thanks! The key part of the solution is to use
$CATALINA_HOME/conf/tomcat7.conf
instead of /usr/share/tomcat7/bin/setenv.sh
. I can finally set any command-line args (or env variables) for Tomcat7. I am using tomcat7 installed from the yum repo on Amazon-Linux, not the tomcat zip from tomcat.apache.org - and apparently this is why setenv.sh is not being picked up.– nonbeing
Nov 21 '15 at 2:35
@noumenon Glad can help you. Btw - I faced with thus issue also with Tomcat from yum repo for Amazon Linux.
– setevoy
Nov 21 '15 at 15:47
@noumenon Glad can help you. Btw - I faced with thus issue also with Tomcat from yum repo for Amazon Linux.
– setevoy
Nov 21 '15 at 15:47
@kubanczyk Are you ready to claim - every "equal" software installations on "equal" operation systems will work in proper way?
– setevoy
Nov 21 '15 at 15:50
@kubanczyk Are you ready to claim - every "equal" software installations on "equal" operation systems will work in proper way?
– setevoy
Nov 21 '15 at 15:50
add a comment |
Just for reference, but in Tomcat 8.5.38 (didn't check 7 though), my custom setenv.sh
was still picked up fine. I like to use this e.g. for setting the $CLASSPATH, which I find more maintenance-friendly and I don't have to adapt Tomcat's own startup files, and it makes my custom changes more visible.
add a comment |
Just for reference, but in Tomcat 8.5.38 (didn't check 7 though), my custom setenv.sh
was still picked up fine. I like to use this e.g. for setting the $CLASSPATH, which I find more maintenance-friendly and I don't have to adapt Tomcat's own startup files, and it makes my custom changes more visible.
add a comment |
Just for reference, but in Tomcat 8.5.38 (didn't check 7 though), my custom setenv.sh
was still picked up fine. I like to use this e.g. for setting the $CLASSPATH, which I find more maintenance-friendly and I don't have to adapt Tomcat's own startup files, and it makes my custom changes more visible.
Just for reference, but in Tomcat 8.5.38 (didn't check 7 though), my custom setenv.sh
was still picked up fine. I like to use this e.g. for setting the $CLASSPATH, which I find more maintenance-friendly and I don't have to adapt Tomcat's own startup files, and it makes my custom changes more visible.
answered Mar 14 at 14:07
GregorGregor
1011
1011
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f209747%2ftomcat-wont-use-setenv-sh%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you find a solution to this problem? If so, please post your answer here, as I am facing a similar issue - setenv.sh is just not being picked up by tomcat7.
– nonbeing
Nov 19 '15 at 10:43
@noumenon Hi. Thanks fore reminder. My solution added as answer.
– setevoy
Nov 19 '15 at 19:57