You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Robert Dinse <na...@eskimo.com> on 2019/02/26 01:09:36 UTC

set tomcat user?

I've got a bit of a disaster on my hands. I am in the process of installing 
guacamole. Got guacamole-server and guacamole-client built, so far so good. 
Tried to deploy but guacamole.war would not deploy in the Ubuntu 18.10 
environment. Discovered this is because the version of Java, guacamole won't 
run in Java 11, needs Java 8. Okay, since I have no other java application it 
seemed reasonable to just de-install jdk-11 and install oracle-java-8 (jdk-8 is 
missing some libraries). So installed it and then tomcat wouldn't start. Found 
out when you build Tomcat it has a library that is specific to the Java 
version. So I snagged Tomcat source and built it and now tomcat runs and 
deploys guacamole.war correctly. However it is running as root, when you 
install the package in Ubuntu it runs as tomcat8, and that is how I would like 
it to run. But I can't figure out where in the configuration you set that. Does 
anyone know how to do this?

-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
  Eskimo North Linux Friendly Internet Access, Shell Accounts, and Hosting.
    Knowledgeable human assistance, not telephone trees or script readers.
  See our web site: http://www.eskimo.com/ (206) 812-0051 or (800) 246-6874.

Re: set tomcat user?

Posted by Robert Dinse <na...@eskimo.com>.
      Mostly because 18.04 has difficultly reliably mounting nfs mount points
and reliably binding to NIS servers after booting.  Not wanting to start from
scratch at this point, just want to know how to configure tomcat to run with
a specific user id.  Even if I were running 18.04, would still have the same
issue as Java 11 is still default there.

-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
  Eskimo North Linux Friendly Internet Access, Shell Accounts, and Hosting.
    Knowledgeable human assistance, not telephone trees or script readers.
  See our web site: http://www.eskimo.com/ (206) 812-0051 or (800) 246-6874.

On Mon, 25 Feb 2019, Fabián Rodríguez wrote:

> Date: Mon, 25 Feb 2019 20:14:11 -0500
> From: "[UTF-8] Fabián Rodríguez" <ma...@member.fsf.org>
> Reply-To: user@guacamole.apache.org
> To: user@guacamole.apache.org
> Subject: Re: set tomcat user?
> 
>
> Le 19-02-25 à 20 h 09, Robert Dinse a écrit :
>>
>> I've got a bit of a disaster on my hands. I am in the process of
>> installing guacamole. Got guacamole-server and guacamole-client built,
>> so far so good. Tried to deploy but guacamole.war would not deploy in
>> the Ubuntu 18.10 environment. Discovered this is because the version
>> of Java, guacamole won't run in Java 11, needs Java 8. Okay, since I
>> have no other java application it seemed reasonable to just de-install
>> jdk-11 and install oracle-java-8 (jdk-8 is missing some libraries). So
>> installed it and then tomcat wouldn't start. Found out when you build
>> Tomcat it has a library that is specific to the Java version. So I
>> snagged Tomcat source and built it and now tomcat runs and deploys
>> guacamole.war correctly. However it is running as root, when you
>> install the package in Ubuntu it runs as tomcat8, and that is how I
>> would like it to run. But I can't figure out where in the
>> configuration you set that. Does anyone know how to do this?
>>
> If you are starting from scratch you may find it easier to run this
> script, please read it carefuly before using it:
>
> https://github.com/MysticRyuujin/guac-install
>
> May I also ask why use Ubuntu 18.10 ? It's better practice to use Ubuntu
> 18.04 LTS in a production environment.
>
> F.
>
>
>
> -- 
> Fabián Rodríguez
> http://fsf.magicfab.ca/
>

Re: set tomcat user?

Posted by Fabián Rodríguez <ma...@member.fsf.org>.
Le 19-02-25 à 20 h 09, Robert Dinse a écrit :
>
> I've got a bit of a disaster on my hands. I am in the process of
> installing guacamole. Got guacamole-server and guacamole-client built,
> so far so good. Tried to deploy but guacamole.war would not deploy in
> the Ubuntu 18.10 environment. Discovered this is because the version
> of Java, guacamole won't run in Java 11, needs Java 8. Okay, since I
> have no other java application it seemed reasonable to just de-install
> jdk-11 and install oracle-java-8 (jdk-8 is missing some libraries). So
> installed it and then tomcat wouldn't start. Found out when you build
> Tomcat it has a library that is specific to the Java version. So I
> snagged Tomcat source and built it and now tomcat runs and deploys
> guacamole.war correctly. However it is running as root, when you
> install the package in Ubuntu it runs as tomcat8, and that is how I
> would like it to run. But I can't figure out where in the
> configuration you set that. Does anyone know how to do this?
>
If you are starting from scratch you may find it easier to run this
script, please read it carefuly before using it:

https://github.com/MysticRyuujin/guac-install

May I also ask why use Ubuntu 18.10 ? It's better practice to use Ubuntu
18.04 LTS in a production environment.

F.



-- 
Fabián Rodríguez
http://fsf.magicfab.ca/


Re: set tomcat user?

Posted by Robert Dinse <na...@eskimo.com>.
On Mon, 25 Feb 2019, Nick Couchman wrote:
>>
> A couple of notes for you:
> - You can install Tomcat from the distribution without having to compile it
> from source.  The website has binaries available.

      Please go back and read my message, I stated the reason for not using
the binaries.  It has to do with version specific libraries.

> - The way to change the user running Tomcat is simple to change the user
> you run the startup.sh script as.  So, if you want to run it as tomcat8,
> run "sudo -u tomcat8 /path/to/tomcat/bin/startup.sh".  You may have to
> change permissions on the path where you installed Tomcat to the tomcat8
> user.

      There is a way to change the user in tomcat internally and a reason
for using it.  This gives it the ability to bind to ports below 1024 and then
change UID, this is why I need this configuration option rather than an su
hack.


> -Nick
>

Re: set tomcat user?

Posted by Nick Couchman <vn...@apache.org>.
On Mon, Feb 25, 2019 at 8:09 PM Robert Dinse <na...@eskimo.com> wrote:

>
> I've got a bit of a disaster on my hands. I am in the process of
> installing
> guacamole. Got guacamole-server and guacamole-client built, so far so
> good.
> Tried to deploy but guacamole.war would not deploy in the Ubuntu 18.10
> environment. Discovered this is because the version of Java, guacamole
> won't
> run in Java 11, needs Java 8. Okay, since I have no other java application
> it
> seemed reasonable to just de-install jdk-11 and install oracle-java-8
> (jdk-8 is
> missing some libraries). So installed it and then tomcat wouldn't start.
> Found
> out when you build Tomcat it has a library that is specific to the Java
> version. So I snagged Tomcat source and built it and now tomcat runs and
> deploys guacamole.war correctly. However it is running as root, when you
> install the package in Ubuntu it runs as tomcat8, and that is how I would
> like
> it to run. But I can't figure out where in the configuration you set that.
> Does
> anyone know how to do this?
>
>
A couple of notes for you:
- You can install Tomcat from the distribution without having to compile it
from source.  The website has binaries available.
- The way to change the user running Tomcat is simple to change the user
you run the startup.sh script as.  So, if you want to run it as tomcat8,
run "sudo -u tomcat8 /path/to/tomcat/bin/startup.sh".  You may have to
change permissions on the path where you installed Tomcat to the tomcat8
user.

-Nick