#26 closed defect (fixed)
404 Error with Qgis Add WMS Layer but valid response in web browser
Reported by: | Owned by: | g_j_m | |
---|---|---|---|
Priority: | minor: annoyance | Milestone: | |
Component: | WMS | Version: | Trunk |
Keywords: | Cc: | ||
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
I am getting a 404 Page not found response from a WMS server when using Qgis (svn revision 5083) on Debian unstable However, when I plug the same URL, copied from the Qgis error dialog box into my web browser(Konqueror) I get a valid response, returning the capabilities xml data. The problem has also been replicated by Brendan Morley (Firefox) Below is the debugging output...................
Any ideas why ?
QgisApp::addWmsLayer: about to addRasterLayer QgsSpatialRefSys::createFromEpsg with 4326 QgsSpatialRefSys::openDb path = /usr/share/qgis/resources/srs.db Projection has angular units of degree QgsMapCanvas::drawContents QgsServerSourceSelect::serverConnect: Connection info: 'http://www.nztopoonline.linz.govt.nz/wmsconnector/com.esri.wms.Esrimap?ServiceName=nztopo_wms&'. QgsProviderRegistry::getRasterProvider: Library name is /usr/lib/qgis/wmsprovider.so Debug: qgsproviderregistry.cpp:343 getProvider, Loaded data provider library Debug: qgsproviderregistry.cpp:344 getProvider, Attempting to resolve the classFactory function Debug: qgsproviderregistry.cpp:351 getProvider, Getting pointer to a dataProvider object from the library QgsWmsProvider: constructing with uri 'http://www.nztopoonline.linz.govt.nz/wmsconnector/com.esri.wms.Esrimap?ServiceName=nztopo_wms&'. baseUrl = http://www.nztopoonline.linz.govt.nz/wmsconnector/com.esri.wms.Esrimap?ServiceName=nztopo_wms& QgsWmsProvider: exiting constructor. Debug: qgsproviderregistry.cpp:363 getProvider, Instantiated the data provider plugin provider name: 0x81a9d92 QgsWmsProvider::supportedLayers: Entering. QgsWmsProvider::retrieveServerCapabilities: entering. QgsHttpTransaction: constructing. QgsHttpTransaction: exiting constructor. QgsHttpTransaction::getSynchronously: Entered. QgsHttpTransaction::getSynchronously: Using 'http://www.nztopoonline.linz.govt.nz/wmsconnector/com.esri.wms.Esrimap?ServiceName=nztopo_wms&SERVICE=WMS&REQUEST=GetCapabilities'. Warning: QgsHttpTransaction::getSynchronously: qurl.host() is 'www.nztopoonline.linz.govt.nz'. QgsHttpTransaction::getSynchronously: Starting get with id 1. QgsHttpTransaction::getSynchronously: Setting httpactive = TRUE QgsHttpTransaction::dataStarted with ID 1. QgsHttpTransaction::dataStateChanged to 2.
An attempt to connect to the host is in progress.
QgsHttpTransaction::dataStateChanged to 3.
The client is sending its request to the server.
QgsHttpTransaction::dataStateChanged to 4.
The client's request has been sent and the client is reading the server's
response. QgsHttpTransaction::dataHeaderReceived: statuscode 404, reason 'Not Found', content type: . QgsHttpTransaction::dataStateChanged to 5.
The connection to the host is open, but the client is neither sending a
request, nor waiting for a response. QgsHttpTransaction::dataFinished with ID 1. QgsHttpTransaction::dataFinished - no error. QgsHttpTransaction::getSynchronously: Setting httpactive = FALSE QgsHttpTransaction::getSynchronously: Response received. QgsHttpTransaction::getSynchronously: Processing an error 'WMS Server responded unexpectedly with HTTP Status Code 404 (Not Found)'. QgsHttpTransaction: deconstructing. QgsWmsProvider::errorString: returning 'WMS Server responded unexpectedly with HTTP Status Code 404 (Not Found) Tried URL: http://www.nztopoonline.linz.govt.nz/wmsconnector/com.esri.wms.Esrimap?ServiceName=nztopo_wms&SERVICE=WMS&REQUEST=GetCapabilities'. QgsMapCanvas::drawContents QgsMapCanvas::drawContents
Change History (14)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Here is a link to the information page for the serverhttp://www.nztopoonline.linz.govt.nz/technicalusers/webservices.htm Unfortuately I do not know the webmaster.
Phil
comment:3 by , 18 years ago
Milestone: | → Version 0.8 Release |
---|
comment:4 by , 18 years ago
This is just to confirm the problem could be replicated with SVN r5232 here
comment:5 by , 18 years ago
Owner: | changed from | to
---|---|
Platform: | Debian → All |
Platform Version: | unstable |
Version: | → HEAD |
If one telnets to www.nztopoonline.linz.govt.nz, port 80 and types:
GET /wmsconnector/com.esri.wms.Esrimap?ServiceName=nztopo_wms&SERVICE=WMS&REQUEST=GetCapabilities
it returns the capability info as expected. tcpdump reports that Qgis is producing pretty much the same thing. I've emailed linz asking for some help...
comment:6 by , 18 years ago
Status: | new → assigned |
---|
comment:7 by , 18 years ago
As a workaround I have installed Mapserver, created a WMS Server using Mapserver. Qgis happily onnects to the Mapserver WMS server which connects to http://www.nztopoonline.linz.govt.nz/wmsconnector/com.esri.wms.Esrimap?ServiceName=nztopo_wms& for the map data.
Phil
comment:8 by , 18 years ago
The same problem has been reported in ticket #102, although with a different wms service. However both of the servers appear to be an esri product.
comment:9 by , 18 years ago
Fixed in svn r5355. That commit resolves the immediate 404 error, but I can't seem to get any images from the server.
Problem was that some wms servers only seem to accept url's without the http://web.address.net bit. Firefox appears to strip the host off before sending the request which is why the same URL worked in Firefox but not qgis.
comment:10 by , 18 years ago
With the nztopo wms server, selecting any layer just returns an image that is completely transparent.
The wms server mentioned in ticket #102 works now.
comment:11 by , 18 years ago
The problem with qgis viewing data from the nztopo wms server now appears to be with the wms server sending inconsistent srs and bounding box information in response to a GetCapabilities request. However, since mapserver appears to work fine (see message above), there may be a way to work around the problem with nztopo.
Since this is a different problem to the original subject of this ticket, I'm closing this ticket and opening another (#103).
comment:12 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:13 by , 17 years ago
Awaiting user input: | unset |
---|---|
Must Fix for Release: | → No |
Response via mailing list - copied here
Hi Phil,
I can reproduce the behaviour - rather odd really. The only thing I can think of is that that WMS server is only accepting connections from certain HTTP User-Agents. I could get to the URL via my Firefox.
Do you happen to be friendly with the webmaster of the WMS server? Perhaps we can see if the URLs (QGIS vs. Firefox) really are coming in the same to the WMS server.
Also, could you report this issue formally via http://svn.qgis.org/trac/newticket - This gives me a better chance of not forgetting about your issue.
Thanks, Brendan