<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Disregard. The error was caused by having the wrong JDK installed. Java 8 is required for Geoserver. Steps to resolve error:<div><br></div><div>1) install jdk version 8: sudo apt install openjdk-8-jdk</div><div>2) Get path to JRE: sudo update-alternatives --config java</div><div>3) Set environment variable by adding line /etc/environment: <span style="background-color:transparent;color:rgb(58,58,58);font-size:14px">JAVA_HOME="</span><span class="gmail-highlight" style="background:0px 0px;font-size:14px;box-sizing:border-box;color:rgb(233,72,73);display:inline">/usr/lib/jvm/java-8-openjdk-amd64/bin/</span><span style="background-color:transparent;color:rgb(58,58,58);font-size:14px">"</span></div><div><span style="background-color:transparent;color:rgb(58,58,58);font-size:14px"><br></span></div><div><span style="background-color:transparent;color:rgb(58,58,58);font-size:14px">Good instructions here: </span><a href="https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-18-04">https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-18-04</a></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 8, 2019 at 9:58 AM Cliff Patterson <<a href="mailto:cpatterson@psdrcs.com">cpatterson@psdrcs.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>I get the following error when installing Geonode from the testing PPA on a VM. After setting the IP address, the error appears again. Consequently, geoserver is not accessible and Geonode throws up 404 errors (e.g. when opening map view). No changes have been made to the settings.py file.</div><div></div><div><br></div><div>When logging into Geonode to access geoserver (from host machine), the address is looking for geoserver at localhost: <a href="http://192.168.20.47/proxy/?url=http://localhost:8080/geoserver/" target="_blank">http://x.x.x.x/proxy/?url=http://localhost:8080/geoserver/</a></div><div><br></div><div><br></div><div>Setting up oauth</div><div>Waiting Tomcat Service to Restart...</div><div>Waiting Apache HTTPD Service to Restart...</div><div>Inspecting the available layers in GeoServer ...</div><div>Traceback (most recent call last):</div><div>  File "/usr/bin/django-admin", line 21, in <module></div><div>    management.execute_from_command_line()</div><div>  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line</div><div>    utility.execute()</div><div>  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 356, in execute</div><div>    self.fetch_command(subcommand).run_from_argv(self.argv)</div><div>  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 283, in run_from_argv</div><div>    self.execute(*args, **cmd_options)</div><div>  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 330, in execute</div><div>    output = self.handle(*args, **options)</div><div>  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle</div><div>    execute_signals=True)</div><div>  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/helpers.py", line 564, in gs_slurp</div><div>    resources = cat.get_resources()</div><div>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 864, in get_resources</div><div>    for ws in self.get_workspaces():</div><div>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 1015, in get_workspaces</div><div>    description = self.get_xml("%s/workspaces.xml" % self.service_url)</div><div>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 218, in get_xml</div><div>    raise FailedRequestError("Tried to make a GET request to %s but got a %d status code: \n%s" % (rest_url, response.status, content))</div><div>geoserver.catalog.FailedRequestError: Tried to make a GET request to <a href="http://localhost:8080/geoserver/rest/workspaces.xml" target="_blank">http://localhost:8080/geoserver/rest/workspaces.xml</a> but got a 404 status code:</div><div><!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} <a href="http://a.name" target="_blank">a.name</a> {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 – Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> &#47;geoserver&#47;rest&#47;workspaces.xml</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/8.5.39 (Ubuntu)</h3></body></html></div><div>Processing triggers for libc-bin (2.27-3ubuntu1) ...</div><div>Processing triggers for ureadahead (0.100.0-21) ...</div><div>Processing triggers for systemd (237-3ubuntu10.21) ...</div><div>Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...</div><div>Processing triggers for rsyslog (8.32.0-1ubuntu4) ...</div><div>Processing triggers for ca-certificates (20180409) ...</div><div>Updating certificates in /etc/ssl/certs...</div><div>0 added, 0 removed; done.</div><div><br></div><div>The same error appears when attempting to set IP for Geonode:</div><div><br></div><div><div>$ sudo geonode-updateip x.x.x.x </div><div>[sudo] password for cliffpat:</div><div>Replacing SITEURL value with '192.168.20.47' in /etc/geonode/local_settings.py ... done.</div><div>Adding entry for '192.168.20.47' in /usr/share/geoserver/data/printing/config.yaml ... done.</div><div>Setting up oauth</div><div>Waiting Tomcat Service to Restart...</div><div>Waiting Apache HTTPD Service to Restart...</div><div>Inspecting the available layers in GeoServer ...</div><div>Traceback (most recent call last):</div><div>  File "/usr/bin/django-admin", line 21, in <module></div><div>    management.execute_from_command_line()</div><div>  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line</div><div>    utility.execute()</div><div>  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 356, in execute</div><div>    self.fetch_command(subcommand).run_from_argv(self.argv)</div><div>  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 283, in run_from_argv</div><div>    self.execute(*args, **cmd_options)</div><div>  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 330, in execute</div><div>    output = self.handle(*args, **options)</div><div>  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/management/commands/updatelayers.py", line 124, in handle</div><div>    execute_signals=True)</div><div>  File "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/helpers.py", line 564, in gs_slurp</div><div>    resources = cat.get_resources()</div><div>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 864, in get_resources</div><div>    for ws in self.get_workspaces():</div><div>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 1015, in get_workspaces</div><div>    description = self.get_xml("%s/workspaces.xml" % self.service_url)</div><div>  File "/usr/lib/python2.7/dist-packages/geoserver/catalog.py", line 218, in get_xml</div><div>    raise FailedRequestError("Tried to make a GET request to %s but got a %d status code: \n%s" % (rest_url, response.status, content))</div><div>geoserver.catalog.FailedRequestError: Tried to make a GET request to <a href="http://localhost:8080/geoserver/rest/workspaces.xml" target="_blank">http://localhost:8080/geoserver/rest/workspaces.xml</a> but got a 404 status code:</div><div><!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} <a href="http://a.name" target="_blank">a.name</a> {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 – Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> &#47;geoserver&#47;rest&#47;workspaces.xml</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/8.5.39 (Ubuntu)</h3></body></html></div></div><div><br></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><p style="margin-bottom:0.0001pt">Cliff Patterson Ph.D.<br><br><b>PSD</b> | Senior GIS Consultant <br>P: 519-690-2565 ext. 2565<br><a href="http://www.psdrcs.com" target="_blank">www.psdrcs.com</a><br>London | 148 Fullarton St. 9th Floor <span style="font-size:small">        </span><br></p><p style="font-size:12.8px;margin-bottom:0.0001pt"><span style="font-size:12.8px"><span style="font-size:9pt;line-height:12.84px;font-family:Verdana,sans-serif;color:rgb(0,112,192)"><img src="http://psdrcs.com/assets/email_signature.png" width="200" height="57"></span></span></p></div></div>