EurekaStreams on Windows/Cygwin?

221 views
Skip to first unread message

rocketman

unread,
Oct 15, 2010, 1:29:40 PM10/15/10
to Eureka Streams Development
I was wondering if anyone has EurekaStreams running on Windows? Do
the ES bash scripts work on Cygwin?

I've looked at the"Eureka Streams Fedora Installation" guide by Paul
Morgan and it was somewhat helpful...just wondering if anyone has any
tips and tricks to share for Windows install?

Cheers,
Paul

Jeffrey Stephens (Lockheed Martin)

unread,
Oct 15, 2010, 1:48:05 PM10/15/10
to Eureka Streams Development
Paul,
Good to hear you've made it this far. I use a pure windows setup for
development, only using cygwin when I need to use git.
That said, I've never tried running the database bash scripts. It
would be handy to have a copy of those scripts as .bat files but until
we (or someone else) can get that done, you can just run the scripts
directly using the psql command line, such as:
psql -f eurekastreams_2_tablecreates.sql -U eurekastreams

You'll need to run the initial schema script in order and then
(depending on which version you want, either 0.9 or 1.0), run the
migrations scripts in order.

I admit this is a pain but it should get you closer to a working
windows environment.

-Jeffrey

rocketman

unread,
Oct 18, 2010, 1:34:01 PM10/18/10
to Eureka Streams Development
Thanks, Jeffrey.

I ran the 7 scripts in classes\db\schema. then I attempted to run the
1.0 migration scripts. When I got to
U0006AddRequestorToFeedSubscriber.sql, I got the following error. Is
there some step that I missed?

Also, I grabbed the HEAD from git, so I assume this corresponds to
1.0?

eurekastreams\web\target\classes\db\migration\1\0>psql -U
eurekastreams -w -f U0006AddRequestorToFeedSubscriber.sql
INSERT 0 1
psql:U0006AddRequestorToFeedSubscriber.sql:5: ERROR: relation
"feedsubscriber" does not exist
psql:U0006AddRequestorToFeedSubscriber.sql:9: ERROR: relation
"feedsubscriber" does not exist
LINE 1: UPDATE FeedSubscriber
^
psql:U0006AddRequestorToFeedSubscriber.sql:14: ERROR: relation
"feedsubscriber" does not exist
LINE 1: UPDATE FeedSubscriber
^
psql:U0006AddRequestorToFeedSubscriber.sql:17: ERROR: relation
"feedsubscriber" does not exist

Thanks,
Paul

Jeffrey Stephens (Lockheed Martin)

unread,
Oct 18, 2010, 2:10:08 PM10/18/10
to Eureka Streams Development
Paul,
So it seems that the base set of scripts in /schema sets up the
database to the initial version (0.7) and to get up to 1.0 (which is
indeed what HEAD is at the moment) looks like it's going to be
necessary to run all of the 0.8 and 0.9 scripts before you can run the
1.0 scripts.

That seems to be what is going on in dev_apply_updates.sh where it
takes your current db version and updates it to the latest. There are
several scripts you'll need to run manually, but the good news is that
you won't have to run them again (unless you blow your db away).
You'll just need to run any new scripts that get checked in.

-Jeffrey

rocketman

unread,
Oct 18, 2010, 4:25:30 PM10/18/10
to Eureka Streams Development
Thanks, Jeffrey. Running all the scripts sequentially from 0.8 on
worked...created a quick-and-dirty batch file which I can share with
you, if interested.

Now on to the next hurdle....looks like something to do with
permissions. I don't have an admin account on this particular
machine, so I don't know if that's the cause or not. For the record,
here are the steps I've taken to get to this point:

1. Git source code from HEAD
2. mvn install -Dopenaccess-security -Dbuild.web.baseurl=http://
localhost:9090 -Dbuild.web.grbaseurl=http://localhost:9091 –DskipTests
3. Create directory eurekastreams\web\target\unpack\lib-java
4. Get xmlstarlet and drop xml.exe in on system path
http://sourceforge.net/projects/xmlstar/files/xmlstarlet/1.0.1/xmlstarlet-1.0.1-2-win32.zip/download

5. Have to install Postgres 8.4 as admin with defaults
6. Give postgres user (and my domain user) full rights to the postgres
folder and subfolders
7. Create database eurekastreams with owner:eurekastreams and
template:template1. For some reason it fails when I don't do this,
even though eurekastreams_1_databasecreate.sql is trying to do the
same thing.
8. Db.bat > db.log (this batch job runs the scripts in schema folder,
followed by the migrations scripts sequentially)
9. mvn jetty:run -DskipTests –Dlog.home=./logs –Denv.WEBPORT=9090 –
Denv.GRWEBPORT=9091

And I get the following error now:

[INFO] [exec:exec {execution: chmodder}]
[INFO] chmod: changing permissions of `C:\\workspaces\\workspace.35sr1\
\eurekast
reams\\web\\target/classes/db/scripts/20101015.log': Permission denied
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Result of cmd.exe /X /C "chmod -R 755 C:\workspaces\workspace.
35sr1\eurek
astreams\web\target/classes/db/scripts" execution is: '1'.

Thanks,
Paul

rocketman

unread,
Oct 18, 2010, 7:05:12 PM10/18/10
to Eureka Streams Development
I was able to get by the chmod error by commenting out the chmodder
plugin entry in web/pom.xml. I know have a running ES, but have
problems displaying the sample app gadgets. Here are my updated list
of steps, note I changed back to run on 8080/8081 so as not to have to
touch too many other port references downstream:

1. Git source code from HEAD
2. Change to the directory where you checked-out EurekaStreams
3. Mvn clean install -Dopenaccess-security -Dbuild.web.baseurl=http://
localhost:8080 -Dbuild.web.grbaseurl=http://localhost:8081 –DskipTests
4. Create directory eurekastreams\web\target\unpack\lib-java
5. Note: it fails on step 3 because directory in step 4 is missing, so
now run again (don’t clean)
mvn install -Dopenaccess-security -Dbuild.web.baseurl=http://localhost:
8080 -Dbuild.web.grbaseurl=http://localhost:8081 –DskipTests
6. Install memcached from http://www.splinedancer.com/memcached-win32
7. Run memcached.exe
8. Get xmlstarlet and drop xml.exe in on system path
http://sourceforge.net/projects/xmlstar/files/xmlstarlet/1.0.1/xmlstarlet-1.0.1-2-win32.zip/download

9. Have to install Postgres 8.4 as admin with defaults
10. Give postgres user (and my domain user) full rights to the
postgres folder and subfolders
11. Create database eurekastreams with owner:eurekastreams and
template:template1
12. Db.bat > db.log (this batch job runs the scripts in schema folder,
followed by the migrations scripts sequentially)
13. cd eurekastreams/web
14. Comment out chmodder plugin in web/pom.xml.
15. mvn jetty:run -DskipTests –Dlog.home=./logs –Denv.WEBPORT=8080 –
Denv.GRWEBPORT=8081

I then added the 4 sample plugin apps to my home page, and when they
try to load I get a 500 error in each one. The log shows it's failing
when trying to post something to port 8081:

2010-10-18 15:37:30,750 DEBUG org.apache.http.headers - >> POST /
social/rpc?st=F95CE1FC-893D-11DF-
B0FB-5F0BE0D72085%3AF95CE1FC-893D-11DF-B0FB-5F0BE0D72085%3A26%3Ashindig
%3Ahttp%253A%2F%2Flocalhost%253A8080%2Forg%2Feurekastreams%2Fgadgets
%2Fbookmarkgadget.xml%3A0%3Adefault HTTP/1.1
2010-10-18 15:37:30,750 DEBUG org.apache.http.headers - >> Content-
Type: application/json; charset=UTF-8
2010-10-18 15:37:30,750 DEBUG org.apache.http.headers - >> Pragma: no-
cache
2010-10-18 15:37:30,750 DEBUG org.apache.http.headers - >> X-shindig-
dos: on
2010-10-18 15:37:30,750 DEBUG org.apache.http.headers - >> Content-
Length: 175
2010-10-18 15:37:30,750 DEBUG org.apache.http.headers - >> Host:
localhost:8081
2010-10-18 15:37:30,750 DEBUG org.apache.http.headers - >> Connection:
Keep-Alive
2010-10-18 15:37:30,750 DEBUG org.apache.http.headers - >> User-Agent:
Apache Shindig
2010-10-18 15:37:30,750 DEBUG org.apache.http.headers - >> Accept-
Encoding: gzip, deflate
2010-10-18 15:37:30,750 DEBUG org.apache.http.wire - >>
"[{"id":"databindviewer","method":"people.get","params":{"userId":
["@viewer"]}},{"id":"bookmarksDataSet","method":"appdata.get","params":
{"appId":"@app","userId":["@viewer"]}}]"
2010-10-18 15:37:30,750 DEBUG
org.apache.http.impl.conn.DefaultClientConnection - Connection closed
2010-10-18 15:37:30,750 DEBUG
org.apache.http.impl.client.DefaultRequestDirector - Closing the
connection.
2010-10-18 15:37:30,750 DEBUG
org.apache.http.impl.conn.DefaultClientConnection - Connection closed
2010-10-18 15:37:30,750 INFO
org.apache.http.impl.client.DefaultRequestDirector - I/O exception
(org.apache.http.NoHttpResponseException) caught when processing
request: The target server failed to respond
2010-10-18 15:37:30,750 DEBUG
org.apache.http.impl.client.DefaultRequestDirector - The target server
failed to respond
org.apache.http.NoHttpResponseException: The target server failed to
respond
at
org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:
101)

There don't appear to be any errors on server startup, and netstat
shows something listening in 8081. I have no local firewall running.

What is supposed to be running on 8081?

rocketman

unread,
Oct 18, 2010, 8:30:28 PM10/18/10
to Eureka Streams Development
I see now where there is another instance of ES running at 8081 for
security purposes to render the gadgets.

I still don't know why the gadgets are not rendering. When I see the
above error in the log.txt, I see the following inside the gadget
iframe in the browser (both IE and FF), logged in as sysadmin (no
password):

HTTP ERROR 500
Problem accessing /gadgets/ifr. Reason:
org.apache.shindig.common.uri.Uri$UriException: No support for
opaque Uris localhost:8080

and corresponding HTTP 500 errors in jetty-access.log:

127.0.0.1 - - [19/Oct/2010:00:23:21 +0000] "GET /gadgets/ifr?
container=eureka&mid=20&nocache=1&country=ALL&lang=ALL&view=home&parent=http
%3A%2F%2Flocalhost%3A8080%2F%3A%2F%2Flocalhost
%3A8080&st=F95CE1FC-893D-11DF-B0FB-5F0BE0D72085%3AF95CE1FC-893D-11DF-
B0FB-5F0BE0D72085%3A24%3Ashindig%3Ahttp%253A//localhost%253A8080/org/
eurekastreams/gadgets/whitehouseblog-feed-reader.xml
%3A0%3Adefault&url=http%3A%2F%2Flocalhost%3A8080%2Forg%2Feurekastreams
%2Fgadgets%2Fwhitehouseblog-feed-reader.xml HTTP/1.1" 500 15091
127.0.0.1 - - [19/Oct/2010:00:23:21 +0000] "GET /gadgets/ifr?
container=eureka&mid=22&nocache=1&country=ALL&lang=ALL&view=home&parent=http
%3A%2F%2Flocalhost%3A8080%2F%3A%2F%2Flocalhost%3A8080&up_feed_url=http
%3A%2F%2Fpipes.yahoo.com%2Fpipes%2Fpipe.run%3F_id
%3D5dc8a87340794a992d374f7389268bc3%26_render
%3Drss&st=F95CE1FC-893D-11DF-B0FB-5F0BE0D72085%3AF95CE1FC-893D-11DF-
B0FB-5F0BE0D72085%3A21%3Ashindig%3Ahttp%253A//localhost%253A8080/org/
eurekastreams/gadgets/feed-reader.xml%3A0%3Adefault&url=http%3A%2F
%2Flocalhost%3A8080%2Forg%2Feurekastreams%2Fgadgets%2Ffeed-reader.xml
HTTP/1.1" 500 15091
127.0.0.1 - - [19/Oct/2010:00:23:21 +0000] "GET /gadgets/ifr?
container=eureka&mid=21&nocache=1&country=ALL&lang=ALL&view=home&parent=http
%3A%2F%2Flocalhost%3A8080%2F%3A%2F%2Flocalhost
%3A8080&st=F95CE1FC-893D-11DF-B0FB-5F0BE0D72085%3AF95CE1FC-893D-11DF-
B0FB-5F0BE0D72085%3A25%3Ashindig%3Ahttp%253A//localhost%253A8080/org/
eurekastreams/gadgets/washtech-feed-reader.xml%3A0%3Adefault&url=http
%3A%2F%2Flocalhost%3A8080%2Forg%2Feurekastreams%2Fgadgets%2Fwashtech-
feed-reader.xml HTTP/1.1" 500 15091
127.0.0.1 - - [19/Oct/2010:00:23:22 +0000] "POST /social/rpc?
st=F95CE1FC-893D-11DF-B0FB-5F0BE0D72085%3AF95CE1FC-893D-11DF-
B0FB-5F0BE0D72085%3A26%3Ashindig%3Ahttp%253A%2F%2Flocalhost
%253A8080%2Forg%2Feurekastreams%2Fgadgets%2Fbookmarkgadget.xml
%3A0%3Adefault HTTP/1.1" 200 528
127.0.0.1 - - [19/Oct/2010:00:23:21 +0000] "GET /gadgets/ifr?
container=eureka&mid=19&nocache=1&country=ALL&lang=ALL&view=home&parent=http
%3A%2F%2Flocalhost%3A8080%2F%3A%2F%2Flocalhost
%3A8080&st=F95CE1FC-893D-11DF-B0FB-5F0BE0D72085%3AF95CE1FC-893D-11DF-
B0FB-5F0BE0D72085%3A26%3Ashindig%3Ahttp%253A//localhost%253A8080/org/
eurekastreams/gadgets/bookmarkgadget.xml%3A0%3Adefault&url=http%3A%2F
%2Flocalhost%3A8080%2Forg%2Feurekastreams%2Fgadgets
%2Fbookmarkgadget.xml HTTP/1.1" 500 15091

Steve T

unread,
Oct 19, 2010, 11:44:13 AM10/19/10
to Eureka Streams Development
It seems like a config setting is off somehow, I am looking at it now.

Steve T

unread,
Oct 19, 2010, 12:22:26 PM10/19/10
to Eureka Streams Development
Can you post the output of the eurekastreams_container.js file after
you build. It should be located in the following path:

web/target/ROOT/org.eurekastreams.web.ApplicationDev/WEB-INF/classes/
conf/eurekastreams_container.js

I am wondering if something is not getting rewritten correctly during
build.

Jeffrey Stephens (Lockheed Martin)

unread,
Oct 18, 2010, 4:52:29 PM10/18/10
to Eureka Streams Development
I would suggest either mocking out a windows batch file named
chmod.bat (that does nothing) or comment out the part of the POM that
calls chmod.

-Jeffrey

On Oct 18, 3:25 pm, rocketman <pbar...@gmail.com> wrote:
> Thanks, Jeffrey.  Running all the scripts sequentially from 0.8 on
> worked...created a quick-and-dirty batch file which I can share with
> you, if interested.
>
> Now on to the next hurdle....looks like something to do with
> permissions.  I don't have an admin account on this particular
> machine, so I don't know if that's the cause or not.  For the record,
> here are the steps I've taken to get to this point:
>
> 1.      Git source code from HEAD
> 2.      mvn install -Dopenaccess-security -Dbuild.web.baseurl=http://
> localhost:9090 -Dbuild.web.grbaseurl=http://localhost:9091–DskipTests
> 3.      Create directory eurekastreams\web\target\unpack\lib-java
> 4.      Get xmlstarlet and drop xml.exe in on system pathhttp://sourceforge.net/projects/xmlstar/files/xmlstarlet/1.0.1/xmlsta...

Pete

unread,
Oct 23, 2010, 2:46:29 AM10/23/10
to Eureka Streams Development
I am interested in your batch file. I'm going through this process
too, this thread has been helpful.

How did you do with eurekastreams_33_coredatacopy.sql and
eurekastreams_36_orgpeopledatacopy.sql? They both fail at the \.
syntax for me. They load up some gadget data, so if yours failed
silently like mine did it would explain why your gadgets aren't
working.

pete




On Oct 18, 2:25 pm, rocketman <pbar...@gmail.com> wrote:
> Thanks, Jeffrey.  Running all the scripts sequentially from 0.8 on
> worked...created a quick-and-dirty batch file which I can share with
> you, if interested.
>
> Now on to the next hurdle....looks like something to do with
> permissions.  I don't have an admin account on this particular
> machine, so I don't know if that's the cause or not.  For the record,
> here are the steps I've taken to get to this point:
>
> 1.      Git source code from HEAD
> 2.      mvn install -Dopenaccess-security -Dbuild.web.baseurl=http://
> localhost:9090 -Dbuild.web.grbaseurl=http://localhost:9091–DskipTests
> 3.      Create directory eurekastreams\web\target\unpack\lib-java
> 4.      Get xmlstarlet and drop xml.exe in on system pathhttp://sourceforge.net/projects/xmlstar/files/xmlstarlet/1.0.1/xmlsta...

rocketman

unread,
Oct 23, 2010, 1:12:17 PM10/23/10
to Eureka Streams Development
Pete, it is now working for me after making the following slight
changes, in addition to my steps above:

1. Comment out the chmod section pom, as Jeffrey suggests.
2. comment out the sections of web/pom.xml that refer to lib-java
folder (This will remove the need to do steps 4&5 above where I re-run
maven after creating the directory)
3. open the file
web/src/main/resources/conf/eurekastreams_container.js
find the line "gadgets.uri.js.host": "${build.web.host}",
and change it to "gadgets.uri.js.host": "${build.web.baseurl}",
then rebuild and start up jetty

I believe that I had the same errors, but things still seemed to work
for me.

Here is the contents of my batch file:

REM @echo off
setlocal

set ES_HOME=C:\workspaces\workspace.35sr1\eurekastreams
cd %ES_HOME%\web\target\classes\db\schema
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i

cd %ES_HOME%\web\target\classes\db\migration\0\8
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i

cd %ES_HOME%\web\target\classes\db\migration\0\9
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i

cd %ES_HOME%\web\target\classes\db\migration\1\0
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i

endlocal

Hope that helps.

Paul

Pete

unread,
Oct 23, 2010, 3:15:03 PM10/23/10
to Eureka Streams Development
That is a great help. This came in just when I was trying to get psql
on my PATH so I could run all the migration scripts manually.

I ran into other problems as well, for example the checkstyle plugin
in the parent pom (I commented out the execution binding).

I added this plugin directly under the maven-exec plugin for the
unpack directories that we commented out of the web pom. This way we
can run clean install without having to manually make these dir's.

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>clean</phase>
<configuration>
<tasks>
<mkdir dir="${project.build.directory}/unpack/lib-bin" />
<mkdir dir="${project.build.directory}/unpack/lib-java" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>


Also, I used membase installed as memcached. It's a 1-click windows
install (choose to install it as memchached when prompted) and has a
beautiful web ui.

I'll keep posting my hurdles here as I cross them - thanks again for
your help, especially on a saturday.

-pete

redd...@gmail.com

unread,
Sep 20, 2014, 9:13:03 AM9/20/14
to eureka-st...@googlegroups.com
Thanks .. this script is very use full, but seems we need to update it according to the latest version.

REM @echo off 
setlocal 

set ES_HOME=C:\opensource\eureka\eurekastreams-master
cd %ES_HOME%\database\target\classes\db\schema 
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i 

cd %ES_HOME%\database\target\classes\db\migration\0\7
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i 

cd %ES_HOME%\database\target\classes\db\migration\0\8 
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i 

cd %ES_HOME%\database\target\classes\db\migration\0\9 
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i 

cd %ES_HOME%\database\target\classes\db\migration\1\0 
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i 

cd %ES_HOME%\database\target\classes\db\migration\1\1 
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i 

cd %ES_HOME%\database\target\classes\db\migration\1\5
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i

cd %ES_HOME%\database\target\classes\db\migration\1\6
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i 

cd %ES_HOME%\database\target\classes\db\migration\2\0
for /r . %%i in ("*.sql") do psql -U eurekastreams -w -f %%i 

endlocal 

right now this script does't prompt the for the password, so you can the password at the like by following this http://www.postgresql.org/docs/8.1/static/libpq-pgpass.html
Reply all
Reply to author
Forward
0 new messages