[GeoNode-users] Geonode DevMode Installation (Julierme Pinheiro)
Julierme Pinheiro
juliermeopensourcedeveloper at gmail.com
Wed May 16 11:32:54 PDT 2018
Dear Toni Schonbuchner,
Thank you very much for the updates and explanation. I could see through
the link https://github.com/GeoNode/geonode/blob/master/pavement.py#L560
that Paver Script (pavement.py) has 3 functions def setup_geoserver
start_geoserver and stop_geoserver.
I realized these functions here http://geonode.org/dev-workshop/#/2/3
and in here
http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/create_geonode_db.html
:
1 -$ paver setup
*# This command downloads and extract the correct GeoServer version*
2 -$ paver sync
*# This command prepares the DB tables and loads initial data*
3 -$ paver start
*# This command allows you to start GeoNode in development mode*
When I installed geonode from source (
http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/),
I realized at the installation stage (
http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/install_geoserver_application.html)
I had geoserver being fired by tomcat8 in port 8080 <
http://localhost:8080/geoserver> and in port 80 <
http://localhost/geoserver/web>. However, during geonode-project
installation (https://github.com/GeoNode/geonode-project), one thing to do
is to run *DJANGO_SETTINGS_MODULE=my_geonode.settings paver setup *and this
command will download geoserver and in this point I have a question: in
which port geoserver is going to run, because I have already por 80 and
8080 being used for geonode production installed from source (using
virtualenv).
If I run *DJANGO_SETTINGS_MODULE=my_geonode.settings paver stop or paver
stop or paver stop_geoserver *this is the response to
pavement.stop_geoserver
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Stopping java (process number 1215)
Traceback (most recent call last):
File
"/home/geo/Envs/my_geonode/local/lib/python2.7/site-packages/paver/tasks.py",
line 196, in _run_task
return do_task()
File
"/home/geo/Envs/my_geonode/local/lib/python2.7/site-packages/paver/tasks.py",
line 192, in do_task
task()
File
"/home/geo/Envs/my_geonode/local/lib/python2.7/site-packages/paver/tasks.py",
line 321, in __call__
retval = environment._run_task(self.name, self.needs, self.func)
File
"/home/geo/Envs/my_geonode/local/lib/python2.7/site-packages/paver/tasks.py",
line 214, in _run_task
return do_task()
File
"/home/geo/Envs/my_geonode/local/lib/python2.7/site-packages/paver/tasks.py",
line 193, in do_task
return func(**kw)
File "pavement.py", line 470, in stop_geoserver
kill('java', 'geoserver')
File "pavement.py", line 1051, in kill
% (arg1, '\n'.join([l.strip() for l in lines])))
Exception: Could not stop java: Running processes are
tomcat8 1215 0.8 9.2 4524172 944172 ? Sl 10:54 2:13
/usr/lib/jvm/default-java/bin/java
-Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.awt.headless=true -XX:MaxPermSize=512m -XX:PermSize=128m -Xms512m
-Xmx2048m -Duser.timezone=GMT -Dorg.geotools.shapefile.datetime=true
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=4
-Dfile.encoding=UTF8 -Duser.timezone=GMT
-Djavax.servlet.request.encoding=UTF-8
-Djavax.servlet.response.encoding=UTF-8
-DGEOSERVER_DATA_DIR=/data/geoserver-data
-Dgeofence.dir=/data/geoserver-data/geofence
-DGEOSERVER_LOG_LOCATION=/data/geoserver-logs/geoserver.log
-DGEOWEBCACHE_CACHE_DIR=/data/gwc_cache_dir
-Djava.endorsed.dirs=/usr/share/tomcat8/endorsed -classpath
/usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar
-Dcatalina.base=/var/lib/tomcat8 -Dcatalina.home=/usr/share/tomcat8
-Djava.io.tmpdir=/tmp/tomcat8-tomcat8-tmp
org.apache.catalina.startup.Bootstrap start
geo 23162 0.0 0.0 4508 756 pts/1 S+ 15:18 0:00 /bin/sh -c
ps aux | grep java
geo 23164 0.0 0.0 21296 1016 pts/1 S+ 15:18 0:00 grep java
Also after refreshing the browser, geonode-project (http://localhost:8000)
and geoserver (http://localhost:8080/geoserver), both sites keep running.
Why I can not stop geonode-project and geoserver through paver? Also when I
ran *DJANGO_SETTINGS_MODULE=my_geonode.settings paver start *for the first
time a warning message says that port 8080 has been already used and indeed
it is being used by geoserver in geonode production as mentioned above.
I appreciated your time and help.
Kind regards
Julierme
2018-05-16 5:13 GMT-03:00 Toni Schönbuchner <toni.schoenbuchner at csgis.de>:
> Dear Julierme,
>
> I got confused in one thing here. When Geonode is installed in DevMode,
> Geoserver and Geonode are served by Paver.
>
>
> this is a bit vague. Paver does not „serve“ geonode or geoserver.
> It´s a managment tool like make which runs tasks for you.
>
> So when you run 'paver start‘ it runs django´s build in webserver:
> https://github.com/GeoNode/geonode/blob/master/pavement.py#L560
> and ‚jetty' to serve geoserver:
> https://github.com/GeoNode/geonode/blob/master/pavement.py#L685
>
> Django´s runserver reloads whenever you change some py file.
> Perfect for development;) But not for production:
>
> Now’s a good time to note: *don’t* use this server in anything resembling
> a production environment. It’s intended only for use while developing.
> (We’re in the business of making Web frameworks, not Web servers.)
> https://docs.djangoproject.com/en/2.0/intro/tutorial01/
>
> In production you setup apache or nginx uwsgi, or … together with most
> likely
> Tomcat to serve geonode and geoserver. (Apache does not restart if
> you change a python file as runserver does ;)
>
> Hope that clarifies things a bit.
>
> Cheers,
>
> Toni
>
> -----------------------------------------------
> CSGIS
>
> -----------------------------------------------
> Kolonnadenstraße 1
> <https://maps.google.com/?q=Kolonnadenstra%C3%9Fe+1+04109+Leipzig&entry=gmail&source=g>
> 04109 Leipzig
> <https://maps.google.com/?q=Kolonnadenstra%C3%9Fe+1+04109+Leipzig&entry=gmail&source=g>
> -----------------------------------------------
> Mobil +49/ (0) 176 6680 3198
> Tel +49/ (0) 341 24 04 738
> Fax +49/ (0) 341 24 04 73
> Web http://csgis.de
> -----------------------------------------------
>
> Hinweis gemäß § 33 BDSG
> Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist
> ausschließlich für den
> Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie
> diese E-Mail versehentlich
> erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und
> löschen Sie diese Nachricht
> von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung,
> Vervielfältigung, Veränderung,
> Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.
>
> Am 15.05.2018 um 18:08 schrieb geonode-users-request at lists.osgeo.org:
>
> Dear geonode Developers,
>
> I got confused in one thing here. When Geonode is installed in DevMode,
> Geoserver and Geonode are served by Paver. So, I can do that following any
> of these guides:
>
> 1 - Ubuntu 16.04 LTS installation until the end of this URL:
> http://docs.geonode.org/en/master/tutorials/install_and_admi
> n/geonode_install/create_geonode_db.html
>
> 2 - https://github.com/GeoNode/geonode-project
>
> 3 - http://geonode.org/dev-workshop/#/3/2
>
> And when geonode is not in DevMod are the followings cases:
>
> 1 - Installed via apt-get
>
> 2 - Geoserver is served by tomcat and Geonode by apache2
>
>
> Are my statements corrects? Could someone give an explanation on that
> please?
>
> Thank you for your time in advance
>
> Kind regards
>
> Julierme
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20180516/a543fdf3/attachment.html>
More information about the geonode-users
mailing list