You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Lukas Kahwe Smith <sm...@pooteeweet.org> on 2014/06/24 15:23:45 UTC

test setup

Aloha,

We would like to do a hackday where we test out Oak with MongoDB.
Does anyone have a recommendation for how to provide attendees with the simplest possible way to get this setup working?

From my understanding there is not yet a working standalone setup for Oak that would enable us to just use a jar file.

regards,
Lukas Kahwe Smith
smith@pooteeweet.org




Re: test setup

Posted by Lukas Kahwe Smith <sm...@pooteeweet.org>.
On 26 Jun 2014, at 09:46, Marcel Reutegger <mr...@adobe.com> wrote:

> Hi Lukas,
> 
> thanks for your feedback. changing the default to 127.0.0.1 makes
> sense. I’ll create an issue and change oak-run accordingly.

great!

updated to 1.0.1 and all seems to work nicely (needed to update MongoDB to 2.6.0+ though)

another question .. how to setup Solr integration? didn’t find any details on the setup in the docs http://jackrabbit.apache.org/oak/docs/query.html

regards,
Lukas Kahwe Smith
smith@pooteeweet.org




Re: test setup

Posted by Marcel Reutegger <mr...@adobe.com>.
Hi Lukas,

thanks for your feedback. changing the default to 127.0.0.1 makes
sense. I’ll create an issue and change oak-run accordingly.

Regards
 Marcel

On 25/06/14 21:22, "Lukas Kahwe Smith" <sm...@pooteeweet.org> wrote:

>
>On 25 Jun 2014, at 13:25, Lukas Kahwe Smith <sm...@pooteeweet.org> wrote:
>
>> 
>> On 25 Jun 2014, at 09:04, Marcel Reutegger <mr...@adobe.com> wrote:
>> 
>>> Hi Lukas,
>>> 
>>> the below example is from my 1.0 branch checkout of oak. unfortunately
>>> we don¹t have pre-built binaries for the oak-run module. you will have
>>> to build it yourself. you can download the most recent stable version
>>> of oak from here: http://jackrabbit.apache.org/downloads.html
>>> 
>>> to speed up the process you may want to skip tests:
>>> 
>>> mvn -DskipTests install
>>> 
>>> the jar file is then located in your local maven repository and under
>>> oak-run/target.
>> 
>> Ok thx .. got it compiled but I am getting an exception on startup.
>> I installed MongoDB via homebrew and I can connect to the “mongo” CLI
>>without any parameters.
>> 
>> First few lines in /usr/local/var/log/mongodb/mongo.log also seem to
>>indicate that I am infact using the default port:
>> Wed Jun 25 13:17:07.052 [initandlisten] MongoDB starting : pid=16488
>>port=27017 dbpath=/usr/local/var/mongodb 64-bit host=localhost
>> Wed Jun 25 13:17:07.052 [initandlisten]
>> Wed Jun 25 13:17:07.052 [initandlisten] ** WARNING: soft rlimits too
>>low. Number of files is 256, should be at least 1000
>> Wed Jun 25 13:17:07.052 [initandlisten] db version v2.4.9
>> 
>> But when I then launch oak I get an exception:
>> lsmith@localhost jackrabbit-oak-1.0.0$ java -jar
>>oak-run/target/oak-run-1.0.0.jar server http://localhost:8080/ Oak-Mongo
>>--db my-oak
>> Apache Jackrabbit Oak 1.0.0
>> Starting Oak-Mongo repository -> http://localhost:8080/
>> Jun 25, 2014 1:20:12 PM com.mongodb.DBTCPConnector initDirectConnection
>> WARNING: Exception executing isMaster command on
>>localhost/192.168.80.32:27017
>> java.net.ConnectException: Connection refused
>> 
>> Any hints?
>
>got it working by adding an explicit host parameter:
>java -jar oak-run/target/oak-run-1.0.0.jar server http://localhost:8080/
>Oak-Mongo --db my-oak --host 127.0.0.1
>
>it seems like at least with homebrew it comes with a default config
>"bind_ip = 127.0.0.1” which prevents connecting via localhost or the
>machine IP
>if other distributions have a similar default it might make sense to
>default to 127.0.0.1 rather than locahost
>
>regards,
>Lukas Kahwe Smith
>smith@pooteeweet.org
>
>
>


Re: test setup

Posted by Lukas Kahwe Smith <sm...@pooteeweet.org>.
On 25 Jun 2014, at 13:25, Lukas Kahwe Smith <sm...@pooteeweet.org> wrote:

> 
> On 25 Jun 2014, at 09:04, Marcel Reutegger <mr...@adobe.com> wrote:
> 
>> Hi Lukas,
>> 
>> the below example is from my 1.0 branch checkout of oak. unfortunately
>> we don¹t have pre-built binaries for the oak-run module. you will have
>> to build it yourself. you can download the most recent stable version
>> of oak from here: http://jackrabbit.apache.org/downloads.html
>> 
>> to speed up the process you may want to skip tests:
>> 
>> mvn -DskipTests install
>> 
>> the jar file is then located in your local maven repository and under
>> oak-run/target.
> 
> Ok thx .. got it compiled but I am getting an exception on startup.
> I installed MongoDB via homebrew and I can connect to the “mongo” CLI without any parameters.
> 
> First few lines in /usr/local/var/log/mongodb/mongo.log also seem to indicate that I am infact using the default port:
> Wed Jun 25 13:17:07.052 [initandlisten] MongoDB starting : pid=16488 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=localhost
> Wed Jun 25 13:17:07.052 [initandlisten]
> Wed Jun 25 13:17:07.052 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
> Wed Jun 25 13:17:07.052 [initandlisten] db version v2.4.9
> 
> But when I then launch oak I get an exception:
> lsmith@localhost jackrabbit-oak-1.0.0$ java -jar oak-run/target/oak-run-1.0.0.jar server http://localhost:8080/ Oak-Mongo --db my-oak
> Apache Jackrabbit Oak 1.0.0
> Starting Oak-Mongo repository -> http://localhost:8080/
> Jun 25, 2014 1:20:12 PM com.mongodb.DBTCPConnector initDirectConnection
> WARNING: Exception executing isMaster command on localhost/192.168.80.32:27017
> java.net.ConnectException: Connection refused
> 
> Any hints?

got it working by adding an explicit host parameter:
java -jar oak-run/target/oak-run-1.0.0.jar server http://localhost:8080/ Oak-Mongo --db my-oak --host 127.0.0.1

it seems like at least with homebrew it comes with a default config "bind_ip = 127.0.0.1” which prevents connecting via localhost or the machine IP
if other distributions have a similar default it might make sense to default to 127.0.0.1 rather than locahost

regards,
Lukas Kahwe Smith
smith@pooteeweet.org




Re: test setup

Posted by Lukas Kahwe Smith <sm...@pooteeweet.org>.
On 25 Jun 2014, at 09:04, Marcel Reutegger <mr...@adobe.com> wrote:

> Hi Lukas,
> 
> the below example is from my 1.0 branch checkout of oak. unfortunately
> we don¹t have pre-built binaries for the oak-run module. you will have
> to build it yourself. you can download the most recent stable version
> of oak from here: http://jackrabbit.apache.org/downloads.html
> 
> to speed up the process you may want to skip tests:
> 
> mvn -DskipTests install
> 
> the jar file is then located in your local maven repository and under
> oak-run/target.

Ok thx .. got it compiled but I am getting an exception on startup.
I installed MongoDB via homebrew and I can connect to the “mongo” CLI without any parameters.

First few lines in /usr/local/var/log/mongodb/mongo.log also seem to indicate that I am infact using the default port:
Wed Jun 25 13:17:07.052 [initandlisten] MongoDB starting : pid=16488 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=localhost
Wed Jun 25 13:17:07.052 [initandlisten]
Wed Jun 25 13:17:07.052 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
Wed Jun 25 13:17:07.052 [initandlisten] db version v2.4.9

But when I then launch oak I get an exception:
lsmith@localhost jackrabbit-oak-1.0.0$ java -jar oak-run/target/oak-run-1.0.0.jar server http://localhost:8080/ Oak-Mongo --db my-oak
Apache Jackrabbit Oak 1.0.0
Starting Oak-Mongo repository -> http://localhost:8080/
Jun 25, 2014 1:20:12 PM com.mongodb.DBTCPConnector initDirectConnection
WARNING: Exception executing isMaster command on localhost/192.168.80.32:27017
java.net.ConnectException: Connection refused

Any hints?

regards,
Lukas Kahwe Smith
smith@pooteeweet.org




Re: test setup

Posted by Marcel Reutegger <mr...@adobe.com>.
Hi Lukas,

the below example is from my 1.0 branch checkout of oak. unfortunately
we don¹t have pre-built binaries for the oak-run module. you will have
to build it yourself. you can download the most recent stable version
of oak from here: http://jackrabbit.apache.org/downloads.html

to speed up the process you may want to skip tests:

mvn -DskipTests install

the jar file is then located in your local maven repository and under
oak-run/target.

Regards
 Marcel

On 24/06/14 16:18, "Lukas Kahwe Smith" <sm...@pooteeweet.org> wrote:

>
>On 24 Jun 2014, at 16:12, Marcel Reutegger <mr...@adobe.com> wrote:
>
>> Hi,
>> 
>> you can use the oak-run jar file and start it up like this:
>> 
>> java -jar target/oak-run-1.1-SNAPSHOT.jar server http://localhost:8080/
>
>is this snapshot release available somewhere to download or do I need to
>compile this myself? if I have to compile, are there instructions
>somewhere?
>
>regards,
>Lukas Kahwe Smith
>smith@pooteeweet.org
>
>
>


Re: test setup

Posted by Lukas Kahwe Smith <sm...@pooteeweet.org>.
On 24 Jun 2014, at 16:12, Marcel Reutegger <mr...@adobe.com> wrote:

> Hi,
> 
> you can use the oak-run jar file and start it up like this:
> 
> java -jar target/oak-run-1.1-SNAPSHOT.jar server http://localhost:8080/

is this snapshot release available somewhere to download or do I need to compile this myself? if I have to compile, are there instructions somewhere?

regards,
Lukas Kahwe Smith
smith@pooteeweet.org




Re: test setup

Posted by Marcel Reutegger <mr...@adobe.com>.
Hi,

you can use the oak-run jar file and start it up like this:

java -jar target/oak-run-1.1-SNAPSHOT.jar server http://localhost:8080/
Oak-Mongo --db my-oak


this assumes you have a MongoDB running on your local machine on the
default port.

see 
https://github.com/apache/jackrabbit-oak/tree/trunk/oak-run#oak-server-mode
for more details.

alternatively you can construct an oak repository programatically as we
do in our tests in oak-jcr.

Regards
 Marcel

On 24/06/14 15:23, "Lukas Kahwe Smith" <sm...@pooteeweet.org> wrote:

>Aloha,
>
>We would like to do a hackday where we test out Oak with MongoDB.
>Does anyone have a recommendation for how to provide attendees with the
>simplest possible way to get this setup working?
>
>From my understanding there is not yet a working standalone setup for Oak
>that would enable us to just use a jar file.
>
>regards,
>Lukas Kahwe Smith
>smith@pooteeweet.org
>
>
>