elastic / logstash

Logstash - transport and process your logs, events, or other data
https://www.elastic.co/products/logstash
Other
78 stars 3.5k forks source link

Fails to source "logstash.lib.sh" when starting over SSH #3970

Open jmcomets opened 9 years ago

jmcomets commented 9 years ago

Hi, I'm trying to start logstash and detach as a SSH one-liner in a remote management script. I get the following error when running ssh user@host cd path/to/logstash && bin/logstash

bin/logstash: $(cd bin/..; pwd)/bin/logstash.lib.sh: not found

When I run the command in an interactive SSH session I also get the above error.

Please note that I'm running this on a Windows machine, and pointing to a SunOS VM. I tried using Logstash 1.5.4 and the latest 2.0.0.beta1 and encountered the same issue.

EDIT : bumping this up a bit. :) EDIT 2 : actually, I do get this error when running in an interactive session...

hypergori commented 9 years ago

Had the same issue but , after I changed the shell script to use bash on Solaris then , it started to work.

bin/logstash bin/logstash.lib.sh

on the 1st line , I use #!/usr/bin/bash depending on your path to bash.

jordansissel commented 9 years ago

What OS? What is your /bin/sh? Is it POSIX-compliant? I'm pretty sure $(...) is specified in POSIX, and that's what the shell script targets.

aayoubi commented 7 years ago

On Solaris 10, /usr/bin/sh is not a standards compliant shell. The POSIX compliant shell is located under /usr/xpg4/bin/sh. Would it be possible to use bash by default?

jordansissel commented 7 years ago

You could change this, but I don't know if we can change it for logstash itself (making the path change to bash would break other operating systems)

On Sat, Jan 7, 2017 at 5:36 PM Ali AYOUBI notifications@github.com wrote:

On Solaris 10, /usr/bin/sh is not a standards compliant shell. The POSIX compliant shell is located under /usr/xpg4/bin/sh. Would it be possible to use bash by default?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/elastic/logstash/issues/3970#issuecomment-271122933, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIC6iBGCtLAwl9JfpUHIpwr6BGxq8kfks5rQD21gaJpZM4GD7OQ .

aayoubi commented 7 years ago

I agree. In all cases, this only occurs on Solaris 10, I don't see this issue on Solaris 11.