Restarting embedded Jetty

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Restarting embedded Jetty

Luís
Hello,

I am trying to restart an embedded Jetty instance the following way:

$ sh jetty.sh restart
jetty.sh: 123: jetty.sh: Syntax error: "(" unexpected

Line 123 just contains this:

CONFIGS=()

Is this a bug with the .sh file or something else? Can it be fixed?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Restarting embedded Jetty

Joakim Erdfelt-9
Need more information.

You say "embedded jetty", but then proceed to mention jetty.sh, which is standalone jetty.
Is the jetty.sh you are referring to your own jetty.sh for your own purposes, or the one from the jetty-distribution's bin directory?
Which version of Jetty?
What version of Unix?
Why are you using "sh" to execute jetty.sh? (you just forced it to use 'sh' and not bash, which it requires)


--
Joakim Erdfelt <[hidden email]>
Expert advice, services and support from from the Jetty & CometD experts


On Tue, Apr 29, 2014 at 1:12 AM, Luís de Sousa <[hidden email]> wrote:
Hello,

I am trying to restart an embedded Jetty instance the following way:

$ sh jetty.sh restart
jetty.sh: 123: jetty.sh: Syntax error: "(" unexpected

Line 123 just contains this:

CONFIGS=()

Is this a bug with the .sh file or something else? Can it be fixed?

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: Restarting embedded Jetty

Luís
In reply to this post by Luís
Hi Joakim,

I did not install this Jetty instance, it came bundled with a software called GeoNetwork. To your other questions:

$ cat VERSION.txt | less
jetty-7.6.8.v20121106 - 06 November 2012
...

$ uname -r
3.2.0-57-virtual

$ cd bin
$ sudo ./jetty.sh restart
** ERROR: JETTY_HOME not set, you need to set it or install in a standard location

Thank you.


On 29 April 2014 10:12, Luís de Sousa <[hidden email]> wrote:
Hello,

I am trying to restart an embedded Jetty instance the following way:

$ sh jetty.sh restart
jetty.sh: 123: jetty.sh: Syntax error: "(" unexpected

Line 123 just contains this:

CONFIGS=()

Is this a bug with the .sh file or something else? Can it be fixed?

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: Restarting embedded Jetty

Luís
Ok, I can run the jetty.sh script from the jetty root folder:

$ sudo bin/jetty.sh restart

Thanks in any case.


On 29 April 2014 16:17, Luís de Sousa <[hidden email]> wrote:
Hi Joakim,

I did not install this Jetty instance, it came bundled with a software called GeoNetwork. To your other questions:

$ cat VERSION.txt | less
jetty-7.6.8.v20121106 - 06 November 2012
...

$ uname -r
3.2.0-57-virtual

$ cd bin
$ sudo ./jetty.sh restart
** ERROR: JETTY_HOME not set, you need to set it or install in a standard location

Thank you.


On 29 April 2014 10:12, Luís de Sousa <[hidden email]> wrote:
Hello,

I am trying to restart an embedded Jetty instance the following way:

$ sh jetty.sh restart
jetty.sh: 123: jetty.sh: Syntax error: "(" unexpected

Line 123 just contains this:

CONFIGS=()

Is this a bug with the .sh file or something else? Can it be fixed?

Thank you.


Reply | Threaded
Open this post in threaded view
|

Re: Restarting embedded Jetty

Joakim Erdfelt-9
In reply to this post by Luís
The distribution's jetty.sh requires bash, we test it on bash 4.x
When you execute via sh you are at the mercy of the unix distribution as to what shell is actually being used.

Examples:
  Fedora 20 - sh is symlinked to bash
  Ubuntu 13 - sh is symlinked to dash

Dash is unsupported.

the uname doesn't tell me anything useful.
If this is a linux distro, what does this return for you?

$ lsb_release -a

don't sudo or sh or anything else the jetty.sh
don't switch directories to bin
read the start of the jetty.sh on how to set it up for other users and whatnot.
the standard jetty.sh from the jetty distribution is also suitable for use as an init.d script


--
Joakim Erdfelt <[hidden email]>
Expert advice, services and support from from the Jetty & CometD experts


On Tue, Apr 29, 2014 at 7:17 AM, Luís de Sousa <[hidden email]> wrote:
Hi Joakim,

I did not install this Jetty instance, it came bundled with a software called GeoNetwork. To your other questions:

$ cat VERSION.txt | less
jetty-7.6.8.v20121106 - 06 November 2012
...

$ uname -r
3.2.0-57-virtual

$ cd bin
$ sudo ./jetty.sh restart
** ERROR: JETTY_HOME not set, you need to set it or install in a standard location

Thank you.


On 29 April 2014 10:12, Luís de Sousa <[hidden email]> wrote:
Hello,

I am trying to restart an embedded Jetty instance the following way:

$ sh jetty.sh restart
jetty.sh: 123: jetty.sh: Syntax error: "(" unexpected

Line 123 just contains this:

CONFIGS=()

Is this a bug with the .sh file or something else? Can it be fixed?

Thank you.