Proxy isn't used when validating Pre-defined Atom
Description
Proxy isn't used when validating Pre-defined Atom. It could be the case for other validations as well.
How to reproduce
- Download inspire-validator ZIP file
- Extract it's contents
- Edit
etf.webapp.base.url- Open the .war file with an archive tool that supports in place edit
- Modify etf.webapp.base.url under "WEB-INF/classes/etf-config.properties"
- Edit
validator/js/config.js- Open file with a text editor
- Update URL to match those of the production host
- Edit
validator/js/config.jsinsideui.zip- Open ui.zip with an archive tool that supports in place edit
- Go to
validator/js - Open
config.jsfor edit - Update URL to match those of the production host
- Build and push the image to your docker repo
- Deploy/run the container to production host
- The container fails to download
functx, even though we have specified http/https proxy as environment variable for the container. We can verify env-vars are working by using curl inside the container. However this is an issue we can get past by downloadingfunctxourselves:- Download it yourself from https://files.basex.org/modules/expath/functx-1.0.xar
- unzip it inside the container under
config/ds/db/repo/http-www.functx.com-1.0
- Restart the container to make sure it successfully reads the functx package
- Run tcpdump on production host (outside the container)
- tcpdump -i ens192 host inspire.msb.se
- Run a validation
- Browse http://productionhost.domain:8090/validator/test-selection/index.html
- Fill out the form:
- Select the INSPIRE resource you would like to test
-
Download Service
-
- Select the Download Service type
-
Pre-defined Atom
-
- Service URL
- https://inspire.msb.se/nedladdning/MSB_TopAtomFeed_APSFR.xml
- Select the INSPIRE resource you would like to test
- The test will fail pretty much immediately
- Check console log in your browser and you will see a stacktrace mentioning connection refused (see attached JSON)
- Running tcpdump on the production host will show that the traffic to inspire.msb.se wasn't sent through configured proxy
We can replicate the connection refused with the following URL:
- https://inspire.msb.se/nedladdning/MSB_TopAtomFeed_APSFR.xml
- https://geodata.naturvardsverket.se/atom/inspire/am/am_omraden_sarskilda_restriktioner_serviceFeed.xml
Let me know if you need any additional information
Versions/software
- Docker Community - 20.10.18
- helpdesk-validator 2022.3
- Red Hat Enterprise Linux release 8.6
Here is the full stacktrace for the error attachment-connection_refused.txt
Dear @GISClaes,
we will analyze your problem and let you know if more information is needed.
Thanks for looking into this issue @fabiovinci . Has there been any progress? let me know if there is anything I could do/try to help you along with your analysis.
Dear @GISClaes
Apologies for the delayed response. We are unable to replicate the issue you've encountered due to a lack of information regarding the proxy configuration utilized on this validator instance.
The inability of this instance to access https://files.basex.org/modules/expath/functx-1.0.xar, coupled with the connection error, suggests that the proxy may be restricting access to certain URLs required by the validator.
Additionally, there might be an issue with the configuration of URLs either in WEB-INF/classes/etf-config.properties or validator/js/config.js.
To assist you further with resolving this issue, could you kindly provide us with more information about the environments being used?
Thank you for your understanding.
Regards,