Solved

jetty on ubunutu

Posted on 2011-03-09
6
399 Views
Last Modified: 2013-12-16
Hi

I need to install jetty on ubuntu but i'm not really sure what i'm doing.

I did apt-get install jetty

and then it said it couldn't start the service as NO_START = 1 so i editted the file to N0_START = 0 as recommended and then started the service by service jetty start

I really don't know much about services under linux
Is this the correct way to start the service?

What permissions is the service running with? What user/group is it running under and how do i find out these details for a service?

thanks
0
Comment
Question by:andieje
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:Joseph Ruiz
ID: 35085721
If you've edited that file while Jetty was still running, you may have caused an error that forced the service to stop.

These are the commands used to stop and start the service.
 
sudo /etc/init.d/jetty stop
sudo /etc/init.d/jetty start

Open in new window

To install Jetty:
 
sudo apt-get install jetty

Open in new window

Also, these libraries are also needed for Jetty to run correctly:
 
sudo apt-get install libjetty6-java
sudo apt-get install libjetty6-extra-java
sudo apt-get install jetty

Open in new window

If you've ran all these commands with sudo, you have installed them under ~root and they are running as such; with root permissions. I always check ubuntu forums for unbuntu related stuff.
0
 

Author Comment

by:andieje
ID: 35085907
i editted the file before i started the service

I coulnd't install the 2 packages:
 sudo apt-get install libjetty6-java
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package libjetty6-java is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libjetty6-java has no installation candidate
0
 

Author Comment

by:andieje
ID: 35085939
sudo apt-get install libjetty6-extra-java
Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Couldn't find package libjetty6-extra-java
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 9

Accepted Solution

by:
svs earned 500 total points
ID: 35086213
jetty is running under JETTY_USER (jetty by default).  that variable is set in /etc/default/jetty.

in Ubuntu (and Debian), services usually are configured via files in /etc/default, which are sourced (included) by service's startup script (in /etc/init or /etc/init.d).

the NO_START trick is a common way to install a service in disabled state.

libjetty6-* packages are obsolete, use libjetty-* ones.
0
 

Author Comment

by:andieje
ID: 35098358
ah this sounds familar - i think i have been told this before: services start off as root and then drop down to the user specified in the config files. is that right?
0
 
LVL 9

Expert Comment

by:svs
ID: 35099710
Yes
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question