[GeoNode-users] (no subject)

Naresh N naresh919 at gmail.com
Tue May 7 02:52:11 PDT 2019


Dear Amedeo,

Thanks for your reply. I have changed as advised

GEOSERVER_LOCATION
GEOSERVER_PUBLIC_LOCATION

The first should be http://ourdomainname:8080/geoserver
<http://localhost:8080/geoserver>
The second should be https://domainname/geoserver

but Now  while uploading the data it is showing the error  ' *Tried to make
a GET request to
http://<ourdomainname>:8080/geoserver/rest/workspaces/default.xml but got a
404 status code*:'

Please help me to resolve this issue.

Some more points which I am Having doubt about changes , please help me to
understand error and resolve the issue

1. In Geonode.conf  is the following correct?

    a.   ProxyPreserveHost On
         ProxyPass /geoserver http://127.0.0.1:8080/geoserver
         ProxyPassReverse /geoserver http://127.0.0.1:8080/geoserver

    b. ServerName https://<ourdomainname>

2.  In /etc/tomcat/server.xml , replaced the following content

   <Connector port="8080" protocol="HTTP/1.1"

    connectionTimeout="20000"
    URIEncoding="UTF-8"
    redirectPort="8443"/>

with

<Connector port="8080" protocol="HTTP/1.1"
    connectionTimeout="20000"
    URIEncoding="UTF-8"
    scheme="https"
    proxyName="<ourDomainName .. for example as* exmaple.com
<http://exmaple.com> *>"
    proxyPort="443"/>

Is proxyPort *443* correct? Do I need to change the port?

3.  I have *not added* the following , is it required to do

  sudo -s "cat server.crt >>
/usr/lib/python2.7/dist-packages/httplib2/cacerts.txt"

sudo keytool -import -alias geonodessl -keystore
/etc/ssl/certs/java/cacerts -file server.crt

4. When I am accessing GeoServer Webpage from GeoNode Admin interface,
it is going to the url "* http://<ourdomin>:443/geoserver/web* " and
showing the following message

*   Bad Request*

*Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.*

>From which settings it is *sending to http?*

Please help me to resolve the issue and let me know in case of any
other information required

Please be note that GeoNode with http worked properly but after doing
the changes for https the error is getting.


*Thanks&Regards,*

*Naresh*






On Mon, May 6, 2019 at 8:11 PM Amedeo Fadini <amefad at gmail.com> wrote:

> Hi Naresh,
>
> Could you please check what values are written in your local_settings.py
> for the following variables?
>
> GEOSERVER_LOCATION
> GEOSERVER_PUBLIC_LOCATION
>
> The first should be http://localhost:8080/geoserver
> The second should be https://<your server>/geoserver
>
> Amedeo
>
> Il giorno lun 6 mag 2019 alle ore 11:11 Naresh N <naresh919 at gmail.com> ha
> scritto:
>
>> Dear All,
>>
>> Please help to enable https for GeoNode
>>
>> Please find the details below in which GeoNdde deployed
>>
>> *Server OS*: RHEL 7.2
>> *GeoNode Version*: 2.4
>> *Bits*:64 -bit machine.
>> Apache 2.4.6
>> Python:2.7.5
>> GeoServer :2.7.4
>> Tomcat Version:7.0.54
>>
>> The following commands executed. (followed from *http://docs.geonode.org/en/2.4.x/tutorials/advanced/geonode_production/ssl.html?highlight=ssl
>> <http://docs.geonode.org/en/2.4.x/tutorials/advanced/geonode_production/ssl.html?highlight=ssl>*
>> )
>>
>> 1. Copied the our SSL key and certificate to the following locations
>>
>>    As, We are using WildCard.crt  The following were copied
>>
>>     a. SSLcertificateFile  with    Wildcard.crt,
>>     b. SSLCertificateKeyFile  with server.key
>>     c. SSLCertificateChainFile  with Intermediate.crt
>>
>> 2.   Apache Configuration  as mentioned in above , I have modified in our
>> geonode.conf file
>>
>> 3.  Tomcat Configuration - Edited Server.xml and done required changes
>>
>> 4. GeoNode Configuration - Changed Site Url to https
>>
>> 5. GeoServer Configuration - Changed web.xml
>>
>> After doing above and restarting tomcat,apache site was redirecting to
>> https, however when I am uploading data it is showing following error *SSLHandshakeError:
>> [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:765)*
>>
>> File "/home/geonode/geonode/layers/views.py", line 171, in layer_upload
>> [Mon May 06 10:34:55.699359 2019] [:error] [pid 39822]
>>  title=form.cleaned_data["layer_title"],
>> [Mon May 06 10:34:55.699361 2019] [:error] [pid 39822]   File
>> "/home/geonode/geonode/layers/utils.py", line 470, in file_upload
>> [Mon May 06 10:34:55.699363 2019] [:error] [pid 39822]
>>  defaults=defaults
>> [Mon May 06 10:34:55.699365 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/django/db/models/manager.py", line 154,
>> in get_or_create
>> [Mon May 06 10:34:55.699368 2019] [:error] [pid 39822]     return
>> self.get_queryset().get_or_create(**kwargs)
>> [Mon May 06 10:34:55.699370 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/modeltranslation/manager.py", line 341,
>> in get_or_create
>> [Mon May 06 10:34:55.699372 2019] [:error] [pid 39822]     return
>> super(MultilingualQuerySet, self).get_or_create(**kwargs)
>> [Mon May 06 10:34:55.699375 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/django/db/models/query.py", line 383, in
>> get_or_create
>> [Mon May 06 10:34:55.699377 2019] [:error] [pid 39822]
>>  obj.save(force_insert=True, using=self.db)
>> [Mon May 06 10:34:55.699384 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/polymorphic/polymorphic_model.py", line
>> 90, in save
>> [Mon May 06 10:34:55.699393 2019] [:error] [pid 39822]     return
>> super(PolymorphicModel, self).save(*args, **kwargs)
>> [Mon May 06 10:34:55.699395 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 545, in
>> save
>> [Mon May 06 10:34:55.699397 2019] [:error] [pid 39822]
>>  force_update=force_update, update_fields=update_fields)
>> [Mon May 06 10:34:55.699399 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 569, in
>> save_base
>> [Mon May 06 10:34:55.699401 2019] [:error] [pid 39822]
>>  update_fields=update_fields)
>> [Mon May 06 10:34:55.699403 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 185,
>> in send
>> [Mon May 06 10:34:55.699405 2019] [:error] [pid 39822]     response =
>> receiver(signal=self, sender=sender, **named)
>> [Mon May 06 10:34:55.699407 2019] [:error] [pid 39822]   File
>> "/home/geonode/geonode/geoserver/signals.py", line 74, in geoserver_pre_save
>> [Mon May 06 10:34:55.699409 2019] [:error] [pid 39822]
>>  charset=instance.charset)
>> [Mon May 06 10:34:55.699410 2019] [:error] [pid 39822]   File
>> "/home/geonode/geonode/geoserver/helpers.py", line 1053, in geoserver_upload
>> [Mon May 06 10:34:55.699412 2019] [:error] [pid 39822]     workspace =
>> cat.get_default_workspace()
>> [Mon May 06 10:34:55.699414 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/geoserver/catalog.py", line 876, in
>> get_default_workspace
>> [Mon May 06 10:34:55.699416 2019] [:error] [pid 39822]     ws.fetch()
>> [Mon May 06 10:34:55.699418 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/geoserver/support.py", line 174, in fetch
>> [Mon May 06 10:34:55.699420 2019] [:error] [pid 39822]     self.dom =
>> self.catalog.get_xml(self.href)
>> [Mon May 06 10:34:55.699425 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/geoserver/catalog.py", line 211, in
>> get_xml
>> [Mon May 06 10:34:55.699428 2019] [:error] [pid 39822]     response,
>> content = self.http.request(rest_url)
>> [Mon May 06 10:34:55.699430 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/httplib2/__init__.py", line 1572, in
>> request
>> [Mon May 06 10:34:55.699432 2019] [:error] [pid 39822]     (response,
>> content) = self._request(conn, authority, uri, request_uri, method, body,
>> headers, redirections, cachekey)
>> [Mon May 06 10:34:55.699434 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/httplib2/__init__.py", line 1319, in
>> _request
>> [Mon May 06 10:34:55.699436 2019] [:error] [pid 39822]     (response,
>> content) = self._conn_request(conn, request_uri, method, body, headers)
>> [Mon May 06 10:34:55.699438 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/httplib2/__init__.py", line 1254, in
>> _conn_request
>> [Mon May 06 10:34:55.699440 2019] [:error] [pid 39822]     conn.connect()
>> [Mon May 06 10:34:55.699442 2019] [:error] [pid 39822]   File
>> "/usr/lib/python2.7/site-packages/httplib2/__init__.py", line 1046, in
>> connect
>> [Mon May 06 10:34:55.699444 2019] [:error] [pid 39822]     raise
>> SSLHandshakeError(e)
>> [Mon May 06 10:34:55.699445 2019] [:error] [pid 39822] SSLHandshakeError:
>> [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:765)
>>
>>
>> Please help me to resolve the issue and let me know any other information
>> require further.
>>
>> Thanks&Regards,
>> Naresh.N
>>
>>
>>
>>
>> Thanks&Regards,
>>
>> Naresh
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/geonode-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20190507/0a1bbd48/attachment-0001.html>


More information about the geonode-users mailing list