Tomcat won't use setenv.sh

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








5















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









share|improve this question






















  • 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

















5















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









share|improve this question






















  • 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













5












5








5


4






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









share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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










3 Answers
3






active

oldest

votes


















3














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






share|improve this answer























  • 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


















0














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 :-)






share|improve this answer




















  • 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


















0














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.






share|improve this answer























    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
    );



    );













    draft saved

    draft discarded


















    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









    3














    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






    share|improve this answer























    • 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















    3














    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






    share|improve this answer























    • 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













    3












    3








    3







    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






    share|improve this answer













    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







    share|improve this answer












    share|improve this answer



    share|improve this answer










    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

















    • 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













    0














    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 :-)






    share|improve this answer




















    • 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















    0














    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 :-)






    share|improve this answer




















    • 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













    0












    0








    0







    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 :-)






    share|improve this answer















    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 :-)







    share|improve this answer














    share|improve this answer



    share|improve this answer








    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












    • 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











    0














    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.






    share|improve this answer



























      0














      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.






      share|improve this answer

























        0












        0








        0







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 14 at 14:07









        GregorGregor

        1011




        1011



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?