geonode-updateip error with httplib2.socks
Everytime I try to launch geonode-updateip command I get a Service Unavailable error:
luonist@siprweb01t-rdh:~$ sudo geonode-updateip example.com
Replacing SITEURL value with 'example.com' in /etc/geonode/local_settings.py ... done.
Adding entry for 'example.com' in /usr/share/geoserver/data/printing/config.yaml ... 'example.com' already found to the printing whitelist.
Adding example.com to ALLOWED_HOSTS in /etc/geonode/local_settings.py ... 'example.com' already found in ALLOWED_HOSTS list.
Setting up oauth
Inspecting the available layers in GeoServer ...
Traceback (most recent call last):
File "/usr/bin/django-admin", line 21, in <module>
management.execute_from_command_line()
File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/management/commands/updatelayers.py", line 119, in handle
execute_signals=True)
File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/helpers.py", line 423, in gs_slurp
resources = cat.get_resources()
File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 722, in get_resources
for ws in self.get_workspaces():
File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 860, in get_workspaces
description = self.get_xml("%s/workspaces.xml" % self.service_url)
File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 211, in get_xml
response, content = self.http.request(rest_url)
File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1609, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1351, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1272, in _conn_request
conn.connect()
File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 916, in connect
self.sock.connect((self.host, self.port) + sa[2:])
File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 424, in connect
self.__negotiatehttp(destpair[0], destpair[1])
File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 390, in __negotiatehttp
raise HTTPError((statuscode, statusline[2]))
httplib2.socks.HTTPError: (503, 'Service Unavailable')
This is Geonode v2.6.3 on Ubuntu 16.04 LTS. Geonode was installed via apt-get.
Here the problem is that for some reason GeoServer didn't start, so updatelayers is failing Can you try to see if it starts manually?
Tomcat7 is apparently running; anyway, restarting the service doesn't help.
This is what I see from running processes; I don't know if there is anything unusual or missing:
luonist@siprweb01t-rdh:/var/log$ ps -ef | grep tomcat
tomcat7 7482 1 3 09:46 ? 00:00:03 /usr//bin/java -Djava.util.logging.config.file=/var/lib/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Xms2048m
-Xmx2048m -XX:+UseParallelOldGC -XX:+UseParallelGC -XX:NewRatio=2 -XX:+AggressiveOpts -Xrs -XX:PerfDataSamplingInterval=500 -XX:MaxPermSize=128m -Djava.endorsed.dirs=/usr/share/tomcat7/endorsed -classpath /usr/share/tomcat7/bin/bootstrap
.jar:/usr/share/tomcat7/bin/tomcat-juli.jar -Dcatalina.base=/var/lib/tomcat7 -Dcatalina.home=/usr/share/tomcat7 -Djava.io.tmpdir=/tmp/tomcat7-tomcat7-tmp org.apache.catalina.startup.Bootstrap start
luonist 7514 6973 0 09:48 pts/0 00:00:00 grep --color=auto tomcat
This is what I see from log
luonist@siprweb01t-rdh:/var/log$ sudo tail -f /var/log/tomcat7/catalina.out
Nov 08, 2017 9:46:54 AM org.apache.catalina.core.StandardContext setPath
WARNING: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []
Nov 08, 2017 9:46:55 AM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve star
tup time and JSP compilation time.
Nov 08, 2017 9:46:55 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /var/lib/tomcat7/webapps/ROOT has finished in 685 ms
Nov 08, 2017 9:46:55 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Nov 08, 2017 9:46:55 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 743 ms
Ok, resolved: the problem was that after removing and reinstalling GeoNode, GeoServer was not installed as well.