-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetFeatureInfo fails on 502 Bad Gateway #1288
Comments
update: I just running the mapstore2 without a mapstore setup, and I am reading up on the docs, so perhaps the localConfig.json is correct, but I am missing a running proxy.... such as the http-proxy... localConfig.json
|
When running in devel mode (npm start) you need a running proxy to access external services via GetFeatureInfo. For example if you run Tomcat on localhost, port 8080: devServer: { |
Thank you for your quick reply! I'm pretty sure that is the issue. Since the WMS calls were working I had thought the query should also work. |
Still having issues but getting closer.
See the request/reponse below (the second modified to :8080 vice :8081). I notice that even though the webpack.config.js was modified to :8080 then header request says :8081. Tomcat is running on port 8080. I'm not sure if the request is correct, if my configuration is setup correctly, or if the mapstore\proxy needs additional setup info. I've browsed the mapstore wiki but haven't gleaned any clues. I haven't tried debugging the mapstore/proxy yet. Thank you for the help! Request (Chrome debugger, reformatted):
returns HTTP Status 404 - /http_proxy/proxy/type Status report message /http_proxy/proxy/ description The requested resource is not available. Apache Tomcat/8.5.8when I modify the URL from 8081 to 8080 and run curl:
returns reponse: HTTP Status 403 - Request Type is not among the ones allowed for this proxytype Status report message Request Type is not among the ones allowed for this proxy description Access to the specified resource has been forbidden. Apache Tomcat/8.5.8 |
Are you sure you are using a war from MapStore2? The /http_proxy/proxy/ path looks like the one used by MapStore1, also the 403 error looks like generated by a misconfigured (or not at all configured) proxy. The MapStore2 standard proxy should allow those kind of requests. Are you using this in your webpack.config.js ?
|
Okay, almost there... I modified the config.json for the mapstore\proxy running in tomcat, to add the same layers present in the client. The webpack.config.js has the values you specified above, but it looks like the translation is not working correctly. The request is: and the response is 404 as above. But when changed 8081 to 8080, results were returned!
So it appears that even though the webpack.config.js (running use npm start - there is another webpack.config.js at \Mapstore2 - which was also updated), the request is not formatted correctly. webpack.config.js:
|
Hi, replace rewrite: rewriteUrl("/http_proxy/proxy$1"), with rewrite: rewriteUrl("/mapstore/proxy$1"), |
Its working! Thanks for the help! Recommend closing this issue. |
Loaded a WMS map layer ("geonames") but when using the Identify plug-in attempted a GetFeatureInfo (via MapInfo.js) and via axios that generated an axios exception with status: 502 statusText: Bad Gateway.
When I execute a curl command (minus the mapstore proxy), the request works. I'm not sure how to proceed in debugging this further (peer into axios?) and perhaps look into the proxy setup.
Here are a few artifacts:
Capturing the XHR header from chrome debugging:
This worked: running via curl (minus proxy part):
And returned response (plain/text):
Thanks ahead of time!
The text was updated successfully, but these errors were encountered: