Comments (11)
Thanks @skavanagh, this is what I came up with after reading the document you provided the link to.
After verifying that Jetty and KeyBox were working correctly, I used the following procedure to setup, test and run Jetty / Keybox as a service on CentOS
mkdir /usr/local/KeyBox-jetty/jetty/temp
useradd --user-group --shell /bin/false --home-dir /usr/local/KeyBox-jetty/jetty/temp keybox
chown -R keybox /usr/local/KeyBox-jetty
cp /usr/local/KeyBox-jetty/jetty/bin/jetty.sh /etc/init.d/keybox
echo "JETTY_HOME=/usr/local/KeyBox-jetty/jetty" > /etc/default/keybox
echo "JETTY_BASE=/usr/local/KeyBox-jetty/jetty" >> /etc/default/keybox
echo "TMPDIR=/usr/local/KeyBox-jetty/jetty/temp" >> /etc/default/keybox
service keybox status
service keybox start
chkconfig keybox on
Jetty / Keybox now starts as a service, automatically on startup. It would be great if I could turn off the verbose mode though.
from bastillion.
It just uses jetty, so these instructions should help
https://www.eclipse.org/jetty/documentation/current/startup-unix-service.html#d0e8663
I think the only difference is you would copy jetty.sh from /KeyBox-jetty/jetty/bin and
then set JETTY_HOME to /KeyBox-jetty/jetty
from bastillion.
I know you can set
jetty.log.retain=90
jetty.logs=logs
in the KeyBox-jetty/jetty/modules/logging.mod file and that will setup log files and rotation for stderr/stdout. There should be a way to set the logging levels too.
from bastillion.
This worked for me. Put the following in your /etc/init/
directory:
description "Keybox"
start on runlevel [2345]
stop on runlevel [06]
respawn
respawn limit 10 5
env JETTY_HOME=/home/keybox/jetty
env JETTY_BASE=/home/keybox/jetty
env TMPDIR=/home/keybox/jetty/temp
script
export HOME="/home/keybox"
cd $HOME/jetty/
exec sudo -u keybox java -Xms1024m -Xmx1024m -jar start.jar
end script
I have the jetty files in
/home/keybox/jetty
located.
from bastillion.
I tried to figure out how to create a Debian/Ubuntu init.d script, but being all this java / jetty stuff I have to admit this gets too complex to me...
I have tried to adapt somo script from logstash/Elasticsearch but no success...
Being a headless software, it would be great to have it "server friendly/ready"... hope some of you could help me.
Best regards!
from bastillion.
You should just be able to follow the quick start instructions...
http://www.eclipse.org/jetty/documentation/current/startup-unix-service.html
your JETTY_HOME would need to be set to //KeyBox-jetty/
jetty
On Thu, Oct 22, 2015 at 4:35 AM, Alejandro Olivan Alvarez <
[email protected]> wrote:
I tried to figure out how to create a Debian/Ubuntu init.d script, but
being all this java / jetty stuff I have to admit this gets too complex to
me...I have tried to adapt somo script from logstash/Elasticsearch but no
success...
Being a headless software, it would be great to have it "server
friendly/ready"... hope some of you could help me.Best regards!
—
Reply to this email directly or view it on GitHub
#81 (comment).
from bastillion.
...I looked at it yestarday... being a Debian creature, I'm reluctant to add things on init.d folder that are not hortodox-debian-style LSB init scripts... So a first look at jetty.sh was somehow scaring to me.
Today a gave a second chance, basically following ausip steps posted in this same thread (which seems a lot to what I readed in the jetty linked site ...)
Starting fails that way...
Failed to start keybox.service: Unit keybox.service failed to load: No such file or directory.
Obviously something is missing or lacks pertinent permissions, the problem is what, and where this info (and presumably next errors) can be gethered.
Thank you for your help!
Regards
from bastillion.
on Ubuntu 16.0.4
apt-get install jetty9
copy KeyBox-jetty/jetty/webapps/keybox.xml to /var/lib/jetty9/webapps
copy KeyBox-jetty/jetty/keybox to /opt/keybox
ln -s /opt/keybox /usr/share/jetty9/
rm -rf /var/lib/jetty/webapps/root
chown jetty /opt/keybox/WEB-INF/classes/keydb/keybox.mv.db
systemctl start jetty9
from bastillion.
@Fratotec I've followed your instructions but I've received the error:
java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil
.class from jar file:/opt/keybox/WEB-INF/lib/log4j-api-2.9.1.jar
It seems that the jetty9 version does not support log4j (on ubuntu 16.04
from bastillion.
Perhaps an issue with the newer version ?
I used keybox-jetty-v2.90_01.tar.gz, and the log4j libs are
/opt/keybox/WEB-INF/lib/log4j-api-2.8.2.jar
/opt/keybox/WEB-INF/lib/log4j-slf4j-impl-2.8.2.jar
/opt/keybox/WEB-INF/lib/log4j-core-2.8.2.jar
from bastillion.
Here I have
seba@gw:~$ ls /opt/keybox/WEB-INF/lib/lo* -1
/opt/keybox/WEB-INF/lib/log4j-api-2.9.1.jar
/opt/keybox/WEB-INF/lib/log4j-core-2.9.1.jar
/opt/keybox/WEB-INF/lib/log4j-slf4j-impl-2.9.1.jar
Maybe it's that!
from bastillion.
Related Issues (20)
- Local Install - javax.crypto.IllegalBlockSizeException HOT 1
- LDAPS useSLL=true HOT 1
- Error when starting bastillion in docker HOT 3
- armhf java 17: Can not initialize cryptographic mechanism
- Unable to display correctly special characters like graph lines in Terminals HOT 1
- Bastillion behind Apache ReverseProxy HOT 1
- Last line of terminal does not render properly HOT 1
- Administrativ users with multiple profiles
- Show key length
- There is Limitation?
- Problem resize
- Is there a way in UI when creating script to use variable such as username?
- HTTP ERROR 503 Service Unavailable HOT 3
- 3.14.1 Release HOT 5
- authorized_keys file got empty for instances behind bastillion server
- Error after upgrade to 3.15.00 HOT 3
- Stuck during installation. HOT 5
- Illegal char <:> at index 2: /C:/ HOT 1
- Session timeout issue
- Keyboard ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bastillion.