You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Trae McCombs <tr...@gmail.com> on 2020/05/20 11:42:33 UTC

7.0.77 to 8.5.51 upgrade on Solaris 11.4 (csh)

Hello,

We are trying to upgrade one of our tomcats from 7.0.77 to 8.5.51 and are
running into a bit of an issue.

First a bit of history on our current setup:

Apache Tomcat 7.0.77 on Solaris 11.4.20.4.0, 1 webapps warfile with CSH as
the shell.   In order to set our JAVA_OPTS and our CATALINA_OPTS we have,
in the past,  edited the bin/catalina.sh and on line 119 have put the
following: . opts.inc   This setup works perfectly and continues to do so.

*an example opts.inc file:*

> #!/bin/sh
> JAVA_OPTS="-d64 -server -Xms1g <snip>"
> CATALINA_OPTS="-Dtomcat.session=${JVMROUTE} -Dcom.sun.management.jmxremote
> <snip>"


The issue is now that we are upgrading to 8.5.51 and we need to use
setenv.sh (seemingly required - from our previous other bash env tomcat
upgrades).  We tried the old way but the logs/catalina.out shows that the
ENV params aren't being applied. This isn't a problem on our other tomcats
that are running bash because this works:

*Working on bash tomcats (tried in csh and didn't work)*

> #!/bin/sh
> JAVA_OPTS="-Dcom1 -Dcom2 -Dcom3 ... etc"
> CATALINA="-Dcom4 -Dcom5 etc"


*This works when manually applied on command line, but not in a script*
cat $TOMCAT_DIR/bin/setenv.sh
#!/usr/bin/csh
setenv FOO "-Dcom1 -Dcom2 -Dcom3 etc"

run the above as a test in that bin dir: ./setenv.sh (no errors)
env |grep FOO

Nothing.


*@ csh prompt*
setenv FOO "-Dcom1 -Dcom2 -Dcom3"

env |grep FOO
FOO=-Dcom1 -Dcom2 -Dcom3

I really don't know what to do at this point and would appreciate any and
all help.

Thanks,
Trae


-- 
All labor that uplifts humanity has dignity and importance and should be
undertaken with painstaking excellence.
- Martin Luther King, Jr.

Re: 7.0.77 to 8.5.51 upgrade on Solaris 11.4 (csh)

Posted by Trae McCombs <tr...@gmail.com>.
Thank you for trying.

I've looked into your suggestions and unfortunately they did not help.

I am on CSH and all I really need to know how to do is get the JAVA_OPTS
and CATALINA_OPTS environment variables set.

I'm still researching but haven't found anything.

On Wed, May 20, 2020 at 9:07 AM Alberto Cabello Sánchez <al...@unex.es>
wrote:

> On Wed, 20 May 2020 14:58:53 +0200
> Alberto Cabello Sánchez <al...@unex.es> wrote:
>
> > On Wed, 20 May 2020 07:42:33 -0400
> > Trae McCombs <tr...@gmail.com> wrote:
> >
> > > cat $TOMCAT_DIR/bin/setenv.sh
> > > #!/usr/bin/csh
> > > setenv FOO "-Dcom1 -Dcom2 -Dcom3 etc"
> > >
> > > run the above as a test in that bin dir: ./setenv.sh (no errors)
> > > env |grep FOO
> > >
> > > Nothing.
> >
> > The command
> >
> > ./setenv.sh
> >
> > spans a new csh process, then creates there the env variable FOO with
> > your desired value and exists. Your current shell is unaware of $FOO.
> >
> > I'm not a csh expert but in bash, you have to "source" the file with
> >
> > . ./setenv.sh
>
> Actually, this is what you have in line 150 of catalina.sh:
>
> if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
>   . "$CATALINA_BASE/bin/setenv.sh"
> elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
>   . "$CATALINA_HOME/bin/setenv.sh"
> fi
>
> But you are instructing catalina.sh to span a new shell (#!/usr/bin/csh)
> so environment variables are not being passed.
>
> My own working setenv.sh reads just
>
> $ cat setenv.sh
> JAVA_HOME="/opt/jdk/"
> CATALINA_PID="$CATALINA_BASE/temp/catalina.pid"
>
> Hope that helps,
>
> --
> Alberto Cabello Sánchez
> Servicio de Informática
> Universidad de Extremadura
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

-- 
All labor that uplifts humanity has dignity and importance and should be
undertaken with painstaking excellence.
- Martin Luther King, Jr.

Re: 7.0.77 to 8.5.51 upgrade on Solaris 11.4 (csh)

Posted by Alberto Cabello Sánchez <al...@unex.es>.
On Wed, 20 May 2020 14:58:53 +0200
Alberto Cabello Sánchez <al...@unex.es> wrote:

> On Wed, 20 May 2020 07:42:33 -0400
> Trae McCombs <tr...@gmail.com> wrote:
> 
> > cat $TOMCAT_DIR/bin/setenv.sh
> > #!/usr/bin/csh
> > setenv FOO "-Dcom1 -Dcom2 -Dcom3 etc"
> > 
> > run the above as a test in that bin dir: ./setenv.sh (no errors)
> > env |grep FOO
> > 
> > Nothing.
> 
> The command
> 
> ./setenv.sh
> 
> spans a new csh process, then creates there the env variable FOO with
> your desired value and exists. Your current shell is unaware of $FOO.
> 
> I'm not a csh expert but in bash, you have to "source" the file with
> 
> . ./setenv.sh

Actually, this is what you have in line 150 of catalina.sh:

if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
  . "$CATALINA_BASE/bin/setenv.sh"
elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
  . "$CATALINA_HOME/bin/setenv.sh"
fi

But you are instructing catalina.sh to span a new shell (#!/usr/bin/csh)
so environment variables are not being passed.

My own working setenv.sh reads just 

$ cat setenv.sh
JAVA_HOME="/opt/jdk/"
CATALINA_PID="$CATALINA_BASE/temp/catalina.pid"

Hope that helps,

-- 
Alberto Cabello Sánchez
Servicio de Informática
Universidad de Extremadura

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: 7.0.77 to 8.5.51 upgrade on Solaris 11.4 (csh)

Posted by Alberto Cabello Sánchez <al...@unex.es>.
On Wed, 20 May 2020 07:42:33 -0400
Trae McCombs <tr...@gmail.com> wrote:

> cat $TOMCAT_DIR/bin/setenv.sh
> #!/usr/bin/csh
> setenv FOO "-Dcom1 -Dcom2 -Dcom3 etc"
> 
> run the above as a test in that bin dir: ./setenv.sh (no errors)
> env |grep FOO
> 
> Nothing.

The command

./setenv.sh

spans a new csh process, then creates there the env variable FOO with
your desired value and exists. Your current shell is unaware of $FOO.

I'm not a csh expert but in bash, you have to "source" the file with

. ./setenv.sh



-- 
Alberto Cabello Sánchez
Servicio de Informática
Universidad de Extremadura

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org