Linode OTM2 deployment

31 views
Skip to first unread message

Gonz Rafuls

unread,
Oct 3, 2014, 3:00:14 PM10/3/14
to opentree...@googlegroups.com
Hi guys,

I am trying to deploy OTM2 on Linode. I followed the OTM2 install guide and I modified all config files to point to my Linode public IP (?). All service are up and running but when I try to access through the browser the webpage is not available. Not sure what I am missing.
Are there any guides for deploying on Linode or if anyone can give me any help with this it will be highlt appreciated.
Thanks a lot in advance.

Cheers,
Gonza.-

Andrew Thompson

unread,
Oct 3, 2014, 3:41:20 PM10/3/14
to opentree...@googlegroups.com
Hi Gonza,

Linode should be an OK service to use for OTM2. Sorry to hear you're running into issues.

You are able to run OTM2 locally using all the same config files, correct?

If so, I would start looking at how nginx is configured (what port is it serving on? Should be HTTP port 80), and if Linode has any separate settings/firewalls/etc related to hooking up your instance to serve on port 80 (or whatever one you're using).

-Andrew


--
You received this message because you are subscribed to the Google Groups "opentreemap-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Andrew Thompson, Community Evangelist

Azavea |  340 N 12th St, Ste 402, Philadelphia, PA
atho...@azavea.com  | T 215.701.7689  | F 215.925.2663
Web azavea.com  |  Blog azavea.com/blogs  | Twitter @azavea

Join our community! Google Groups:

gonzo

unread,
Oct 3, 2014, 4:51:56 PM10/3/14
to opentree...@googlegroups.com
Hi Andrew,

I got to the bottom of this. Unfortunately, I am now getting Internal Server error. Much better though. :)
Problem was that I created the simlink to enabled-sties without the full path. (I ignored the comment on that line from the guide at first)
I solved this by deleting it and relinking.

Any ideas how can I debug the internal server error now? :D

Cheers,
Gonza.-

You received this message because you are subscribed to a topic in the Google Groups "opentreemap-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opentreemap-user/S7_MQKc-Dk0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opentreemap-us...@googlegroups.com.

Andrew Thompson

unread,
Oct 3, 2014, 5:26:48 PM10/3/14
to opentree...@googlegroups.com
Hi Gonza,

Can you give us more details? When do you get the internal server error? I assume you're talking about an HTTP 500 error?

Does Django give you a debug page with a stack trace or anything?

Gonz Rafuls

unread,
Oct 3, 2014, 6:43:31 PM10/3/14
to opentree...@googlegroups.com
Hi Andrew,

Sorry for the lack of data at the time. I now enabled debug logging on nginx. You can find attached the error.log. Can't seem to get my head around it.
Stuff I noticed:
2014/10/04 00:13:25 [debug] 1328#0: *6 http upstream recv(): -1 (11: Resource temporarily unavailable)
2014/10/04 00:13:25 [debug] 1328#0: *6 readv() not ready (11: Resource temporarily unavailable)
2014/10/04 00:13:26 [debug] 1328#0: *6 recv() not ready (11: Resource temporarily unavailable)

Any clues?

Cheers,
Gonza.-
error.log

Gonz Rafuls

unread,
Oct 3, 2014, 7:12:57 PM10/3/14
to opentree...@googlegroups.com
Andrew,

Ignore my previous post. I realized my /etc/nginx/include/locations/app file had the wrong proxy_pass.

Cheers,
Gonza.-

Alan Humphrey

unread,
Oct 4, 2014, 2:25:54 PM10/4/14
to opentree...@googlegroups.com
You have a bunch of 502 errors in the log. This might help: http://www.nginxtips.com/502-bad-gateway-using-nginx/

Gonz Rafuls

unread,
Oct 4, 2014, 3:25:27 PM10/4/14
to opentree...@googlegroups.com
Thanks a lot for that Alan.

I am not getting the 502 errors anymore. Instead I am only getting the 500 internal server error only.
I am able to access the nginx static files remotely though so I guess the problem is on the django configuration. 
I tried adding this line to the otm.conf but still the same:
    root /usr/local/otm;

Attached the new error.log. Any clues?

Cheers,
Gonza.-
error.log

Alan Humphrey

unread,
Oct 4, 2014, 4:15:21 PM10/4/14
to opentree...@googlegroups.com
Something bad is happening in your default page.  My treemap implementation is based on 1.2, so I'm not familiar with the 2.0 code base. Essentially you're going to want to dig through the urls.py file to find out what view is called when "/" is asked for. Then dig through the views file to find that method. Once found, you can drop in logging statements to see how far you're getting.

If it were me I'd start by looking at calls that hit the database. My guess is that you're either not connecting to the database or the database isn't set up correctly.

Good luck! It sounds like you're pretty close....

Gonz Rafuls

unread,
Oct 4, 2014, 6:54:08 PM10/4/14
to opentree...@googlegroups.com
I dig through urls.py and for the '/' view it should be displaying the base.html template. Still nothing.
I did set up my hostname correctly and it is correctly pointing at my linodes public IP.
Now I am wondering which config files should I edit to be pointing at my hostname/public IP and which ones should keep pointing at localhost.
I also modified the gunicorn.conf to point at "/usr/local/otm/" instead of "/home/otm/". Not sure about that one but still the same error.log.
Any clues?

Cheers,
Gonza.-

Alan Humphrey

unread,
Oct 4, 2014, 7:14:39 PM10/4/14
to opentree...@googlegroups.com
Don't know why you're worried about the public IP. Clearly you're hitting your server. What is in the VIEW code? Anything? Or does it just call the template?

Gonz Rafuls

unread,
Oct 5, 2014, 9:08:52 AM10/5/14
to opentree...@googlegroups.com
IT'S ALIVEEEEE!!!!
There was something wrong with the gunicorn service. I restarted it and it's all up and running on linode now.
Thanks heaps for the help guys. Highly appreciated!!!
Will go have some fun with it now! :)

Cheers,
Gonza.-

Andrew Thompson

unread,
Oct 6, 2014, 11:25:39 AM10/6/14
to opentree...@googlegroups.com
Glad to hear of your success, Gonza!

What part of the world are you tree mapping in? When you get your map to a production-ready state that you might like to share it, we would be happy to add it to our "map of treemaps" on https://www.opentreemap.org/ to give your efforts some extra visibility.

Best,

Andrew

Gonz Rafuls

unread,
Oct 7, 2014, 3:27:47 AM10/7/14
to opentree...@googlegroups.com
Thanks a lot Andrew!

I am trying to get this ready for Valdivia, Chile with some guys from Forestry University and also for my home town Rosario, Argentina.
Will definitely let you guys know when any of these go live.

Cheers,
Gonza.-

Andrew Thompson

unread,
Oct 7, 2014, 11:46:55 AM10/7/14
to opentree...@googlegroups.com
¡Qué guay! He estado esperando que podríamos ver un OpenTreeMap en Sudamérica uno de estos días. Valdivia se parece a una ciudad costera muy divertido, de lo que veo en GoogleMaps :-)

Buena suerte!

Gonz Rafuls

unread,
Oct 8, 2014, 1:06:17 PM10/8/14
to opentree...@googlegroups.com
Muchas gracias Andrew!
Muy bueno tu español!!!! :D
Sera un honor ser el primero en implementar OTM satisfactoriamente para alguna ciudad en Sudamerica.

Saludos,
Gonza.-
Reply all
Reply to author
Forward
0 new messages