GFDRR / geonode

GFDRR Lab GeoNode
https://www.geonode-gfdrrlab.org
GNU General Public License v3.0
2 stars 3 forks source link

Some datasets reference old IP address (45.55.174.20) #58

Closed stufraser1 closed 7 years ago

stufraser1 commented 7 years ago

Several records provide service URLs which often result unavailable due to host IP issue. E.g. The dataset with identifier da39df56-03f1-11e7-97d7-040146164b01 available at: http://www.geonode-gfdrrlab.org/catalogue/csw?outputschema=http%3A%2F%2Fwww.isotc211.org%2F2005%2Fgmd&service=CSW&request=GetRecordById&version=2.0.2&elementsetname=full&id=da39df56-03f1-11e7-97d7-040146164b01 provides several access information such as the following:

Web Map Service URL: http://45.55.174.20/geoserver/hazard/wms

JPEG Format: http://45.55.174.20/geoserver/wms?layers=hazard%3Aeuwatch_spei_uganda_r5&width=550&bbox=29.0%2C-2.0%2C36.0%2C5.0&service=WMS&format=image%2Fjpeg&srs=EPSG%3A4326&request=GetMap&height=550

Probably the problem seems to be related to the following IP: 45.55.174.20. Using the DNS (www.geonode-gfdrrlab.org) everything seems to work fine.

E.g. Replacing the IP with the DNS in the previous link, the JPEG file will be downloaded: https://www.geonode-gfdrrlab.org/geoserver/wms?layers=hazard%3Aeuwatch_spei_uganda_r5&width=550&bbox=29.0%2C-2.0%2C36.0%2C5.0&service=WMS&format=image%2Fjpeg&srs=EPSG%3A4326&request=GetMap&height=550

fvanderbiest commented 7 years ago

Indeed, it seems the metadata_xml column from base_resourcebase was not updated during the migration process.

fvanderbiest commented 7 years ago

On int:

UPDATE base_resourcebase SET metadata_xml = regexp_replace(metadata_xml,
'http://45.55.174.20', -- pattern text
'https://int.geonode-gfdrrlab.org', -- replacement text
'g');-- flags

On prod:

UPDATE base_resourcebase SET metadata_xml = regexp_replace(metadata_xml,
'http://45.55.174.20', -- pattern text
'https://www.geonode-gfdrrlab.org', -- replacement text
'g');-- flags