Error: 140E197: SSL_shutdown while in init

Hello,

My friend has a NextCloud server for friends and family inside his own network infrastructure. I am the only user that is experiencing issues, although I am also possibly the most active user with the most data (~300GB).

Until a couple of months ago everything was running smoothly however, at some (sadly) undetermined point I started to get various error messages about connectivity. I was happy letting my VM run in the background and only happened to check it for something unrelated. By far the most common error is:

Error while reading: error:140E197:SSL routines:SSL_shutdown:shutdown while in init .

Neither of us changed any settings that we can think of. I’m running the NextCloud client on a WindowsServer 2019 Standard VM. It seems I can sometimes upload a handful of files and then this error occurs. Over the past few weeks, in dribs and drabs, I’ve been able to upload a few GB of data. Other error messages (much, much less frequently) are fairly standard "no connection found to " which resolve themselves.

I have one VM that runs open media vault, this creates a samba share. The Windows Server VM that NextCloud is running, creates a mapped network drive (M:) and this is where I sync my files from.

Here are some things I have tried:

  • Latest stable client version (2.6.5)
  • Latest experimental client version (I think it was 2.7.x?)
  • Previous versions (I can’t remember off hand which, but I used those suggested in other forum posts)
  • Disabling firewall entirely
  • Running on main desktop machine (Windows 10 1809) with the same mapped network drive
  • Changing permissions on mapped network drive to allow everyone access
  • Server side, recreating the user

I can log-in and use the web version just fine.

I’m running out of things to try, at the very least I’m hoping someone in the know could point me and my friend running his server down the right path.

Thanks for reading,
nixius

Just a quick bump.

I’ve done a lot of research around this error and come up blank, so really hoping someone has even a vague idea what I can do to resolve this or open up some doors.

nixius

I guess I will try and grab the code out and see what I can do myself. I was hoping for a quick win!

Check the log file of the client and report relevant messages here.

This I don’t understand …

Please tell us about your server environment.

Do I need to change any settings for additional logging (Currently hitting F12 + Debug logging)

I run OpenMediaVault on a VM. This creates a samba share. I only have one user, which is an admin.

I have a separate VM that I use for backups + maintenance, it runs windows server 2019 and maps the samba share to M:.This VM is where NextCloud client runs.

Inside Windows, you can right click on a folder, click security tab and change permissions on that folder for users. I thought maybe somewhere there was issues with access for my user, but nothing I did made a difference (all users had read/write access and I changed all to Full Control). This was more me clutching at straws than anything I particularly understand, if I’m honest.

I have a ‘normal’ home windows 10 (v1809) that I use as my main desktop machine. I also have this mapped to the same Samba Share but to do things such as consume media (I map a drive to a specific folder on the samba share for music, one for documents etc); I tried running Nextcloud client from here instead of Windows Server VMand it had the same issue. I mentioned this to lend some idea that it’s less likely to be a Windows OS installation issue.

Home Network
|- Desktop PC - Win10, play games, browse web etc
|- Laptop PC - Win10, play games, browse web etc
|- Server with 6TB Raid etc hosting VMWare
|-|- VM1 - OpenMediaVault with Samba Share called Files
|-|- VM2 - Backup + Maint, Windows Server 2019, Maps Files/Music as M:
|-|- VM3 - Ubuntu, Websites
|-|- … etc

I hope I’m articulating myself better, I appreciate your time.

Here is an excerpt from the log. Before this, it’s mostly just more of the same ‘walking’ the directories. Directly after, it starts a new sync. This is without Debug Logging.

I’ve tried to cut down the fluff to make the logs more legible
2020-08-27 15:03:00:ms
i info
nc = nextcloud

419[i nc.sync.networkjob.lscol ]: LSCOL of QUrl(“https://$SERVERURL/remote.php/dav/files/$MYUSERNAME_7375/Music/TO_SORT/Rock45”) FINISHED WITH STATUS “OK”
419[i nc.sync.csync.updater ]: <= Closing walk for TO_SORT/Rock45 with read_from_db 0
419[i nc.sync.csync.updater ]: <= Closing walk for TO_SORT with read_from_db 0
419[i nc.sync.csync.updater ]: Database entry found for nanobii, compare: 1598274630 <-> 1598274630, etag: 5f43bc465fe23 <-> 5f43bc465fe23, inode: 0 <-> 110166267, size: 0 <-> 0, perms: fd <-> fd, checksum: <-> , ignore: 0, e2e:
419[i nc.sync.csync.updater ]: Reading from database: nanobii
419[i nc.sync.csync.updater ]: file: nanobii, instruction: INSTRUCTION_NONE <<=
419[i nc.sync.csync.updater ]: 1 entries read below path nanobii from db.
419[i nc.sync.csync.updater ]: Database entry found for souKo, compare: 1598294096 <-> 1598294096, etag: 5f4408509fd1a <-> 5f4408509fd1a, inode: 0 <-> 119799864, size: 0 <-> 0, perms: fd <-> fd, checksum: <-> , ignore: 0, e2e:
419[i nc.sync.csync.updater ]: Reading from database: souKo
419[i nc.sync.csync.updater ]: file: souKo, instruction: INSTRUCTION_NONE <<=
419[i nc.sync.csync.updater ]: 1 entries read below path souKo from db.
419[i nc.sync.csync.updater ]: <= Closing walk for with read_from_db 0
419[i nc.sync.csync.csync ]: Update detection for remote replica took 12.349 seconds walking 32521 files
419[i nc.sync.engine ]: #### Discovery end #################################################### 228715 ms
419[i nc.gui.activity ]: Activity/Notification/Error successfully dismissed: “Operation canceled”
419[i nc.gui.activity ]: Trying to remove Activity/Notification/Error from view…
419[i nc.gui.activity ]: Activity/Notification/Error successfully removed from the list.
419[i nc.gui.activity ]: Updating Activity/Notification/Error view.
435[i nc.gui.activity ]: Activity/Notification/Error successfully dismissed: “Error while reading: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init”
435[i nc.gui.activity ]: Trying to remove Activity/Notification/Error from view…
435[i nc.gui.activity ]: Activity/Notification/Error successfully removed from the list.
435[i nc.gui.activity ]: Updating Activity/Notification/Error view.
435[i nc.gui.activity ]: Activity/Notification/Error successfully dismissed: “Connection closed”
435[i nc.gui.activity ]: Trying to remove Activity/Notification/Error from view…
435[i nc.gui.activity ]: Activity/Notification/Error successfully removed from the list.
435[i nc.gui.activity ]: Updating Activity/Notification/Error view.
450[i nc.gui.activity ]: Activity/Notification/Error successfully dismissed: "Server replied “502 Bad Gateway” to “PUT https://$SERVERURL/remote.php/dav/uploads/$MYUSERNAME_7375/2101529852/00000001"”
450[i nc.gui.activity ]: Trying to remove Activity/Notification/Error from view…
450[i nc.gui.activity ]: Activity/Notification/Error successfully removed from the list.
450[i nc.gui.activity ]: Updating Activity/Notification/Error view.
450[i nc.gui.activity ]: Activity/Notification/Error successfully dismissed: “Error while reading: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init”
450[i nc.gui.activity ]: Trying to remove Activity/Notification/Error from view…
450[i nc.gui.activity ]: Activity/Notification/Error successfully removed from the list.
450[i nc.gui.activity ]: Updating Activity/Notification/Error view.

I’m looking at that time, 228s (just under 4 minutes). Some kind of timeout on the connection perhaps? Sometimes this works, and sometime sit doesn’t. Over the past few months I’ve got up to 198GB now of 300GB.