The officially official Devuan Forum!

You are not logged in.

#1 2020-01-07 13:31:07

alsen
Member
From: Bologna
Registered: 2016-12-15
Posts: 26  

[SOLVED] tomcat9 on Beowulf

It seems to me that tomcat9 package are missing in beowulf  ?
Is my mistake ?

Thanks
Alsen


Maker and a fun of Devuan

Offline

#2 2020-01-07 13:41:01

HevyDevy
Member
Registered: 2019-09-06
Posts: 358  

Re: [SOLVED] tomcat9 on Beowulf

I dont think so...

~$ apt search tomcat9
Sorting... Done
Full Text Search... Done
libtomcat9-embed-java/testing 9.0.16-4 all
  Apache Tomcat 9 - Servlet and JSP engine -- embed libraries

libtomcat9-java/testing 9.0.16-4 all
  Apache Tomcat 9 - Servlet and JSP engine -- core libraries

tomcat9-admin/testing 9.0.16-4 all
  Apache Tomcat 9 - Servlet and JSP engine -- admin web applications

tomcat9-common/testing 9.0.16-4 all
  Apache Tomcat 9 - Servlet and JSP engine -- common files

tomcat9-docs/testing 9.0.16-4 all
  Apache Tomcat 9 - Servlet and JSP engine -- documentation

tomcat9-examples/testing 9.0.16-4 all
  Apache Tomcat 9 - Servlet and JSP engine -- example web applications

tomcat9-user/testing 9.0.16-4 all
  Apache Tomcat 9 - Servlet and JSP engine -- tools to create user instances

Offline

#3 2020-01-07 16:48:59

alsen
Member
From: Bologna
Registered: 2016-12-15
Posts: 26  

Re: [SOLVED] tomcat9 on Beowulf

I mean this package (from Debian https://packages.debian.org/en/bullseye/tomcat9)
----
Package: tomcat9 (9.0.27-1)

Apache Tomcat 9 - Servlet and JSP engine

Apache Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Oracle, and provides a "pure Java" HTTP web server environment for Java code to run.

This package contains only the startup scripts for the system-wide daemon. No documentation or web applications are included here, please install the tomcat9-docs and tomcat9-examples packages if you want them. Install tomcat9-user instead of this package if you don't want Tomcat to start as a service
------
I not able to create the startup scripts, can you help or where I can get information on how to do it ?

Thanks
Alsen


Maker and a fun of Devuan

Offline

#4 2020-01-08 10:37:49

HevyDevy
Member
Registered: 2019-09-06
Posts: 358  

Re: [SOLVED] tomcat9 on Beowulf

Looks like that version is unavailable in the devuan repos.

Offline

#5 2020-01-09 15:29:51

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] tomcat9 on Beowulf

The Debian version only supplies /lib/systemd/system/tomcat9.service, which won't work with sysvinit (obviously).

You could try the sysd2v-0.3.sh conversion script, that might work: http://www.trek.eu.org/devel/sysd2v/

EDIT: they're up to v-0.3 now.

Last edited by Head_on_a_Stick (2020-01-09 15:30:36)


Brianna Ghey — Rest In Power

Offline

#6 2020-01-09 19:21:44

alsen
Member
From: Bologna
Registered: 2016-12-15
Posts: 26  

Re: [SOLVED] tomcat9 on Beowulf

Thank you,

I will try the conversion tools  sysd2v in case it works as I can make the script available to all of Devunaners

Alsen


Maker and a fun of Devuan

Offline

#7 2020-01-10 16:14:17

alsen
Member
From: Bologna
Registered: 2016-12-15
Posts: 26  

Re: [SOLVED] tomcat9 on Beowulf

Hi Head_on_a_Stick

i have tested sysd2v to convert tomcat9.service and do not function, It create fake script with same mistake
I am not so expert on shell script to debug or update the script

Do you have another idea ?

Thanks
Alberto


Maker and a fun of Devuan

Offline

#8 2020-01-10 16:30:04

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] tomcat9 on Beowulf

Perhaps if you post the converted script here somebody will be able to debug it.

But I have zero experience with sysvinit scripts so I probably won't be much help (sorry).


Brianna Ghey — Rest In Power

Offline

#9 2020-01-11 13:27:20

alsen
Member
From: Bologna
Registered: 2016-12-15
Posts: 26  

Re: [SOLVED] tomcat9 on Beowulf

Oh yeah !!

that's all files
1.  this is tomcat9.service  that is on tomcat9 debian package
----------
#
# Systemd unit file for Apache Tomcat
#

[Unit]
Description=Apache Tomcat 9 Web Application Server
Documentation=https://tomcat.apache.org/tomcat-9.0-doc/index.html
After=network.target

[Service]

# Configuration
Environment="CATALINA_HOME=/usr/share/tomcat9"
Environment="CATALINA_BASE=/var/lib/tomcat9"
Environment="CATALINA_TMPDIR=/tmp"
Environment="JAVA_OPTS=-Djava.awt.headless=true"

# Lifecycle
Type=simple
ExecStartPre=+/usr/libexec/tomcat9/tomcat-update-policy.sh
ExecStart=/bin/sh /usr/libexec/tomcat9/tomcat-start.sh
SuccessExitStatus=143
Restart=on-abort

# Logging
SyslogIdentifier=tomcat9

# Security
User=tomcat
Group=tomcat
PrivateTmp=yes
AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
CacheDirectory=tomcat9
CacheDirectoryMode=750
ProtectSystem=strict
ReadWritePaths=/etc/tomcat9/Catalina/
ReadWritePaths=/var/lib/tomcat9/webapps/
ReadWritePaths=/var/log/tomcat9/
RequiresMountsFor=/var/log/tomcat9 /var/lib/tomcat9

[Install]
WantedBy=multi-user.target
------------------------------------------------------------- end of tomcat9.service

2.  this is the output of the command
$sysd2v-0.3.sh  tomcat9.service
-------------------------------------------------------------
#!/bin/sh
# Generated by sysd2v v0.3  --  http://www.trek.eu.org/devel/sysd2v
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides:       tomcat9
# Required-Start: $remote_fs
# Required-Stop:  $remote_fs
# Should-Start:   $network
# Should-Stop:    $network
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    Apache Tomcat 9 Web Application Server
### END INIT INFO
set -a
CACHE_DIRECTORY=/var/cache/tomcat9
"CATALINA_HOME=/usr/share/tomcat9"
"CATALINA_BASE=/var/lib/tomcat9"
"CATALINA_TMPDIR=/tmp"
"JAVA_OPTS=-Djava.awt.headless=true"
set +a

DESC=\"tomcat9\"
DAEMON=/bin/sh
DAEMON_ARGS=\"/usr/libexec/tomcat9/tomcat-start.sh\"
PIDFILE=/var/run/tomcat9-sysd2v.pid
START_ARGS=\"--user tomcat --chuid tomcat --background --make-pidfile\"
STOP_ARGS=\"--user tomcat\"

do_start_cmd_override ()
{
  install -d -o tomcat -g tomcat -m 750 /var/cache/tomcat9 || return 2
  /usr/libexec/tomcat9/tomcat-update-policy.sh || return 2
  do_start_cmd || return $?
}

-------------------------------------------- end of output command sysd2v-0.3.sh  tomcat9.service

Thanks to those who can help me
Alsen


Maker and a fun of Devuan

Offline

#10 2020-01-11 14:57:30

HevyDevy
Member
Registered: 2019-09-06
Posts: 358  

Re: [SOLVED] tomcat9 on Beowulf

that version has a hard dependancy on systemd, that is why it is not in the devuan repos. If you want this to work, use debian stable. You link to a debian testing package too, why?

Last edited by HevyDevy (2020-01-11 15:06:36)

Offline

#11 2020-01-12 21:55:14

alsen
Member
From: Bologna
Registered: 2016-12-15
Posts: 26  

Re: [SOLVED] tomcat9 on Beowulf

I'm trying to understand if I can use Beowult as an upgrade to the Ascii tomcat server that I have in production, I can wait, I hope I can use the tomcat on Beowulf.
Thank you


Maker and a fun of Devuan

Offline

Board footer