Order of execution of tasks (per the Installation guide)

8 views
Skip to first unread message

Oltmans

unread,
Jan 18, 2012, 7:33:10 AM1/18/12
to districtbuilder-dev
Greetings, I'm following the installation guide here
https://github.com/PublicMapping/DistrictBuilder/blob/master/docs/INSTALL#L370

I'm not sure whether to run 9.b first or configure Geoserver first. So
I tried executing 9.b first, it ran overnight
and I see this in the log file (I don't find these .sld files under /
projects/DistrictBuilder/sld)

could not be loaded. Please confirm that the
style files are named according to the "geolevel_subject.sld"
convention, and try again.

No style file found for pmp:demo_block_govtot

ERROR:

Could not configure geoserver:

Could not assign style to layer 'pmp:demo_block_govtot'.

Please check the configuration settings, and try again.

HTTP Status: 404
Geoserver configuration complete.
Created template plan "Congressional"
Created template plan "State House"
Created template plan "State Senate"
Created Plan named "Blank" for LegislativeBody "Congressional"
Created Plan named "Blank" for LegislativeBody "State House"
Created Plan named "Blank" for LegislativeBody "State Senate"
Created Plan named "Blank" for LegislativeBody "Community Map"

56175,1 Bot


Any ideas as to why I'm seeing above 'could not configure geoserver'
messages?I thought it could be because of the fact that I didn't
properly configure geoserver so I thought I should configure geoserver
again and then run above command again. So I ran the following command
from the installation doc

sudo python ./setup.py -V -G ../../docs/config.xsd ../../docs/
config.xml

and it threw the following error

WARNING: Sync your config file to your app configuration or
use the -f switch with setup to force changes
Traceback (most recent call last):
File "./setup.py", line 455, in <module>
main()
File "./setup.py", line 134, in main
management.call_command('setup', config=args[1],
verbosity=verbose, geolevels=geolevels, views=views,
geoserver=geoserver, templates=templates, nesting=nesting,
static=static, bard=bard, bard_templates=bard_templates)
File "/usr/lib/pymodules/python2.7/django/core/management/
__init__.py", line 166, in call_command
return klass.execute(*args, **defaults)
File "/usr/lib/pymodules/python2.7/django/core/management/base.py",
line 220, in execute
output = self.handle(*args, **options)
File "/projects/DistrictBuilder/django/publicmapping/redistricting/
management/commands/setup.py", line 185, in handle
srid = qset[0].geom.srid
File "/usr/lib/pymodules/python2.7/django/db/models/query.py", line
190, in __getitem__
return list(qs)[0]
IndexError: list index out of range
ubuntu@ip-10-212-139-175:/projects/DistrictBuilder/django/publicmapping
$


Any ideas why the above error could happen? Also, I'm sorry but I'm
little confused as to which should be run first? I'm assuming that
following

- Geoserver
- Celery
- Apache
- Bard

should be configured before running 9.b i.e. > sudo ./setup.py ../../
docs/config.xsd ../../docs/config.xml
?

Please pardon my ignorance. All help is really appreciated.

Thanks!

David Zwarg

unread,
Jan 18, 2012, 12:30:00 PM1/18/12
to districtb...@googlegroups.com
Hello,

There are some errors that get generated in the output, but they are truly warnings. The "No style file found for pmp:demo_block_govtot" messages may safely be ignored. It looks like the process completed okay, as the plan templates were created after the geoserver config completed.

You have assumed the correct order of setup -- geoserver and celery should be in place before running the python setup script.

The stack trace that you sent is indeed worrisome, and I will investigate that further. It should be possible to run that "-V -G" immediately after setup, and nothing should break. If you have the opportunity, can you run it again with verbose logging turned on (-v2), and send that output along?

Since it appears as though setup completed most of the process properly, can you test the app to see if it's up and running?

Thanks,
David
--
David Zwarg, Software Developer

Azavea  |  One Cambridge Center, 6th Floor, Cambridge, MA 02142-1601
dzw...@azavea.com  | T 617.649.2227  | F 215.925.2663
Web azavea.com  |  Blog azavea.com/blogs

Oltmans

unread,
Jan 18, 2012, 4:46:57 PM1/18/12
to districtbuilder-dev


On Jan 18, 10:30 pm, David Zwarg <dzw...@azavea.com> wrote:

> setup, and nothing should break. If you have the opportunity, can you run
> it again with verbose logging turned on (-v2), and send that output along?

So I see that stack trace and when I turn on verbose logging and
output on a file I see this in a file

Configuration is parsed and validated.
Document validated.
Validated config.
Generated django settings.


and then I see this stack trace

File "./setup.py", line 455, in <module>
main()
File "./setup.py", line 134, in main
management.call_command('setup', config=args[1],
verbosity=verbose, geolevels=geolevels, views=views,
geoserver=geoserver, templates=templates, nesting=nesting,
static=static, bard=bard, bard_templates=bard_templates)
File "/usr/lib/pymodules/python2.7/django/core/management/
__init__.py", line 166, in call_command
return klass.execute(*args, **defaults)
File "/usr/lib/pymodules/python2.7/django/core/management/base.py",
line 220, in execute
output = self.handle(*args, **options)
File "/projects/DistrictBuilder/django/publicmapping/redistricting/
management/commands/setup.py", line 185, in handle
srid = qset[0].geom.srid
File "/usr/lib/pymodules/python2.7/django/db/models/query.py", line
190, in __getitem__
return list(qs)[0]
IndexError: list index out of range

Any ideas on how I can fix this are really appreciated. Thanks in
advance for looking into it.
>
> Since it appears as though setup completed most of the process properly,
> can you test the app to see if it's up and running?
>
> Thanks,
> David
>
>
>
> On Wed, Jan 18, 2012 at 7:33 AM, Oltmans <rolf.oltm...@gmail.com> wrote:
> > Greetings, I'm following the installation guide here
>
> >https://github.com/PublicMapping/DistrictBuilder/blob/master/docs/INS...
> Web azavea.com <http://www.azavea.com/>  |  Blog
> azavea.com/blogs<http://www.azavea.com/blogs>

David Zwarg

unread,
Jan 18, 2012, 5:02:20 PM1/18/12
to districtb...@googlegroups.com
Hello,

It appears as though no geographies were imported, and you are attempting to configure Geoserver prior to any geographies being stored in the database. Make sure that setup completes the geography importing steps. Those commands are -g0, -g1, -g2 (if you have 3 levels of geography, such as Counties, Tracts, Blocks).

After running the geographic import, it's required to run a re-nesting aggregation step in the form of -n1 -n2 (to renest Counties and Tracts, so that their boundaries and all demographic measures are aggregated properly).

Let me know if you have problems with the geographic or renesting setup steps,
Thanks,
David
Web azavea.com  |  Blog azavea.com/blogs

Oltmans

unread,
Jan 18, 2012, 5:02:57 PM1/18/12
to districtbuilder-dev
Hi, so I looked at the installation docs again and I think I should be
running 9.b before running > sudo python ./setup.py -V -G ../../docs/
config.xsd ../../docs/config.xml because as per the docs setup should
be run in order. To be more precise, per my naive understanding. if
I've already run step 9.b(> sudo ./setup.py ../../docs/
config.xsd ../../docs/config.xml) then I don't even need to run sudo
python ./setup.py -V -G ../../docs/config.xsd ../../docs/config.xml.
So I will again run 9.b and see what happens when it's done running.

Please feel free to correct me if I'm wrong.

David Zwarg

unread,
Jan 18, 2012, 5:05:29 PM1/18/12
to districtb...@googlegroups.com
You are correct. The 9b setup command will include the -V and -G portions.

David
Web azavea.com  |  Blog azavea.com/blogs

Oltmans

unread,
Jan 19, 2012, 8:31:20 AM1/19/12
to districtbuilder-dev
Greetings, I hope you're doing well. Just one quick question for now.
I've followed almost all instructions under "== Geoserver
configuration ==" to configure Geoserver. However, I'm not sure how to
make sure if Geoserver is running properly. I followed all
instructions but when I do

sudo wget http://localhost:8080/geoserver

I get a 404. How do I make sure geoserver is running properly? Do I've
to things outlined here: http://funnymonkey.com/install-geoserver-ubuntu?

One more thing I'm assuming I've to have Geoserver up and running
before following "9.b" (i.e. 9.b listed
https://github.com/PublicMapping/DistrictBuilder/blob/master/docs/INSTALL)

Thanks and please pardon my ignorance. You've been very patient and
helpful. Really appreciate all help.

Thanks!

David Zwarg

unread,
Jan 19, 2012, 9:25:49 AM1/19/12
to districtb...@googlegroups.com
Hello,

That link is great for setting up geoserver! Good find. If you've followed all those steps, it should be up and running on port 8080.

That wget command should return a 302, then get http://localhost:8080/geoserver/ (note the trailing slash), which should return a 200 OK.

If you're having problems with geoserver, you may be able to get some help on the geoserver-users mailing list, or the #geoserver channel on IRC.

You are correct that geoserver needs to be set up before performing step 9b.

Thanks,
David
Web azavea.com  |  Blog azavea.com/blogs

Oltmans

unread,
Jan 26, 2012, 5:21:45 PM1/26/12
to districtbuilder-dev
Guys, I hope you're doing well. Few quick questions about Geoserver

- I've installed geoserver (per the guidelines given at
http://funnymonkey.com/install-geoserver-ubuntu? and also added rest
extension)and configured it. So I guess following shows geoserver is
up and running

ubuntu@ip-10-212-139-175:~$ sudo lsof | grep TCP | grep geoserver
java 18409 geoserver 211u IPv6 1047077 0t0
TCP *:46671 (LISTEN)
java 18409 geoserver 227u IPv6 1047866 0t0
TCP *:http-alt (LISTEN)
ubuntu@ip-10-212-139-175:~$

But when I go to http://ec2-184-72-82-111.compute-1.amazonaws.com/geoserver
I see a 'conection timeout' error with a redirect to
http://ec2-184-72-82-111.compute-1.amazonaws.com:8080/geoserver/web/.

Now when I hit http://ec2-184-72-82-111.compute-1.amazonaws.com/geoserver/web/
this URL, it opens just fine. Something is wrong at my end and I'm not
sure what. Can you kindly suggest what areas should I look into?

Also when I ran sudo ./setup.py ../../docs/config.xsd ../../docs/
config.xml I see lot of 401s in the log file. Does this mean when
setup.py tries to connect to local instance of geoserver it gets
'unauthorize access' errors? What can I do to fix this? Where should I
be looking at to correct this?

-------------------------------------

ERROR:

Could not configure geoserver:

Could not assign style to layer 'pmp:demo_block_presrep'.

Please check the configuration settings, and try again.

HTTP Status: 401

WARNING:

The style file:

/projects/DistrictBuilder/sld/pmp:block_poptot.sld

could not be loaded. Please confirm that the
style files are named according to the "geolevel_subject.sld"
convention, and try again.

No style file found for pmp:demo_block_poptot


I really appreciate your patience and time. All help is really
appreciated. I'm actually out of ideas, posing this question in
geosever online channel didn't reveal anything.

Thanks!


On Jan 19, 7:25 pm, David Zwarg <dzw...@azavea.com> wrote:
> Hello,
>
> That link is great for setting up geoserver! Good find. If you've followed
> all those steps, it should be up and running on port 8080.
>
> That wget command should return a 302, then gethttp://localhost:8080/geoserver/(note the trailing slash), which should
> return a 200 OK.
>
> If you're having problems with geoserver, you may be able to get some help
> on the geoserver-users<https://lists.sourceforge.net/lists/listinfo/geoserver-users>mailing
> list, or the
> #geoserver <irc://irc.freenode.net:6667/%23geoserver> channel on IRC.
>
> You are correct that geoserver needs to be set up before performing step 9b.
>
> Thanks,
> David
>
>
>
> On Thu, Jan 19, 2012 at 8:31 AM, Oltmans <rolf.oltm...@gmail.com> wrote:
> > Greetings, I hope you're doing well. Just one quick question for now.
> > I've followed almost all instructions under "== Geoserver
> > configuration ==" to configure Geoserver. However, I'm not sure how to
> > make sure if Geoserver is running properly. I followed all
> > instructions but when I do
>
> > sudo wgethttp://localhost:8080/geoserver
>
> > I get a 404. How do I make sure geoserver is running properly? Do I've
> > to things outlined here:http://funnymonkey.com/install-geoserver-ubuntu?
>
> > One more thing I'm assuming I've to have Geoserver up and running
> > before following "9.b" (i.e. 9.b listed
> >https://github.com/PublicMapping/DistrictBuilder/blob/master/docs/INS...)

David Zwarg

unread,
Jan 27, 2012, 9:21:43 AM1/27/12
to districtb...@googlegroups.com
Hello,

Please check your security group settings in the AWS console. It appears as though port 8080 is being blocked.
  1. Log in to the AWS Management Console
  2. Select the "Amazon EC2" tab
  3. On the left Navigation pane, select "Instances" under "INSTANCES"
  4. Select the instance that has the public DNS of "ec2-184-72-82-111.compute-1.amazonaws.com"
  5. On the lower pane, click on the "Description" tab
  6. Look for the setting "Security Groups", and record the current value
  7. On the left Navigation pane, select "Security Groups" under "Network & Security"
  8. Select the security group from step #6
  9. On the lower pane, click on the "Inbound" tab
  10. Make sure that port 80, 443, and 8080 are listed under the "TCP Port (Service)" column.
Let us know if that helps,
David
Web azavea.com  |  Blog azavea.com/blogs

Oltmans

unread,
Jan 27, 2012, 2:54:18 PM1/27/12
to districtbuilder-dev
Greetings David, many thanks for detailed and quick reply. So ran the
following query to make sure port 8080 is open. I did the following
and as I see port 8080 is open. Probably, I'm doing something wrong so
isnt' port 8080 open already? Please pardon ignorance.

------------------------


ubuntu@ip-10-212-139-175:~$ netstat -antp
(No info could be read for "-p": geteuid()=1000 but you should be
root.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN -
tcp 0 0 0.0.0.0:8081 0.0.0.0:*
LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN -
tcp 0 0 127.0.0.1:5432 0.0.0.0:*
LISTEN -
tcp 0 0 0.0.0.0:25 0.0.0.0:*
LISTEN -
tcp 0 0 127.0.0.1:6010 0.0.0.0:*
LISTEN -
tcp 0 0 0.0.0.0:443 0.0.0.0:*
LISTEN -
tcp 0 624 10.212.139.175:22 175.110.246.24:47132
ESTABLISHED -
tcp6 0 0 :::46671 :::*
LISTEN -
tcp6 0 0 :::8080 :::*
LISTEN -
tcp6 0 0 :::22 :::*
LISTEN -
tcp6 0 0 ::1:5432 :::*
LISTEN -
tcp6 0 0 ::1:6010 :::*
LISTEN -



On Jan 27, 7:21 pm, David Zwarg <dzw...@azavea.com> wrote:
> Hello,
>
> Please check your security group settings in the AWS console. It appears as
> though port 8080 is being blocked.
>
>    1. Log in to the AWS Management Console
>    2. Select the "Amazon EC2" tab
>    3. On the left Navigation pane, select "Instances" under "INSTANCES"
>    4. Select the instance that has the public DNS of "
>    ec2-184-72-82-111.compute-1.amazonaws.com"
>    5. On the lower pane, click on the "Description" tab
>    6. Look for the setting "Security Groups", and record the current value
>    7. On the left Navigation pane, select "Security Groups" under "Network
>    & Security"
>    8. Select the security group from step #6
>    9. On the lower pane, click on the "Inbound" tab
>    10. Make sure that port 80, 443, and 8080 are listed under the "TCP Port
>    (Service)" column.
>
> Let us know if that helps,
> David
>
> On Thu, Jan 26, 2012 at 5:21 PM, Oltmans <rolf.oltm...@gmail.com> wrote:
> > Guys, I hope you're doing well. Few quick questions about Geoserver
>
> > - I've installed geoserver (per the guidelines given at
> >http://funnymonkey.com/install-geoserver-ubuntu?and also added rest
> > gethttp://localhost:8080/geoserver/(notethe trailing slash), which should
> ...
>
> read more »

David Zwarg

unread,
Jan 27, 2012, 3:05:30 PM1/27/12
to districtb...@googlegroups.com
Hello,

It appears as though you checked the server, but not the AWS settings. The server may have port 8080 open and listening on that port, but port 8080 also needs to be added explicitly to the security group in the AWS console. Please follow the instructions in my previous email to make sure port 8080 is added to the AWS security group.

Thanks,
David

Oltmans

unread,
Jan 27, 2012, 3:29:51 PM1/27/12
to districtbuilder-dev
Thank you, I'm sorry I'm new to this. Thank you, David, you've been
very helpful.


On Jan 28, 1:05 am, David Zwarg <dzw...@azavea.com> wrote:
> Hello,
>
> It appears as though you checked the server, but not the AWS settings. The
> server may have port 8080 open and listening on that port, but port 8080
> also needs to be added explicitly to the security group in the AWS console.
> Please follow the instructions in my previous email to make sure port 8080
> is added to the AWS security group.
>
> Thanks,
> David
>
> > > >http://funnymonkey.com/install-geoserver-ubuntu?andalso added rest
> > > > gethttp://localhost:8080/geoserver/(notethetrailing slash), which
> ...
>
> read more »

Oltmans

unread,
Feb 9, 2012, 9:40:42 AM2/9/12
to districtbuilder-dev
Greetings David, hope you're doing well. I've not really configured my
AWS settings. But I just wanted to ask one more thing (though it's not
directly related to DistrictBuilder so I will really appreciate any
help).

So I tried SSH port forwarding to see if 8080 was open. I used this
https://ccrma.stanford.edu/guides/sshtunnel/putt... small tutorial as
a guide to using port forwarding on Putty (I'm using Putty on MS-
Windows operating system to connect to an EC2 instance). As shown in
the screen shot on that web-page, I opened up Putty under the
"Tunnels" tab I entered following info

Source port: localhost:8080
destination port: ec2-184-72-82-111.compute-1.amazonaws.com:8080

Then I connected. Once connected, on my Windows machine I opened up a
browser and typed 'http://localhost:8080" and got the following error

----
Error 404 - Not Found.

No context on this server matched or handled this request.
Contexts known to this server are:
/javadoc ---> org.mortbay.jetty.servlet.Context@1c7d5b2{/javadoc,file:/
opt/geoserver-2.0.2/javadoc}
/geoserver ---> org.mortbay.jetty.webapp.WebAppContext@9e9a07{/
geoserver,file:/opt/geoserver-2.0.2/webapps/geoserver/}
----


So does the above error also mean that port 8080 is indeed blocked and
I've to configure AWS settings? Just wanted to run this by you and
double check?

Thanks in advance for all help.



On Jan 28, 1:05 am, David Zwarg <dzw...@azavea.com> wrote:
> Hello,
>
> It appears as though you checked the server, but not the AWS settings. The
> server may have port 8080 open and listening on that port, but port 8080
> also needs to be added explicitly to the security group in the AWS console.
> Please follow the instructions in my previous email to make sure port 8080
> is added to the AWS security group.
>
> Thanks,
> David
>
> > > >http://funnymonkey.com/install-geoserver-ubuntu?andalso added rest
> > > > gethttp://localhost:8080/geoserver/(notethetrailing slash), which
> ...
>
> read more »

Andrew Jennings

unread,
Feb 9, 2012, 9:51:41 AM2/9/12
to districtb...@googlegroups.com
Hello.  The message you received indicates that your geoserver is up and running.  It's a message from tomcat and it states that the /geoserver context is listening on port 8080.  That's a good first step.

Because you can only get to geoserver through an SSH tunnel (and I can't get to it at all), it likely means you need to configure your AWS security settings according to the directions David gave you.  Your geoserver is listening on port 8080 but the AWS security settings are not allowing connnections to that port from the outside world.

Hope that helps.

- Andrew
Reply all
Reply to author
Forward
0 new messages