Status failed when create project in self hosted qgis cloud

Hi everyone

I have installed in a ubuntu server qfieldcloud. But, when try create a project immediately i see status:

  • Status failed
  • Status code failed_process_projectfile

The report I get from the jobs is as follows:

{
  "container_exit_code": 0,
  "error": "HTTPConnectionPool(host='xxxxxxxxx.com', port=8000): Max retries exceeded with url: /api/v1/files/5e1541d4-5657-4b0a-a381-7b56cee130c0/?skip_metadata=1 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7c17527af0b0>: Failed to establish a new connection: [Errno 111] Connection refused'))",
  "error_class": "ConnectionError",
  "error_origin": "container",
  "error_stack": [
    "  File \"/usr/src/app/qfc_worker/utils.py\", line 673, in run_workflow\n    return_values = step.method(**arguments)\n                    ^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \"/usr/src/app/qfc_worker/utils.py\", line 326, in download_project\n    files = client.list_remote_files(project_id)\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \"/usr/local/lib/python3.12/dist-packages/qfieldcloud_sdk/sdk.py\", line 155, in list_remote_files\n    resp = self._request(\"GET\", f\"files/{project_id}\", params=params)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \"/usr/local/lib/python3.12/dist-packages/qfieldcloud_sdk/sdk.py\", line 815, in _request\n    response = self.session.send(request.prepare(), **session_params)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \"/usr/local/lib/python3.12/dist-packages/requests/sessions.py\", line 703, in send\n    r = adapter.send(request, **kwargs)\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
    "  File \"/usr/local/lib/python3.12/dist-packages/requests/adapters.py\", line 700, in send\n    raise ConnectionError(e, request=request)\n"
  ],

Can someone help me identify the problem?

Heya!

At the bottom of your project, you should see a file list. Did the files upload correctly? Are you able to download them manually?

Can you call the failed URL from your web browser?

Looks like your worker (which is actually processing your project) cannot reach your QFieldCloud application. From within your worker_wrapper container, try calling curl -v http://xxxxxxxxx.com:8000/api/v1/status/ to check if the app is reachable from within your Docker network.

Thanks for your reply!

1- I can see the uploaded files and download them manually.

But I’m not getting any projects in the Qfield application and I keep getting the status code failed_process_projectfile

2- If I request https://xxxxxxxxxx.com:8000/api/v1/status/, I get an error.

But If I request …….com/api/v1/status/, it works fine, but I get a storage error.

Is this a port issue?

Because the valid endpoint is https://xxxxxxxxxx.com/api/v1/ (without :8000)?

Update: Delete port :8000

Change Applied

File: /home/qfield/worker_wrapper/.env

Variable: QFIELDCLOUD_WORKER_QFIELDCLOUD_URL

Before: http(s)://myurl.com:8000/api/v1/

Now: https://myurl.com/api/v1/

Now it shows “OK” status and appears in the Qfield application.
The problem I’m having now is that I can’t download the project from Qfield.

And I’m still getting storage:error

Nice to see that you got the processing job to work!

I checked one of our production instances, and we also get the storage error on the status page for some reason. Users have been working with it for almost a year now without any issues, so I’m not sure what’s up with that. :thinking:

I don’t think it’s a storage issue when you can upload and download files, and the processing job finishes successfully.

Do you not see the project at all in QField, or do you get an error message when trying to download it?

Hi, thanks for your time!

So, even if “storage:Error” appears, it can still work? This error has nothing to do with not being able to download the project in qfield?

I can see the project, but I get an error downloading it.

I’ve been investigating, and it seems the problem might be that QFieldCloud is configured to use MinIO with endpoint_url=http://127.0.0.1:9000. This is STORAGE in /home/qfield/app/.env

Could this be the issue?

Yes, our instance appears to be fully functional despite the status page error.

From my experience, it’s unlikely to be a minIO connection issue if downloading manually works just fine, since the packager uses the same URLs to access your files.

Can you check if QFieldCloud creates a packaging job for your download attempt? Its logs could provide us with more insight into what is going on.

You can also view more detailed error logs in QField itself (but not as detailed as the job logs inside QFieldCloud).
After downloading the project failed, try opening a different project already available locally (e.g. one of the example projects). Then click the 3 dots above the map legend and select Message Log. The log is preserved between project loads unless you manually clear it.

Qfield Cloud doesn’t create a package process. The last one created was when I created the project, not when I tried to download from the Qfield app. The log I get in the app is the following. But I’m not entirely sure where the problem is coming from:

Downloading project `53155430-7065-41b7-8f46-15bb1fc85e76` finished with an error: Error retrieving the latest package data.

[QF/invalid_job] Invalid job…<br>[HTTP/400] https://myurl.com/api/v1/packages/53155430-7065-41b7-8f46-15bb1fc85e76/latest/?skip_metadata=1 Error server.{"code":"invalid_job","message":"Invalid job","debug":{"view":"","args":[],"kwargs":{"project_id":"53155430-7065-41b7-8<br>{"code":"invalid_job","message":"Invalid job","debug":{"view":"","args":[],"kwargs":{"project_id":"53155430-7065-41b7-8f46-15bb1fc85e76"},"request":"","detail":"Empty project package."}}<br>Error transferring https://myurl.com/api/v1/packages/53155430-7065-41b7-8f46-15bb1fc85e76/latest/?skip_metadata=1 - server replied: Bad Request

I’m still investigating

That’s interesting, as QField seems to think that a job has been created and even has a job ID for the lookup :thinking:

Do you see any relevant error messages in the logs of either the app container or the worker wrapper container?

Unfortunately, not an issue I have seen before. I’ll still try my best to help if you find any more leads and share them!