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
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
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
--
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
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
Reid
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
Reid
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
./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
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
Reid
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 wrote:Ah, that's the "infinity" revision. Here's how to create it (untested): Open a SQL shell with "psql -U cycling", then run:
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?
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)
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.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.
D
On Feb 27, 4:40 am, James Nordgaard <jimnordga...@gmail.com> wrote:
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
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@googlegroups.com>- Hide quoted text -
>
> - Show quoted text -
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