snapshooter on OS X

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

snapshooter on OS X

Grant Ingersoll-2
Has anyone run the distribution scripts successfully on OS X?  If so,  
what did you have to change, if anything, to get them to work?

I'm getting a couple of issues in snapshooter:
1.  The line . ${solr_root}/bin/scripts-util fails saying command not  
found.  This is presumably because solr_root is not being set

2. The cp command fails when trying to make the links b/c the -l  
attributed does not seem to exist for the cp command on OS X

I am running bash 3.2.0 on 10.4.9


Thanks,
Grant
Reply | Threaded
Open this post in threaded view
|

Re: snapshooter on OS X

Bill Au
What does your directory structure look like?  The scripts assume that
all the scripts are in the bin directory which is under $solr_root.
So $solr_root is set to be two directory level up from where the
script is.

It turns the cp command in OS X and BSD can not be used to create hard links.
We will need to use the ln command instead.

Bill

On 4/21/07, Grant Ingersoll <[hidden email]> wrote:

> Has anyone run the distribution scripts successfully on OS X?  If so,
> what did you have to change, if anything, to get them to work?
>
> I'm getting a couple of issues in snapshooter:
> 1.  The line . ${solr_root}/bin/scripts-util fails saying command not
> found.  This is presumably because solr_root is not being set
>
> 2. The cp command fails when trying to make the links b/c the -l
> attributed does not seem to exist for the cp command on OS X
>
> I am running bash 3.2.0 on 10.4.9
>
>
> Thanks,
> Grant
>
Reply | Threaded
Open this post in threaded view
|

Re: snapshooter on OS X

Grant Ingersoll-2
I am using the solr home that comes with the example.  The curious  
thing is I get the error in item 1 when running on linux, as well.  
The error says something about command not found line 15, but all the  
files I looked at, line 15 was a comment.   I _think_ it is referring  
to an error in reading scripts.conf, but I am not sure.

I will put a bug in for the link issue for now and try to write up  
some scripts that work on OS X after ApacheCon.  I will also _try_ to  
investigate the other issue when time permits.  Should we have  
separate directories under bin for different platforms or should we  
try to have one script to rule them all?

On Apr 22, 2007, at 10:18 PM, Bill Au wrote:

> What does your directory structure look like?  The scripts assume that
> all the scripts are in the bin directory which is under $solr_root.
> So $solr_root is set to be two directory level up from where the
> script is.
>
> It turns the cp command in OS X and BSD can not be used to create  
> hard links.
> We will need to use the ln command instead.
>
> Bill
>
> On 4/21/07, Grant Ingersoll <[hidden email]> wrote:
>> Has anyone run the distribution scripts successfully on OS X?  If so,
>> what did you have to change, if anything, to get them to work?
>>
>> I'm getting a couple of issues in snapshooter:
>> 1.  The line . ${solr_root}/bin/scripts-util fails saying command not
>> found.  This is presumably because solr_root is not being set
>>
>> 2. The cp command fails when trying to make the links b/c the -l
>> attributed does not seem to exist for the cp command on OS X
>>
>> I am running bash 3.2.0 on 10.4.9
>>
>>
>> Thanks,
>> Grant
>>


Reply | Threaded
Open this post in threaded view
|

Re: snapshooter on OS X

Yonik Seeley-2
On 4/22/07, Grant Ingersoll <[hidden email]> wrote:
>  Should we have
> separate directories under bin for different platforms or should we
> try to have one script to rule them all?

I think we should try to keep the same scripts until it becomes too burdensome.

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: snapshooter on OS X

Bertrand Delacretaz
In reply to this post by Grant Ingersoll-2
On 4/23/07, Grant Ingersoll <[hidden email]> wrote:
> ...The error says something about command not found line 15, but all the
> files I looked at, line 15 was a comment...

Running your script with

  bash -x myscript

should help, it will echo commands before executing them.

-Bertrand
Reply | Threaded
Open this post in threaded view
|

Re: snapshooter on OS X

Bill Au
You can also run the script with the -V option.  It shows debugging
info but not as much as "bash -x".

I tried snapshooter on OS X 10.4.9.  I did get the "cp: illegal option
-- l" error.
But that's the only error I got.

Bill

On 4/23/07, Bertrand Delacretaz <[hidden email]> wrote:

> On 4/23/07, Grant Ingersoll <[hidden email]> wrote:
> > ...The error says something about command not found line 15, but all the
> > files I looked at, line 15 was a comment...
>
> Running your script with
>
>   bash -x myscript
>
> should help, it will echo commands before executing them.
>
> -Bertrand
>
Reply | Threaded
Open this post in threaded view
|

Re: snapshooter on OS X

Grant Ingersoll-2
Running in example/solr/bin from 1.1 distribution using bash -x ./
snapshooter -u myname -d data

++ . <my path>/apache-solr-1.1.0-incubating/example/solr/conf/
scripts.conf
+++ $'\r'
: command not found <my-path>/apache-solr-1.1.0-incubating/example/
solr/conf/scripts.conf: line 15:

And then later I get the cp -l error.

Scripts.conf is:

user=
solr_hostname=localhost
solr_port=8983
rsyncd_port=18983
data_dir=
webapp_name=solr
master_host=
master_data_dir=
master_status_dir=

but I didn't set it up at all.  Line 15 is the line before user=


On Apr 23, 2007, at 10:00 PM, Bill Au wrote:

> You can also run the script with the -V option.  It shows debugging
> info but not as much as "bash -x".
>
> I tried snapshooter on OS X 10.4.9.  I did get the "cp: illegal option
> -- l" error.
> But that's the only error I got.
>
> Bill
>
> On 4/23/07, Bertrand Delacretaz <[hidden email]> wrote:
>> On 4/23/07, Grant Ingersoll <[hidden email]> wrote:
>> > ...The error says something about command not found line 15, but  
>> all the
>> > files I looked at, line 15 was a comment...
>>
>> Running your script with
>>
>>   bash -x myscript
>>
>> should help, it will echo commands before executing them.
>>
>> -Bertrand
>>

--------------------------
Grant Ingersoll
Center for Natural Language Processing
http://www.cnlp.org

Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/ 
LuceneFAQ


Reply | Threaded
Open this post in threaded view
|

Re: snapshooter on OS X

Yonik Seeley-2
On 4/24/07, Grant Ingersoll <[hidden email]> wrote:
> Scripts.conf is:
[...]

Could you try running dos2unix on this file (or maybe try a nightly build)?

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: snapshooter on OS X

Bertrand Delacretaz
In reply to this post by Grant Ingersoll-2
On 4/24/07, Grant Ingersoll <[hidden email]> wrote:

> ...++ . <my path>/apache-solr-1.1.0-incubating/example/solr/conf/
> scripts.conf
> +++ $'\r'
> : command not found <my-path>/apache-solr-1.1.0-incubating/example/...

Not sure what $'\r' means exactly, but it might indicate invalid
characters either in the snapshooter or scripts.conf files.

You can use for example "cat -v somefile" to see if there are any
unprintable characters in somefile, there should be none in the
scripts and configuration files.

If you're working with a distribution extracted from a zip file, there
might be DOS end-of-lines in some files (didn't check, just a wild
guess).

-Bertrand
Reply | Threaded
Open this post in threaded view
|

Re: snapshooter on OS X

Grant Ingersoll-2
In reply to this post by Yonik Seeley-2
That was it, now runs past that and hits the known issue of cp -l.  I  
will file a bug for that issue.  If no one else gets to it first, I  
will try to run all the scripts, etc. on OS X after ApacheCon to see  
if there are any other issues.


On Apr 24, 2007, at 9:54 AM, Yonik Seeley wrote:

> On 4/24/07, Grant Ingersoll <[hidden email]> wrote:
>> Scripts.conf is:
> [...]
>
> Could you try running dos2unix on this file (or maybe try a nightly  
> build)?
>
> -Yonik