You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flume.apache.org by Jagadish Bihani <ja...@pubmatic.com> on 2012/09/10 16:26:43 UTC
Flume -ng startup failed
Hi
My flume 1.2.0 setup is working fine on one machine.
But when I ran it on another machine it gave me syntax error while starting
agent :
"bin/flume-ng: line 81: syntax error in conditional expression:
unexpected token `('
bin/flume-ng: line 81: syntax error near `^java\.library\.path=(.'
bin/flume-ng: line 81: ` if [[ $line =~ ^java\.library\.path=(.*)$
]]; then' "
I have set JAVA_HOME.
I even vimdiffed flume-ng file with the one working fine. There was no
difference.
Has anyone come across such error?
Regards,
Re: Flume -ng startup failed
Posted by Jagadish Bihani <ja...@pubmatic.com>.
Hi
Thanks Chris. It worked.
Actually bash versions 3.1 onwards quoting regex is not necessary.
But for older versions of bash we still need to use quotes for regex
matching.
My machine has bash version 3.0 (which is really old). Hence it didn't work.
Regards,
Jagadish
On 09/10/2012 08:01 PM, Chris Neal wrote:
> I ran in to this on Solaris, where it worked fine on Linux. There's
> something in the bash interpreter that doesn't like the regex. The
> way I got around it was to double quote the regex, like such:
>
> "^java\.library\.path=(.*)$"
>
> You'll have to do that in roughly 4 spots throughout the script. That
> cleared it up for me. I'd love to hear of a better way to do that
> though :)
>
> Chris
>
>
>
> On Mon, Sep 10, 2012 at 9:26 AM, Jagadish Bihani
> <jagadish.bihani@pubmatic.com <ma...@pubmatic.com>>
> wrote:
>
> Hi
>
> My flume 1.2.0 setup is working fine on one machine.
> But when I ran it on another machine it gave me syntax error while
> starting
> agent :
> "bin/flume-ng: line 81: syntax error in conditional expression:
> unexpected token `('
> bin/flume-ng: line 81: syntax error near `^java\.library\.path=(.'
> bin/flume-ng: line 81: ` if [[ $line =~
> ^java\.library\.path=(.*)$ ]]; then' "
>
> I have set JAVA_HOME.
> I even vimdiffed flume-ng file with the one working fine. There
> was no difference.
> Has anyone come across such error?
>
>
> Regards,
>
>
>
Re: Flume -ng startup failed
Posted by Will McQueen <wi...@cloudera.com>.
Hi,
Could you please both post the output of "bash -version"? Thank you.
Cheers,
Will
On Mon, Sep 10, 2012 at 7:31 AM, Chris Neal <cw...@gmail.com> wrote:
> I ran in to this on Solaris, where it worked fine on Linux. There's
> something in the bash interpreter that doesn't like the regex. The way I
> got around it was to double quote the regex, like such:
>
> "^java\.library\.path=(.*)$"
>
> You'll have to do that in roughly 4 spots throughout the script. That
> cleared it up for me. I'd love to hear of a better way to do that though :)
>
> Chris
>
>
>
>
> On Mon, Sep 10, 2012 at 9:26 AM, Jagadish Bihani <
> jagadish.bihani@pubmatic.com> wrote:
>
>> Hi
>>
>> My flume 1.2.0 setup is working fine on one machine.
>> But when I ran it on another machine it gave me syntax error while
>> starting
>> agent :
>> "bin/flume-ng: line 81: syntax error in conditional expression:
>> unexpected token `('
>> bin/flume-ng: line 81: syntax error near `^java\.library\.path=(.'
>> bin/flume-ng: line 81: ` if [[ $line =~ ^java\.library\.path=(.*)$
>> ]]; then' "
>>
>> I have set JAVA_HOME.
>> I even vimdiffed flume-ng file with the one working fine. There was no
>> difference.
>> Has anyone come across such error?
>>
>>
>> Regards,
>>
>>
>>
>
Re: Flume -ng startup failed
Posted by Chris Neal <cw...@gmail.com>.
I ran in to this on Solaris, where it worked fine on Linux. There's
something in the bash interpreter that doesn't like the regex. The way I
got around it was to double quote the regex, like such:
"^java\.library\.path=(.*)$"
You'll have to do that in roughly 4 spots throughout the script. That
cleared it up for me. I'd love to hear of a better way to do that though :)
Chris
On Mon, Sep 10, 2012 at 9:26 AM, Jagadish Bihani <
jagadish.bihani@pubmatic.com> wrote:
> Hi
>
> My flume 1.2.0 setup is working fine on one machine.
> But when I ran it on another machine it gave me syntax error while starting
> agent :
> "bin/flume-ng: line 81: syntax error in conditional expression: unexpected
> token `('
> bin/flume-ng: line 81: syntax error near `^java\.library\.path=(.'
> bin/flume-ng: line 81: ` if [[ $line =~ ^java\.library\.path=(.*)$
> ]]; then' "
>
> I have set JAVA_HOME.
> I even vimdiffed flume-ng file with the one working fine. There was no
> difference.
> Has anyone come across such error?
>
>
> Regards,
>
>
>