Open source installation status

11 views
Skip to first unread message

JimN-LostArt

unread,
Feb 12, 2010, 12:27:48 PM2/12/10
to Cyclopath Development
First off, congratulations, Reid (et al), on a successful conference
presentation!

As I mentioned, I managed to successfully build flashclient. I also
seemed to have successfully installed (and built where necc.) all the
prerequisite packages (I skipped Python as it's already installed).
There were still a few essential holes in the instructions that I
could not guess at. Essentially they were:

-What to fill in the file for: sites-available/cyclopath [apache].
-Detailed instructions for:
--creating, and
--initializing the database, including how to run the sql
scripts
(I came up with good guesses but apparently not the correct ones).

So my plan now wait for the completion of the installation
instructions, then create a fresh Virtualbox guest, probably for 9.04
(32bit), as it appears the core team will be migrating to that (if
it's going to be 9.10, please let me know), and the instructions are
being written for 9.04.

I won't be idle though; in the meantime I am getting familiar with the
flash code.

Jim

Reid Priedhorsky

unread,
Feb 14, 2010, 2:17:16 PM2/14/10
to cyclop...@googlegroups.com
JimN-LostArt wrote:
>
> First off, congratulations, Reid (et al), on a successful conference
> presentation!

Thanks!

> -What to fill in the file for: sites-available/cyclopath [apache].

I put a copy under Tech:Installing on the wiki.

> -Detailed instructions for:
> --creating, and
> --initializing the database, including how to run the sql
> scripts

The script db_load.sh actually deletes and recreates the database, so
look in there for commands. (Note that db_load.sh requires a complete
database dump, so you won't be able to actually use that script.)

You might also want to look in the PostGIS installation instructions and
perhaps try to create one of their example spatial databases, to test
that you installed PostGIS correctly.

Run sql scripts by simply piping them into, e.g. "psql -U cycling <
foo.sql". Note that you don't need to run any of the scripts in
scripts/sql - they are used for upgrading the schema, which you'll want
to do eventually as development proceeds, but not now.

Instructions for initializing should be on Tech:Source Code. Let us know
if that's not sufficient.

> (I came up with good guesses but apparently not the correct ones).
>
> So my plan now wait for the completion of the installation
> instructions, then create a fresh Virtualbox guest

We've put these up. They turned out to be fairly rough and quite
voluminous. Some parts you may be able to skip.

I might spend some time editing them this afternoon, so if things seem
in flux, that's why.

Reid

James Nordgaard

unread,
Feb 17, 2010, 2:41:58 AM2/17/10
to cyclop...@googlegroups.com
I have just completed the gargantuan task of assembling the contents of all the main tech install pages into one complete page, which also includes the notes I obtained through my installations. I am also part way through my 9.04 installation.

For the time being, the page is at my User page (http://cyclopath.org/wiki/User:Lostart), as I couldn't create one anywhere else (though I have since figured out I could create "sub" documents by first creating empty links).

Yes, the page is long, but I think this is the best way to go; there is one clear linear flow, with a complete table of contents at the beginning. I think navigating multiple documents (as currently) is a near nightmare scenario for those trying to install for the first time (it was my experience).

It is written for open source users, with appropriate notes for the core developers.

Here are some of the important things still missing:

-Installing the Apache2 package. I found instructions on the internet that worked, but it would be good to get the instructions that the core team used, for consistency.

-"Create /etc/init.d script to run routed" -details needed.

-Steps for setting up Pyserver may be incomplete. In particular pyserver/CONFIG

-How to actually run cyclopath (ie. running main.sfw in the browser; served by apache presumably).

-Jim

Reid Priedhorsky

unread,
Feb 17, 2010, 2:14:21 PM2/17/10
to cyclop...@googlegroups.com
On 02/17/2010 01:41 AM, James Nordgaard wrote:
>
> I have just completed the gargantuan task of assembling the contents of all
> the main tech install pages into one complete page, which also includes the
> notes I obtained through my installations. I am also part way through my
> 9.04 installation.

Thanks Jim! That is super awesome. Thanks for your persistence.

> For the time being, the page is at my User page (
> http://cyclopath.org/wiki/User:Lostart), as I couldn't create one anywhere
> else (though I have since figured out I could create "sub" documents by
> first creating empty links).

That's odd that you couldn't create pages. Can you try again using the
following procedure:

1. Edit a page and add a link to the title of the page you want to
create, e.g. "[[Tech:My_Page]]". Save.
2. Click on the (red) link. You should get an edit page.
3. Add some text and click Save.

I can tweak the permissions, but I'm hesitant to do so unless I'm sure
that's the problem.

Note that I always create pages using the above steps; I don't know
offhand how to do it otherwise.

> Yes, the page is long, but I think this is the best way to go; there is one
> clear linear flow, with a complete table of contents at the beginning. I
> think navigating multiple documents (as currently) is a near nightmare
> scenario for those trying to install for the first time (it was my
> experience).

If you feel that it's a proper replacement for what we put up
originally, please do go ahead and make that replacement.

> -Installing the Apache2 package. I found instructions on the internet that
> worked, but it would be good to get the instructions that the core team
> used, for consistency.

Ah well, it's mostly install the apache2 debs listed on Tech:Installing,
and then putting in the appropriate config file "cyclopath" (on the wiki).

> -"Create /etc/init.d script to run routed" -details needed.

This makes it so routed is run automatically on boot and is optional (we
only do this on the production box); otherwise, you can just start
routed manually when you need it: "sudo -u www-data ./routedctl start"
in the pyserver directory. Note that Cyclopath will run without routed -
you just won't be able to find routes.

The gist of it is to create a script /etc/init.d/cyclopath-routed
containing:

#!/bin/sh

# routedctl prints appropriate message

cd /path/to/your/pyserver
su -c "./routedctl $@" www-data

and add symlinks to the right /etc/rc.d directories. I can look up the
details if you want, but I'd skip it for now.

> -Steps for setting up Pyserver may be incomplete. In particular
> pyserver/CONFIG

Copy CONFIG.template to CONFIG and then fill in appropriate values. :)
There's comments in there - let us know which ones are confusing.

> -How to actually run cyclopath (ie. running main.sfw in the browser; served
> by apache presumably).

If your machine name is bob, just go to the URL http://bob/.
http://localhost/ may also work.

HTH! Let us know what else you need.

Reid

James Nordgaard

unread,
Feb 19, 2010, 1:44:11 AM2/19/10
to cyclop...@googlegroups.com
Following the instructions, I ran into a snag.

First, I successfully installed and started apache. When it started up it gave the message:

   apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

This doesn't not prevent the server from running, but it may pertain to the problem below.

I created and edited sites-available/cyclopath. Then I ran:

   sudo rsync -t -a -v jimn@JDev:/etc/apache2/sites-available/cyclopath /etc/apache2/sites-available/cyclopath

...and got this:

   ssh: Could not resolve hostname JDev: Name or service not known
   rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
   rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.5]

JDev is the name of my 9.04 virtual machine. Obviously, it's not a domain name. I'm inclined to think ji...@127.0.1.1 might work--should that be what the instructions say? Or is there a step that allows the machine name?

Please advise.

Thanks,

Jim

Landon Bouma

unread,
Feb 19, 2010, 7:25:21 AM2/19/10
to cyclop...@googlegroups.com
Jim

Are you running the rsync command from your host computer?

You might need to take advantage of VirtualBox Guest Additions instead.

Inside the guest OS, install Guest Additions. Then, under VirtualBox's Devices menu is Shared Folders..., which you can use to add host directories to the guest. Finally, from back in the guest OS, you'll need to mount the shared folder with something like

  sudo mount -t vboxsf MyVirtualFolderName /media/foo

I hope that helps!

Landon


--
You received this message because you are subscribed Cyclopath Development.
To post to this group: send email to cyclop...@googlegroups.com
To read this group on the Web: http://groups.google.com/group/cyclopath-dev
To unsubscribe from this group: send email to
cyclopath-de...@googlegroups.com

Reid Priedhorsky

unread,
Feb 19, 2010, 12:33:42 PM2/19/10
to cyclop...@googlegroups.com
On 02/19/2010 12:44 AM, James Nordgaard wrote:
> Following the instructions, I ran into a snag.
>
> First, I successfully installed and started apache. When it started up it
> gave the message:
>
> apache2: Could not reliably determine the server's fully qualified domain
> name, using 127.0.1.1 for ServerName

Hi Jim,

This IP address looks funny to me.

The loopback address (i.e., a machine talking to itself) is 127.0.0.1.

Private IPs (e.g., the private network containing your main box and the
virtualhost) follow several patterns, but a couple of common ones are
10.x.x.x and 192.168.x.x.

Since this IP doesn't match either of those patterns, I'm a little
suspicious. I've set up VMWare some years ago but never virtualbox.

> ssh: Could not resolve hostname JDev: Name or service not known

If the host were Linux, I'd suggest adding jdev to /etc/hosts. I suspect
OS X has something similar but I don't know what it is.

HTH,

Reid

James Nordgaard

unread,
Feb 19, 2010, 8:40:47 PM2/19/10
to cyclop...@googlegroups.com
Thanks for the replies. I think I got past this problem, but have another (see below). I just used localhost; I put 'ServerName localhost' in httpd.conf and that removed the complaints about no domain/server name. (I'm pretty sure 127.0.1.1 is just another address for localhost).

What's is different for me is I have no domain name to use (as opposed to this not being an issue at the U). I do not even have a static ip address from my ISP (Mpls. wifi), they use NAT. But I don't intend on doing anything beyond my machine for the foreseeable future (if ever), so localhost should work for me (I hope).

The problem I have now is with this same rsync command. It's giving me the following error:

   sudo rsync -t -a -v jimn@localhost:/etc/apache2/sites-available/cyclopath /etc/apache2/sites-available/cyclopath

   ssh: connect to host localhost port 22: Connection refused

   rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
   rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.5]

I've got an idea (from doing some checking on the internet) where the problem might be: Either sshd is not installed, or the port is not turned on, or a firewall is blocking it.

--Also keep in mind, this is all on my Ubuntu VirtualBox guest machine. I do not want to do anything on my OSX--which is the point of having the VB.

However, it appears the rsync in this case is just copying the file from and to the same machine. Why use rsync? Is is necessary? Is there a way around using it? If I'm using just the one machine, I shouldn't have to have SSH enabled; this would avoid this problem.

Thanks,

Jim




Reid

Reid Priedhorsky

unread,
Feb 21, 2010, 2:08:59 PM2/21/10
to cyclop...@googlegroups.com
James Nordgaard wrote:
>
> Thanks for the replies. I think I got past this problem, but have another
> (see below). I just used localhost; I put 'ServerName localhost' in
> httpd.conf and that removed the complaints about no domain/server name. (I'm
> pretty sure 127.0.1.1 is just another address for localhost).

It is, it turns out; I'd suggest using 127.0.0.1 (two zeroes) since
that's more familiar to people.

> What's is different for me is I have no domain name to use (as opposed to
> this not being an issue at the U). I do not even have a static ip address
> from my ISP (Mpls. wifi), they use NAT. But I don't intend on doing anything
> beyond my machine for the foreseeable future (if ever), so localhost should
> work for me (I hope).

Yes.

>
> The problem I have now is with this same rsync command. It's giving me the
> following error:
>
> sudo rsync -t -a -v jimn@localhost:/etc/apache2/sites-available/cyclopath
> /etc/apache2/sites-available/cyclopath
>
> ssh: connect to host localhost port 22: Connection refused
> rsync: connection unexpectedly closed (0 bytes received so far)
> [receiver]
> rsync error: error in rsync protocol data stream (code 12) at io.c(600)
> [receiver=3.0.5]
>
> I've got an idea (from doing some checking on the internet) where the
> problem might be: Either sshd is not installed, or the port is not turned
> on, or a firewall is blocking it.
>
> --Also keep in mind, this is all on my Ubuntu VirtualBox guest machine. I do
> not want to do anything on my OSX--which is the point of having the VB.

I think you're right: localhost on the virtualbox means the virtualbox
itself.

Though I'm not sure what you're trying to do here.

> However, it appears the rsync in this case is just copying the file from and
> to the same machine. Why use rsync? Is is necessary? Is there a way around
> using it? If I'm using just the one machine, I shouldn't have to have SSH
> enabled; this would avoid this problem.

I'm not familiar with the install guide, but you're correct that the
rsync command is a no-op. If you explain what you're trying to do, we
might be of more use. :)

Reid

James Nordgaard

unread,
Feb 21, 2010, 6:42:13 PM2/21/10
to cyclop...@googlegroups.com
Okay, I finally figured out rsync was for, and it's NOT needed for open source installations.

This problem I have now is "http://localhost" becomes forbidden when I put (link) cyclopath in sites-enabled and remove 000-default.

There are a couple of things that I got that I don't think could be causing this forbidden problem, but I could be wrong:

-To get /etc/init.d/apache2 to reload, I had to comment out several lines in sites-available/cyclopath that gave unrecognized command errors. The unrecognized commands were: Header, PythonDebug, PythonPath, and PythonHandler.

-Whenever I reload or restart apache, I get the following warning:
[Sun Feb 21 15:56:28 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
I found on the internet that this warning does not effect the ability of Apache to run.

BTW the instructions I'm using came from Tech: Random Install Notes; specifically the subpage "configure apache" (Tech:Open_Source/Setup/Apache2).

Any ideas?

Jim



Reid

S. Andrew Sheppard

unread,
Feb 22, 2010, 11:54:09 AM2/22/10
to cyclop...@googlegroups.com
James Nordgaard wrote:
> Okay, I finally figured out rsync was for, and it's NOT needed for open
> source installations.
>
> This problem I have now is "http://localhost" becomes forbidden when I
> put (link) cyclopath in sites-enabled and remove 000-default.

The forbidden error is quite common, and there are multiple possible
causes. Within the Apache config, make sure that DocumentRoot and
<Directory ...htdocs> refer to exactly the same path. If it still
doesn't work, check the file permissions. Make sure that that htdocs
directory is readable by the group apache runs as (usually www-data), or
just make it world-readable.

> There are a couple of things that I got that I don't think could be
> causing this forbidden problem, but I could be wrong:
>
> -To get /etc/init.d/apache2 to reload, I had to comment out several
> lines in sites-available/cyclopath that gave unrecognized command
> errors. The unrecognized commands were: Header, PythonDebug, PythonPath,
> and PythonHandler.

Once you've solved the permissions issues, you'll still need to get
these commands working for the /wms path to work. Enabling these
modules should do the trick:

$ sudo a2enmod mod_python
$ sudo a2enmod headers

> -Whenever I reload or restart apache, I get the following warning:
> [Sun Feb 21 15:56:28 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
> I found on the internet that this warning does not effect the ability of
> Apache to run.

Correct, this is not essential. But, if you want it to go away make
sure you have
<VirtualHost *:80>
and not just
<VirtualHost>

> BTW the instructions I'm using came from Tech: Random Install Notes;
> specifically the subpage "configure apache"
> (Tech:Open_Source/Setup/Apache2).

I'll add these notes to the wiki.

- Andrew

Reid Priedhorsky

unread,
Feb 22, 2010, 12:10:26 PM2/22/10
to cyclop...@googlegroups.com
On 02/22/2010 10:54 AM, S. Andrew Sheppard wrote:
> James Nordgaard wrote:
>> Okay, I finally figured out rsync was for, and it's NOT needed for open
>> source installations.
>>
>> This problem I have now is "http://localhost" becomes forbidden when I
>> put (link) cyclopath in sites-enabled and remove 000-default.
>
> The forbidden error is quite common, and there are multiple possible
> causes. Within the Apache config, make sure that DocumentRoot and
> <Directory ...htdocs> refer to exactly the same path. If it still
> doesn't work, check the file permissions. Make sure that that htdocs
> directory is readable by the group apache runs as (usually www-data), or
> just make it world-readable.

./fixperms.sh in the root of the working directory should help. Note
that all containing directories up to / will need to be readable and
exectuable by user www-data.

tail -f /var/log/apache2/access.log /var/log/apache2/error.log is often
helpful when diagnosing this sort of thing.

>> -To get /etc/init.d/apache2 to reload, I had to comment out several
>> lines in sites-available/cyclopath that gave unrecognized command
>> errors. The unrecognized commands were: Header, PythonDebug, PythonPath,
>> and PythonHandler.
>
> Once you've solved the permissions issues, you'll still need to get
> these commands working for the /wms path to work. Enabling these
> modules should do the trick:
>
> $ sudo a2enmod mod_python
> $ sudo a2enmod headers

This is the full list of modules we have enabled:

79 [reid@ugly ~]$ ls /etc/apache2/mods-enabled/
alias.conf authz_user.load dir.conf negotiation.conf
alias.load autoindex.conf dir.load negotiation.load
auth_basic.load autoindex.load env.load rewrite.load
authn_file.load cgid.conf headers.load setenvif.conf
authz_default.load cgid.load mime.conf setenvif.load
authz_groupfile.load deflate.conf mime.load status.conf
authz_host.load deflate.load mod_python.load status.load

Reid

James Nordgaard

unread,
Feb 22, 2010, 5:06:22 PM2/22/10
to cyclop...@googlegroups.com
SUCCESS! (Sort of)

I got the UI, and even the tiles display. There are numerous "connection" errors.

Both replies were quite useful--thanks.

It definitely was the permissions issue. However,  even though I have fixperms.sh, I couldn't find "fixperms", the thing it calls, anywhere. So I just fixed everything the error log complained about. Even though I got rid of the forbidden problem, I suspect there might be other files need fixing, I did fix all the .py files; it didn't help much.


$ sudo a2enmod mod_python
$ sudo a2enmod headers

The headers one worked. The mod_python one didn't. It said it doesn't exist. I looked around and (successfully) installed libapache2-mod-python. But enabling still said it doesn't exist. I checked my list of enabled modules against Reid's. The only difference was mine has "python.load" and Reid's has "mod_python.load". However, I then tried restoring the Python lines in "cyclopath"; it didn't get errors anymore.

I looked at the error logs after running CP. There were a couple of things that stood out:

Mon Feb 22 15:07:41 2010] [error] [client 127.0.0.1] Filename: '/home/jimn/cp/htdocs/wfs', referer: http://localhost/main.swf

There is no 'wfs' file in htdocs/. I only found a 'wfs.py' in pyserver/

[Mon Feb 22 15:07:41 2010] [error] [client 127.0.0.1]   File "/home/jimn/cp/pyserver/wfs_mod_python.py", line 17, in <module>\n    import lxml.etree as et, referer: http://localhost/main.swf

'lxml.etree' was also missing when I tried to run 'nodes_build.py'

I put a sample of my log files on my User page: http://cyclopath.org/wiki/User:Lostart

Also, when I try to create an object, I get the error (in a message box):
TypeError: Error #1009: Cannot access a property or method of a null object reference.

Would running schema.sql before running data.sql (without errors) cause any problems? The first time I ran data.sql I got errors, so I had to run it again (without errors), but I had already run schema.sql.

Thanks for the continuing help,
Jim



Reid Priedhorsky

unread,
Feb 24, 2010, 11:42:05 PM2/24/10
to cyclop...@googlegroups.com
James Nordgaard wrote:
> SUCCESS! (Sort of)
>
> I got the UI, and even the tiles display. There are numerous "connection"
> errors.
>
> Both replies were quite useful--thanks.
>
> It definitely was the permissions issue. However, even though I have
> fixperms.sh, I couldn't find "fixperms", the thing it calls, anywhere. So I
> just fixed everything the error log complained about. Even though I got rid
> of the forbidden problem, I suspect there might be other files need fixing,
> I did fix all the .py files; it didn't help much.

Hi Jim,

I put the fixperms script online - it's at
http://magic.cyclopath.org/source/fixperms . This should make
fixperms.sh at the working directory root work right.

> $ sudo a2enmod mod_python
> $ sudo a2enmod headers
>
> The headers one worked. The mod_python one didn't. It said it doesn't exist.
> I looked around and (successfully) installed libapache2-mod-python. But
> enabling still said it doesn't exist. I checked my list of enabled modules
> against Reid's. The only difference was mine has "python.load" and Reid's
> has "mod_python.load". However, I then tried restoring the Python lines in
> "cyclopath"; it didn't get errors anymore.
>
> I looked at the error logs after running CP. There were a couple of things
> that stood out:
>
> Mon Feb 22 15:07:41 2010] [error] [client 127.0.0.1] Filename:
> '/home/jimn/cp/htdocs/wfs', referer: http://localhost/main.swf
>
> There is no 'wfs' file in htdocs/. I only found a 'wfs.py' in pyserver/

Hmm. The Apache configuration should be translating /wfs to mod_python
calls into the module wfs_mod_python.py (that's the entry point to the
server).

I'd suggest pulling one of the WFS URLs from the trace file emitted by
the flashclient and paste that into your browser. Then you can get the
server working independent of the client.

> [Mon Feb 22 15:07:41 2010] [error] [client 127.0.0.1] File
> "/home/jimn/cp/pyserver/wfs_mod_python.py", line 17, in <module>\n import
> lxml.etree as et, referer: http://localhost/main.swf
>
> 'lxml.etree' was also missing when I tried to run 'nodes_build.py'

I wonder if a deb package is missing? Is it not in python-lxml?

To test this independently, run python and say "import lxml.etree as et"
- you should get no output.

> I put a sample of my log files on my User page:
> http://cyclopath.org/wiki/User:Lostart
>
> Also, when I try to create an object, I get the error (in a message box):
> TypeError: Error #1009: Cannot access a property or method of a null object
> reference.

This is a common symptom of things just being generally broken. :)

> Would running schema.sql before running data.sql (without errors) cause any
> problems? The first time I ran data.sql I got errors, so I had to run it
> again (without errors), but I had already run schema.sql.

Well, you're not yet at the stage where this matters, I think. You
should get no errors when you run either SQL file. You want an empty
database, then run schema.sql, then data.sql.

Sorry for the slow response btw.

HTH,

Reid

James Nordgaard

unread,
Feb 25, 2010, 2:54:19 AM2/25/10
to cyclop...@googlegroups.com
Hi Reid,

Thanks for the reply.

Actually, I've made tremendous progress. I can actually run without errors! I can even edit; create points, segments, etc without errors. I only get an error when trying to save. This is the error:

[Thu Feb 25 00:25:29 2010] [error] [client 127.0.0.1] DatabaseError: {<cursor object at 0xb9079c50>: 'ERROR:  insert or update on table "point" violates foreign key constraint "point_valid_before_rid_fkey"\\nDETAIL:  Key (valid_before_rid)=(2000000000) is not present in table "revision".\\n'}, referer: http://localhost/main.swf

"byway" or "region" produces the same error. Apparently some initialization problem with the database. Any ideas?

The database is blank. Db creation, schema.sql and data.sql all ran without errors. I couldn't get the script nodes_build.py to work to import any DOT maps; the instructions were too incomplete for me to figure it out.

But other than this database glitch, all the components are running smoothly together. I've been updating the install page (http://cyclopath.org/wiki/Tech:Source_Code) so the instructions are pretty complete and accurate now.

It's been a long day.:)

jim



Reid

Reid Priedhorsky

unread,
Feb 26, 2010, 6:10:16 PM2/26/10
to cyclop...@googlegroups.com
James Nordgaard wrote:
> Hi Reid,
>
> Thanks for the reply.
>
> Actually, I've made tremendous progress. I can actually run without errors!
> I can even edit; create points, segments, etc without errors. I only get an
> error when trying to save. This is the error:
>
> [Thu Feb 25 00:25:29 2010] [error] [client 127.0.0.1] DatabaseError:
> {<cursor object at 0xb9079c50>: 'ERROR: insert or update on table "point"
> violates foreign key constraint "point_valid_before_rid_fkey"\\nDETAIL: Key
> (valid_before_rid)=(2000000000) is not present in table "revision".\\n'},
> referer: http://localhost/main.swf
>
> "byway" or "region" produces the same error. Apparently some initialization
> problem with the database. Any ideas?

Ah, that's the "infinity" revision. Here's how to create it (untested):
Open a SQL shell with "psql -U cycling", then run:

insert into revision (id, timestamp, host) values (rid_inf(), now(),
'_DUMMY');

Then, "select * from revision where id = rid_inf();" should give
something like:

> cycling=> select * from revision where id = rid_inf();
> id | timestamp | host | username | comment | bbox | geosummary | geometry | skip_geometry
> ------------+----------------------------+--------+----------+---------+------+------------+----------+---------------
> 2000000000 | 2008-05-28 17:19:57.370999 | _DUMMY | | | | | | f
> (1 row)

> The database is blank. Db creation, schema.sql and data.sql all ran without
> errors. I couldn't get the script nodes_build.py to work to import any DOT
> maps; the instructions were too incomplete for me to figure it out.

There's some scripts called import_*.py in scripts/ - these are what you
use. I believe there's one for base map polygons and one for roads.
You'll have to look inside them to figure out how to run them, and they
might need some hacking to work right since we haven't used them in a
long time. I'd start with the base map polygons. These will create the
map features, but the roads won't be connected. nodes_build.py does that
step.

> But other than this database glitch, all the components are running smoothly
> together. I've been updating the install page (
> http://cyclopath.org/wiki/Tech:Source_Code) so the instructions are pretty
> complete and accurate now.

Thanks!

HTH,

Reid

James Nordgaard

unread,
Feb 27, 2010, 5:40:41 AM2/27/10
to cyclop...@googlegroups.com
On Fri, Feb 26, 2010 at 5:10 PM, Reid Priedhorsky <re...@umn.edu> wrote:
James Nordgaard wrote:
Hi Reid,

Thanks for the reply.

Actually, I've made tremendous progress. I can actually run without errors!
I can even edit; create points, segments, etc without errors. I only get an
error when trying to save. This is the error:

[Thu Feb 25 00:25:29 2010] [error] [client 127.0.0.1] DatabaseError:
{<cursor object at 0xb9079c50>: 'ERROR:  insert or update on table "point"
violates foreign key constraint "point_valid_before_rid_fkey"\\nDETAIL:  Key
(valid_before_rid)=(2000000000) is not present in table "revision".\\n'},
referer: http://localhost/main.swf

"byway" or "region" produces the same error. Apparently some initialization
problem with the database. Any ideas?

Ah, that's the "infinity" revision. Here's how to create it (untested): Open a SQL shell with "psql -U cycling", then run:

insert into revision (id, timestamp, host) values (rid_inf(), now(), '_DUMMY');

Then, "select * from revision where id = rid_inf();" should give something like:

cycling=> select * from revision where id = rid_inf();
    id     |         timestamp          |  host  | username | comment | bbox | geosummary | geometry | skip_geometry
------------+----------------------------+--------+----------+---------+------+------------+----------+---------------
 2000000000 | 2008-05-28 17:19:57.370999 | _DUMMY |          |         |      |            |          | f
(1 row)




This worked for creating points and regions, but not byways. Byways generate an error in the byway_rating or user_ tables. Specifically:

[Fri Feb 26 22:15:27 2010] [error] [client 127.0.0.1] DatabaseError: {<cursor object at 0xb9a11520>: 'ERROR:  insert or update on table "byway_rating" violates foreign key constraint "username_fk"\\nDETAIL:  Key (username)=(_r_generic) is not present in table "user_".\\n'}, referer: http://localhost/main.swf

I tried to create a user for the user_ table but got an error I couldn't resolve no matter what I tried:
cycling=> insert into user_ (username, login_permitted, last_modified, created, id, alias) values ('_r_generic', 'yes', now(), now(), rid_inf(), 'alias');
ERROR:  null value in column "alias" violates not-null constraint

Which doesn't make sense since alias clearly is not being set to null.


 
The database is blank. Db creation, schema.sql and data.sql all ran without
errors. I couldn't get the script nodes_build.py to work to import any DOT
maps; the instructions were too incomplete for me to figure it out.

There's some scripts called import_*.py in scripts/ - these are what you use. I believe there's one for base map polygons and one for roads. You'll have to look inside them to figure out how to run them, and they might need some hacking to work right since we haven't used them in a long time. I'd start with the base map polygons. These will create the map features, but the roads won't be connected. nodes_build.py does that step.


I got no luck with import_bmpolygons.py. The numeric parameters don't make sense to me, and running it I just got nasty errors (ie segmentation fault & illegal instruction).  I don't think I'll pursue this further (on my own) as I get this feeling I could sink a lot of time on it without succeeding--as I don't understand the code.



Thanks,
Jim

David Petersen

unread,
Feb 27, 2010, 9:59:14 PM2/27/10
to Cyclopath Development
Hi, I am going to try building a development environment in the next
day or so....I will log my notes and post them here (i.e. if they
contain information other that has so far been posted). I am wondering
if virtualbox allows for the creation of "appliances" like those that
VMWare allows...it would be nice to have a standard development
platform ready for download.

D

On Feb 27, 4:40 am, James Nordgaard <jimnordga...@gmail.com> wrote:

James Nordgaard

unread,
Mar 1, 2010, 1:13:02 PM3/1/10
to cyclop...@googlegroups.com
Hi David,

I looked at the VirtualBox user manual, and the answer on appliances appear to be yes. This is from section 1.11 (p.29):

"...VirtualBox can import and export virtual machines in the industry-standard Open Virtualization Format (OVF)"

This will be useful in creating a turnkey installation of CP open source.

I look forward to hearing about your experience in installing CP.

Jim

James Nordgaard

unread,
Mar 2, 2010, 4:58:48 AM3/2/10
to cyclop...@googlegroups.com
I still need help on this: When I create a byway and try to save I get this error:


ERROR:  insert or update on table "byway_rating" violates foreign key constraint "username_fk"\\nDETAIL:  Key (username)=(_r_generic) is not present in table "user_".\\n'

To insert into the "byway_rating" table requires the user "_r_generic" to exist. But the table 'user_' is empty. Whenever I try to insert that user (in the interpretor) I get a NULL 'alias' value error, even though I supply an actual value for 'alias'.

I have since found out that there are a whole bunch of triggers that happen before each 'user_' insert, including a function called 'user_alias_set()' which gets 'alias' from a table called 'alias_source'. I tried populating THAT table, but to no avail.

There has GOT to be a definitive procedure for setting up this initial generic user--and allow byway creation (without decoding a hornet's nest of trigger functions and dependent tables).

Someone please help! I am so close to actually getting this all to working.

Thanks,
Jim 

Reid Priedhorsky

unread,
Mar 2, 2010, 10:53:19 AM3/2/10
to cyclop...@googlegroups.com
On 03/02/10 03:58, James Nordgaard wrote:
> I still need help on this: When I create a byway and try to save I get this
> error:
>
> ERROR: insert or update on table "byway_rating" violates foreign key
> constraint "username_fk"\\nDETAIL: Key (username)=(_r_generic) is not
> present in table "user_".\\n'
>
> To insert into the "byway_rating" table requires the user "_r_generic" to
> exist. But the table 'user_' is empty. Whenever I try to insert that user
> (in the interpretor) I get a NULL 'alias' value error, even though I supply
> an actual value for 'alias'.
>
> I have since found out that there are a whole bunch of triggers that happen
> before each 'user_' insert, including a function called 'user_alias_set()'
> which gets 'alias' from a table called 'alias_source'. I tried populating
> THAT table, but to no avail.
>
> There has GOT to be a definitive procedure for setting up this initial
> generic user--and allow byway creation (without decoding a hornet's nest of
> trigger functions and dependent tables).
>
> Someone please help! I am so close to actually getting this all to working.

alias_source is populated by the script aliases.py. I recommend that you
change the random.seed() value so you don't get the same list as us.

For examples of how users are created, look in mediawiki/CycloAuth.php.
You won't need to install MediaWiki to create users - you can do so
manually, but this code will be a useful example.

Thanks for your patience on this, James.

Reid

James Nordgaard

unread,
Mar 2, 2010, 2:29:39 PM3/2/10
to cyclop...@googlegroups.com

It's working.

I had to do a couple of hacks to be able to add that default user. But now it looks like I can save everything without errors. I haven't tried starting routed or importing maps for the time being.

Once again, thanks Reid, and everyone who helped.

This thread is already too long, so any future posts should start a new thread--unless there is some closing comments.

Jim

Landon Bouma

unread,
Mar 2, 2010, 8:27:20 PM3/2/10
to cyclop...@googlegroups.com
I'll close by saying, That's awesome! And thanks everyone for documenting the open source installation -- it's great to know we now have instructions the "outside world" can use to install Cyclopath.

I'm excited to see what you guys do with the code! If you really want to start digging in, we could always pass along a few easy bugs for you to solve... ;)

Landon

David Petersen

unread,
Mar 4, 2010, 1:18:47 PM3/4/10
to Cyclopath Development
I have been working on the install...very intense...It appears that
progresql8.3 has been replaced by progressql8.4...I took screen
captures of some the issues that have so far come up. One python
module I could not with ubuntu 9.04 ...more later. I also have some
questions about setting up the bash script but I need to review my
notes again...I did take a screen capture of what confused
me...hopefully I can post bmps or jpgs here.

Regards

On Mar 2, 7:27 pm, Landon Bouma <land...@cs.umn.edu> wrote:
> I'll close by saying, That's awesome! And thanks everyone for documenting
> the open source installation -- it's great to know we now have instructions
> the "outside world" can use to install Cyclopath.
>
> I'm excited to see what you guys do with the code! If you really want to
> start digging in, we could always pass along a few easy bugs for you to
> solve... ;)
>
> Landon
>

> On Tue, Mar 2, 2010 at 1:29 PM, James Nordgaard <jimnordga...@gmail.com>wrote:
>
>
>
>
>
> > It's working.
>
> > I had to do a couple of hacks to be able to add that default user. But now
> > it looks like I can save everything without errors. I haven't tried starting
> > routed or importing maps for the time being.
>
> > Once again, thanks Reid, and everyone who helped.
>
> > This thread is already too long, so any future posts should start a new
> > thread--unless there is some closing comments.
>
> > Jim
>
> >  --
> > You received this message because you are subscribed Cyclopath Development.
> > To post to this group: send email to cyclop...@googlegroups.com
> > To read this group on the Web:
> >http://groups.google.com/group/cyclopath-dev
> > To unsubscribe from this group: send email to

> > cyclopath-de...@googlegroups.com<cyclopath-dev%2Bunsubscribe@goog­legroups.com>- Hide quoted text -
>
> - Show quoted text -

Reid Priedhorsky

unread,
Mar 5, 2010, 5:50:53 PM3/5/10
to cyclop...@googlegroups.com
On 03/04/2010 12:18 PM, David Petersen wrote:
>
> I have been working on the install...very intense...It appears that
> progresql8.3 has been replaced by progressql8.4...

Stick with 8.3. It's still supported and is already one major revision
ahead of the production system, which is on 8.2.

> I took screen
> captures of some the issues that have so far come up. One python
> module I could not with ubuntu 9.04 ...more later. I also have some
> questions about setting up the bash script but I need to review my
> notes again...I did take a screen capture of what confused
> me...hopefully I can post bmps or jpgs here.

Sure, let us know. I don't know whether you can post attachments here,
but give it a try. Copy and paste of text is easier for the reader, of
course, and will be searchable to help folks in the future.

HTH,

Reid

Reply all
Reply to author
Forward
0 new messages