[GeoNode-users] the VM is IP not allowed when using a docker cluster

Alessio Gottardo tappoz84 at yahoo.it
Tue Dec 29 08:18:42 PST 2020


Hi guys,
I am trying to run the Geonode Docker cluster from within a VM I have running locally on my laptop using Vagrant.
I think it's mostly working because from within the VM I can see some Geonode HTML with the command "curl localhost | grep -i geonode".However, it is not showing anything when using "curl 192.168.50.4 | grep -i geonode" which is the IP address for the VM using the virtual network interface attached to it.
So I am assuming I am doing something wrong with this env file content: ALLOWED_HOSTS=['django', 'localhost', '127.0.0.1', '192.168.50.4']Is there anything I am missing here? Why both "localhost" and "192.168.50.4" are not enough?
The strange thing is that using "sudo netstat -plant" from within the VM I can only see TCP sockets on ports 80 and 443 (Geonode Django), but not e.g. 8080 (Geoserver) or Postgis although "docker ps" shows all the relevant containers up and running:CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS              PORTS                                                 NAMES28948de75df9        geonode/nginx:3.x          "/docker-entrypoint.…"   5 hours ago         Up 20 minutes       0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp              nginx4ashri2020b8b52f8296bc        ashri2020_django           "/bin/sh -c 'service…"   5 hours ago         Up 20 minutes                                                             django4ashri202098511731c773        geonode/geoserver:2.17.2   "/usr/local/tomcat/t…"   5 hours ago         Up 20 minutes       8080/tcp                                              geoserver4ashri202032552d8a7586        geonode/postgis:11         "docker-entrypoint.s…"   5 hours ago         Up 20 minutes       5432/tcp                                              db4ashri20209d30b67cff27        rabbitmq                   "docker-entrypoint.s…"   18 hours ago        Up 20 minutes       4369/tcp, 5671-5672/tcp, 15691-15692/tcp, 25672/tcp   rabbitmq4ashri2020
I was able to run the Docker cluster following this doc: https://github.com/GeoNode/geonode-project#start-your-server-using-dockerbasically:- cloning https://github.com/GeoNode/geonode-project.git- then activating the virtualenv,- then installing Django and finally running that command with "django-admin startproject" that generates all the scaffolding (including the ".env" file I modified).- Last step: I invoked the Docker cluster with "docker-compose up --build -d db django geoserver geonode".
What am I doing wrong?
My idea is to validate that IP 192.168.50.4 from within the VM, before accessing it from outside the VM and make sure ports are forwarded correctly by Vagrant.I am assuming that from within the VM I should see some HTML when using "curl" against its assigned IP address 192.168.50.4 - is this correct?

Thank youAlessio G.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20201229/91ed7fb9/attachment.html>


More information about the geonode-users mailing list