Unencrypted connection / Storage limit nearly reached

Hi there,
I’m self-hosting cozy. I’m running an official cozy-stack binary and I manage myself the cozy configuration, TLS and DNS. I can create an instance of photos, drive and settings, using “cozy-stack instances”. I can connect from browser and via cozy-drive. I can upload single files. However: the backup does not work. After starting it ends immediately, without showing any error.

As SMTP server I’m using mailhog, since I actually don’t want my cozy to send or receive e-mails.

I see in the logs following errors:
level=error msg=“cannot open the geodb: no such device” nspace=sessions
level=error msg=“Run: fork/exec : no such file or directory” nspace=jobs worker_id=sendmail/0
level=error msg=“Cannot generate HTML mail: fork/exec : no such file or directory” nspace=jobs worker_id=sendmail/0
level=error **msg=“error while performing job: unencrypted connection” nspace=jobs worker_id=sendmail/0

  1. Which of the errors above are relevant? Which ones are preventing the backup to work? What is this about the geodb? And about the HTML?
  2. Is the backup not working because of using mailhog as SMTP server? Is this not allowed? Is there a way to deactivate the e-mails altogether?
  3. Another thing: my cozy drive always shows “storage limit nearly reached” even if there is plenty of space in the storage directory. Why?

I’m stuck with this, any help or hint will be much appreciated.

Thanks and regards,


Do you use a standard certificate issued by a valid certificate authority, or a self-signed one/custom CA?

What’s the output of cozy-stack instance show <your-fqdn>, specially the disk_quota field.

  • I use let’s encrypt.
  • When I do cozy-stack instance show fqdn, there is no disk_quota field


How do you install your stack? With debian package or manually?
Which is the command you use for backup?

  • Manually. I downloaded the latest binary.
  • I try to start a backup in the Cozy Drive app on my phone (Settings -> launch backup)

Could you send a message from the contact form on the phone app?
We could fetch debug information with that.

I sent a “Leave Feedback” message from the Settings app in the Drive. Is this what you meant?
Text is “Storage limit nearly reached”.

How do you fetch debug information from that?

Thanks and regards

I just found one of the problems. After solving other issues, I was able to reproduce the same error (“Disk is full”) on the browser, when uploading a photo. Enabling developer mode I saw the nginx was returning a 413 error:
413 Request Entity Too Large

I changed the max_client_body_size on the nginx configuration and the error seems to be gone.

The backup does still not work. There is no error and it looks like it is working, however the folder is empty.


Could you send us a new feedback message? In the first you sent us, the photo backup was disabled because the application thought you had reached your storage limit.

Also, be aware of some limitations of the application:

  • it’s only able to backup your photos stored in the default location where your camera stores the files. If you moved your photos to another locations, the backup may not work;
  • we are aware of issues with some phone, like the Sony Xperia. Sony use a custom version of Android and the Cozy application is not able to access your photos on this phones.

Please also check you configure your httpd vhost correctly, specially for websocket.
Our nginx config is available here

I just sent a new feedback message. But I’m taking a look at your nginx config, thanks a lot.

Looks like now the backup startsn but the connexion is closed due to some timeout.

Could you have a look at the logs of Nginx? Do you see any request POST /files/…?Type=file&Name=… with a io.cozy.drive.mobile-… user agent?

I was able to see the POST requests and I also saw timeout errors. The hint with the websockets was good. I changed now the values of proxy_send_timeout, proxy_read_timeout and proxy_connect_timeout to 5200s (it was 60s). That was for sure one of the problems.

Now the errors are gone from the nginx logs and I see the POST requests, exactly in the form you wrote above. The backup starts and the counter (remaining photos) decreases, however there is still no photos on the storage.

Can the problem be related to the “enable user namespaces and set permanently” I see at end of the self-host documentation? I guess not, but I actually didn’t do that. What is that for?

Thanks and regards

Further analyse of the nginx logs show I’m getting a 499 (client closed connection). The issue might be the same as the one described here: android drive sync

So, what’s the status code of the answer? Is it 201? If so, it means the photo has been successfully stored on the server. Do you see the photos in the /Photos folder of the Drive application?

No, the status is 499 as I mentioned in the last comment. Nginx error code meaning Client Closed Connection. Issue with HTTP 2?

I don’t understand how the counter could decrease if the server send an error :-S

So, did you try to disable HTTP/2?

The counter decreases indeed… it was the same for the person who started the other thread.

Regarding HTTP/2 deactivation, I have to figure out how (I have a ngninx-ingress on a kubernetes cluster…)

YES! I managed to deactivate HTTP2 for the nginx ingress-controller. Now the backup is finally working :slight_smile:

Thank you very much for all your help, your prompt answers and your patience.

I understand that is not application related, but do you know the reason nginx has an issue with HTTP2?

A last question: once the backup started, the “stop backup” button does not work? Is that a known issue?

No, this is not a known issue. Thanks for reporting, we gonna have a look at this.

No. We don’t use NGinx but Haproxy, and have no issue with it. So I guess the HTTP2 configuration of Nginx needs some finetuning, but I’m not an expert.