qwc-services / qwc-docker

Docker containers for qwc-services
MIT License
48 stars 36 forks source link

Problem with the "Administration tool" #53

Closed LP-Sonic closed 1 year ago

LP-Sonic commented 1 year ago

Hello,

it would be very nice if someone could help me with problems with the administration tool.

As soon as I click on the "Generate service configuration"-button on the corresponding "QWC Admin" webfrontend, I still get errors.

As soon as the download of the project settings begins, the following error messages are displayed:

„CRITICAL: Could not get GetProjectSettings from http://localhost:8001/ows/qwc_demo: HTTPConnectionPool(host='localhost', port=8001): Max retries exceeded with url: /ows/qwc_demo?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetProjectSettings&CLEARCACHE=1 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) WARNING: Could not get capabilities for /ows/qwc_demo INFO: Reading 'qwc_demo.qgs'“

I have the impression that the web server for the QGIS server is refusing the connection. Do you have an idea what it could be?

I would be very grateful for your help. I have attached the web output of the administration tool to the ticket. admintool_output

manisandro commented 1 year ago

Looks like a misconfiguration of default_qgis_server_url in tenantConfig.json. In the docker-compose environment it should read

"default_qgis_server_url": "http://qwc-qgis-server/ows/",

and the config generator output should contain lines like

INFO: Downloading GetProjectSettings from http://qwc-qgis-server/ows/XXXX
LP-Sonic commented 1 year ago

Hello Mr. Mani,

thank you for your help. Thanks to your help, I now understand the function of the "qwc-api-gateway", which serves as a kind of central exchange. In addition, I was not aware that Docker containers can be addressed by aliases or names.

If I understand correctly, the Docker-Composition „qwc-services/qwc-docker“ should actually work right out of the box.

However, I still have a problem. After I have reset the configuration to the original state, I only see the following after pressing the "Generate service configuration" button: "An error occurred" (see also attached screenshot).

qwc_admin

Error messages are output in the logs for the docker containers, which you can see in the attached screenshot.

screenshot_docker_logs

I would be very grateful for any help in this matter.

manisandro commented 1 year ago

Yes, qwc-docker should work out-of-the-box. Could you try with a fresh clone of this repo and see if you still encounter any issues?

LP-Sonic commented 1 year ago

Hello Mr. Mani,

I did the complete installation again.

So I first removed the containers, images, network with the following command: docker system prune -a –volumes

Then I also deleted the directory of the files with the Docker container descriptions and ran the installation again.

After pressing the "Generate service configuration" button, an error occurs again. The Docker log output can be found in the following screenshot:

failure_configurationtool

Does the error possibly only occur because the Internet address https://gibs.earthdata.nasa.gov/... cannot be reached? Or is there still a configuration error?

By the way, the web edition only shows the following:

webausgabe

manisandro commented 1 year ago

Yes the core issues seems to be that https://gibs.earthdata.nasa.gov/ is unreachable, the rest is insufficient error handling within the config generator. https://gibs.earthdata.nasa.gov/wmts/epsg3857/best/1.0.0/WMTSCapabilities.xml is reachable here, so perhaps an issue with your local network?

LP-Sonic commented 1 year ago

Hello Mr. Mani,

I also think it's the internet connection. Our internet access is provided via a proxy server. The internet requests don't seem to be sent to the proxy server from the QGIS server.

However, I have modified the container file "yml" so that the QGIS server uses the proxy server to access the internet (see screenshot).

proxy_server_env

From the following command you can see that the container for the QGIS server uses the proxy in the curl request.

qgis_server_anfrage

It may of course be that the QGIS Server service still doesn't use the proxy server because the environment variable is ignored. Do you have any idea how I can ensure the use of the proxy server?

manisandro commented 1 year ago

There are some hints here https://issues.qgis.org/issues/16096, in particular lower-case vs upper-case http_proxy.

LP-Sonic commented 1 year ago

Hello Mr. Mani,

that was the solution! I wouldn't have figured it out without your help, thank you ;)

Thank you also for the competent and quick help. I am happy!

You are welcome to close the ticket.

manisandro commented 1 year ago

Glad you solved the issue