Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: FreeBSD Host Not Found once downloads of files have started #6024

Open
5 of 8 tasks
jdgwf opened this issue Sep 5, 2023 · 21 comments
Open
5 of 8 tasks

[Bug]: FreeBSD Host Not Found once downloads of files have started #6024

jdgwf opened this issue Sep 5, 2023 · 21 comments
Labels
bug confirmed bug approved by the team Prio: high

Comments

@jdgwf
Copy link

jdgwf commented Sep 5, 2023

⚠️ Before submitting, please verify the following: ⚠️

Bug description

Everything works as expected until downloading of selected synced files have started. Suddenly a "host not found" error appears on the client and stop the sync entirely.

Server works great with various Linux and Mac NextCloud Desktop clients.

Screenshot_20230905_021827

Steps to reproduce

Open NextCloud desktop
Sign into remote server
Select all and/or a few few drectories
Comparison of files needed to download works
After a while of downloading files error pops up - rarely for the same file.

Expected behavior

Syncing of files as on the Mac, Windows, and Linux cliens.

Which files are affected by this bug

Random

Operating system

Linux

Which version of the operating system you are running.

FreeBSD 13.2

Package

Compiled it myself

Nextcloud Server version

25.0.10

Nextcloud Desktop Client version

Version 3.6.4 (FreeBSD)

Is this bug present after an update or on a fresh install?

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

  • Default internal user-backend
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Nextcloud Server logs

{"reqId":"nSoN4NqWIPboxnB0IopY","level":0,"time":"2023-09-05T12:25:30+00:00","remoteAddr":"72.182.154.137","user":"jeff","app":"music","method":"PROPFIND","url":"/remote.php/dav/files/jeff/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.1.1-2+deb11u1 (Nextcloud)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"CwmIaSwpTY8mygZEIFwa","level":0,"time":"2023-09-05T12:25:33+00:00","remoteAddr":"137.83.19.152","user":"jeff","app":"music","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:109.0) Gecko/20100101 Firefox/117.0","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"PU1WkH7oGLsOdxdH5d5s","level":0,"time":"2023-09-05T12:25:40+00:00","remoteAddr":"137.83.19.152","user":"jdgordon","app":"music","method":"PROPFIND","url":"/remote.php/dav/files/jdgordon/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.9.3git (build 17174) (Nextcloud, osx-19.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"B7qpHK0rc0xuok2xNqZn","level":0,"time":"2023-09-05T12:25:41+00:00","remoteAddr":"72.182.154.137","user":"jeff","app":"music","method":"PROPFIND","url":"/remote.php/dav/files/jeff/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud, ubuntu-6.2.0-27-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"DYfVMDpAI2cSvE5LHTXw","level":0,"time":"2023-09-05T12:25:41+00:00","remoteAddr":"137.83.19.152","user":"jdgordon","app":"music","method":"GET","url":"/ocs/v2.php/apps/user_status/api/v1/user_status?format=json","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.9.3git (build 17174) (Nextcloud, osx-19.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"rNxy3hOWmsGivP7Qq7Ms","level":0,"time":"2023-09-05T12:25:41+00:00","remoteAddr":"137.83.19.152","user":"jdgordon","app":"music","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.9.3git (build 17174) (Nextcloud, osx-19.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"G7VYk7mGla8ubfLESrzZ","level":0,"time":"2023-09-05T12:25:46+00:00","remoteAddr":"72.182.154.137","user":"jeff","app":"music","method":"PROPFIND","url":"/remote.php/dav/files/jeff/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.1.1-2+deb11u1 (Nextcloud)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"3nplAcnkeeep0bGbsVGV","level":0,"time":"2023-09-05T12:25:47+00:00","remoteAddr":"137.83.19.152","user":"jeff","app":"music","method":"PROPFIND","url":"/remote.php/dav/files/jeff/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud, ubuntu-6.2.0-27-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"MH6NSspeT7wWMMcKQqVh","level":0,"time":"2023-09-05T12:25:54+00:00","remoteAddr":"72.182.154.137","user":"jeff","app":"music","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.1.1-2+deb11u1 (Nextcloud)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"k95L0cwaOl6wqi4jRF7w","level":0,"time":"2023-09-05T12:26:02+00:00","remoteAddr":"72.182.154.137","user":"jeff","app":"music","method":"PROPFIND","url":"/remote.php/dav/files/jeff/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.1.1-2+deb11u1 (Nextcloud)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"XUu6eSQVnCB0upo55374","level":0,"time":"2023-09-05T12:26:03+00:00","remoteAddr":"137.83.19.152","user":"jeff","app":"music","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:109.0) Gecko/20100101 Firefox/117.0","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"7s8cFHrXjpWpoqPkEiUR","level":0,"time":"2023-09-05T12:26:11+00:00","remoteAddr":"137.83.19.152","user":"jdgordon","app":"music","method":"PROPFIND","url":"/remote.php/dav/files/jdgordon/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.9.3git (build 17174) (Nextcloud, osx-19.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"WII4C3u0zxKhBVKZXWbd","level":0,"time":"2023-09-05T12:26:11+00:00","remoteAddr":"72.182.154.137","user":"jeff","app":"music","method":"PROPFIND","url":"/remote.php/dav/files/jeff/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud, ubuntu-6.2.0-27-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"JugjSVsBV4U8Zl220wbP","level":0,"time":"2023-09-05T12:26:11+00:00","remoteAddr":"72.182.154.137","user":"jeff","app":"music","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud, ubuntu-6.2.0-27-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"vaDI5chKULAHSSPMXAIU","level":0,"time":"2023-09-05T12:26:11+00:00","remoteAddr":"72.182.154.137","user":"jeff","app":"music","method":"GET","url":"/ocs/v2.php/apps/user_status/api/v1/user_status?format=json","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud, ubuntu-6.2.0-27-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"yvO8S1FXr1N8Z5jNjsQy","level":0,"time":"2023-09-05T12:26:16+00:00","remoteAddr":"72.182.154.137","user":"jeff","app":"music","method":"PROPFIND","url":"/remote.php/dav/files/jeff/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.1.1-2+deb11u1 (Nextcloud)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"WBPZvOqVaP1maciHEoJs","level":0,"time":"2023-09-05T12:26:17+00:00","remoteAddr":"137.83.19.152","user":"jeff","app":"music","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud, ubuntu-6.2.0-27-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"Zlm5A6QKOirR6doZoGVR","level":0,"time":"2023-09-05T12:26:17+00:00","remoteAddr":"137.83.19.152","user":"jeff","app":"music","method":"GET","url":"/ocs/v2.php/apps/user_status/api/v1/user_status?format=json","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud, ubuntu-6.2.0-27-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}
{"reqId":"9x2dkfI8gcpk6u8GxMcT","level":0,"time":"2023-09-05T12:26:17+00:00","remoteAddr":"137.83.19.152","user":"jeff","app":"music","method":"PROPFIND","url":"/remote.php/dav/files/jeff/","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Linux) mirall/3.7.3git (Nextcloud, ubuntu-6.2.0-27-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.10.1","data":{"app":"music"}}

Additional info

Nextcloud Client Debug Logs
nextcloud-host-not-found.zip

@jdgwf
Copy link
Author

jdgwf commented Sep 5, 2023

I did turn off the Music app on the server which is giving the Deprecated notice in the server log, but this problem remains. I didn't expect it to matter, but it was worth a shot.

@jdgwf
Copy link
Author

jdgwf commented Sep 5, 2023

It's appear that I'm not the only one having this issue:

Nextcloud Help
FreeBSD Bugs

@manfredu
Copy link

manfredu commented Sep 5, 2023

I face the same issue on FreeBSD 13.2 and nc client 3.9.3. The issue occured also with previous versions of FreeBSD and the nextcloud desktop client, it never worked for me.

My workaround is to use nextcloudcmd, which does not show this problem.

Windows, Linux and Mac clients on the same network have no issues.

@pappapo
Copy link

pappapo commented Sep 7, 2023

I have same problem since at least four years across several versions of FreeBSD and NC. Errors identical to the ones supplied earlier in this thread.

"QNetworkReply::HostNotFoundError" is rather obvious but question remains where to look, maybe someone with Qt knowledge can advise?

@mgallien
Copy link
Collaborator

mgallien commented Sep 7, 2023

@jdgwf thanks for including logs
from them, I fail to get an understanding of the issue
not sure how specific the freebsd networking stack is but it really looks like a network issue
did you check that other software could reach the nextcloud server when the error occur ?
what if you immediately restart the client when there is a network error ?
I really recommend getting an updated version as we are not going to fix bugs in the stable-3.6 branch

@pappapo
Copy link

pappapo commented Sep 7, 2023

All other software can reach the server at any time no other errors from any other application.
The web interface is always accessible at any time as well, DNS is flawless and so is the network connection.
The problen IS specific to NC. The command line client also works at any time no errors. Restarting the client makes it work for a random period of time and then stop again. Sometimes it wakes up again, sometimes not.

@manfredu
Copy link

manfredu commented Sep 7, 2023 via email

@jdgwf
Copy link
Author

jdgwf commented Sep 9, 2023

My apologies for not getting g back in time. I may have mistyped my client version. It was a chemo day for me. My experiences are exactly as above. The server and dns are perfect with other methods and apps, from curl to chrome.

I'll be testing with FreeBSD 14 next week or weekend.

My gut is telling me it's a threading issue between the API and the OS

@jdgwf
Copy link
Author

jdgwf commented Sep 20, 2023

This problem persists in a fresh install of FreeBSD 14.0-BETA2

FreeBSD freebsd140 14.0-BETA2 FreeBSD 14.0-BETA2 #0 releng/14.0-n265096-dfd44f2f0143: Fri Sep 15 05:46:35 UTC 2023 [email protected]:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

jeff@freebsd140 ~ $ nextcloud --version
Nextcloud version 3.9.3git
Git revision 0aec14efd00d33d124bba33875ffe79aadd01a27
Using Qt 5.15.8, built against Qt 5.15.8
Using Qt platform plugin 'xcb'
Using 'OpenSSL 3.0.10 1 Aug 2023'
Running on FreeBSD 14.0-BETA2, x86_64

image

@jdgwf
Copy link
Author

jdgwf commented Sep 22, 2023

The same issue persists in 14.0-BETA2

@evilham
Copy link

evilham commented Oct 2, 2023

FWIW, this is roughly the line seen with nextcloud --logdebug:

2023-10-02 13:12:34:108 [ warning nextcloud.sync.networkjob /wrkdirs/usr/ports/deskutils/nextcloudclient/work/desktop-3.9.4/src/libsync/abstractnetworkjob.cpp:221 ]:   QNetworkReply::HostNotFoundError "No s'ha trobat el servidor HOSTNAME" QVariant(Invalid)

Checking v3.10.0 release notes, I see https://github.com/nextcloud/desktop/pull/5036/files which could happen to address these issues or, at least from the looks of the code: help with the debugging because it has more detailed error logging.

@jdgwf
Copy link
Author

jdgwf commented Oct 3, 2023

We're still seeing the same issues in the latest patch:

jeff@freebsd140 ~/Downloads/desktop/build/bin (master) $ ./nextcloud --version
QML debugging is enabled. Only use this in a safe environment.
nextcloud.gui.application: Migrating old config from "/home/jeff/.local/share/Nextcloud" to "/home/jeff/.config/Nextcloud"
nextcloud.gui.application: Failed to move the old config directory to its new location ( "/home/jeff/.local/share/Nextcloud" to "/home/jeff/.config/Nextcloud" )
nextcloud.gui.application: Will move the individual files ("Nextcloud_sync.log")
nextcloud.gui.application: Fallback move of "Nextcloud_sync.log" also failed
Nextcloud version 3.10.50git
Git revision 29e8c89
Using Qt 5.15.8, built against Qt 5.15.8
Using Qt platform plugin 'xcb'
Using 'OpenSSL 3.0.10 1 Aug 2023'
Running on FreeBSD 14.0-BETA2, x86_64
jeff@freebsd140 ~/Downloads/desktop/build/bin (master) $

@jdgwf
Copy link
Author

jdgwf commented Oct 12, 2023

Continuing on my observations as I test, I've noticed that some remote folders work just fine and some just fail with Host Not Found. Most of these errors stem from a long URL path such as deep into a .git repository folder.

I wonder if it could be a variable CONST size issue in the QT abstractnetworkjob or other library which is cutting the variable off.

Thoughts?

@nkfilis
Copy link

nkfilis commented Nov 30, 2023

I have been seeing this issue on and off over the last 4-5 years or so (I posted one of the issues referenced in #6024 (comment)).
It seems to start once there is a critical amount of files being synchronized. My largest NC account has about 500GB in ~100,000 files and that one was the one always giving me trouble.
I've just re-setup 2 other NC accounts with 13k (2GB) and 26k (14GB) files each and that issue started showing up again, even without the large account being configured yet. It "feels" like if you deselect some larger folders, the issue goes away.
Unfortunately, the logs don't show any usable details about this. The "Host not found" is obviously misleading, there must be something else causing this which might trigger that "Host not found" error. I was thinking, maybe something like maximum of file handlers or open files is reached at some point, but there's no real evidence for this.
Is there a way to get more debugging enabled so we can get to the bottom of this?

@jdgwf
Copy link
Author

jdgwf commented Nov 30, 2023

Unfortunately I (very respectively) disagree that it's a system level/open file problem. If I set up my Nextcloud client to connect to the server by IP address and accept the "invalid" cert, I have no issues.

It's a DNS or Resolv.conf issue. Even if I enter in the IP address in the hosts file it'll still fail. It's got to be something on how QT is performing its mass nslookups is failing.

Only as an https;//THE.HOST.IP.ADDY instead of https://nextcloud.mydomain.com works without error on FreeBSD

This is a relatively new revelation for me, and although I have to accept the conflicting cert, it works well and fast hitting the host IP (and I had to set the Host IP to serve nextcloud by default, and I hate that too )

@Zocker1999NET
Copy link
Contributor

I assume I have a user reporting the same issue, but interestingly on Windows 10. I assume it is the same kind of issue because it does not seem to be an issue of the DNS resolver (a pihole of mine, logs reasonable response times). And this one user already experiences other issues because of the combination of many small files (37k to be precise) requiring a huge amount of storage (147 GiB).

I do not have the option now to change the app to use the IP directly because of security issues, but I can try to gather more telemetry data (version of client, …) when I come by.

@nophead
Copy link

nophead commented May 10, 2024

I have the client running on several Win7 machines, Ubuntu and Win11 and it has always worked fine. I just installed it on a new Win11 machine, an MSI Cubi 5 10M and it has this problem. Host not found at a random point during synching. Sometimes it restarts and gets a bit further, so it eventually completes the syncing. Sometimes I need to quit it and start it again for it to see the host.

Networking seems solid on this machine. I can watch video without interruptions and I can use the web version and ping the host, so it is definitely accessible.

The only thing I think is different about this machine is it is perhaps the fastest machine I have. Also it is running a Norton free trial, whereas my other machines use ESET virus checker.

@jdgwf
Copy link
Author

jdgwf commented May 11, 2024

Yes. This is still an issue on FreeBSD 14.1 as well

@nophead
Copy link

nophead commented May 11, 2024

I replaced the Norton virus checker with ESET, so it is the same as my other machines but I still get the problem.

I don't understand why it needs to lookup the host more than once during a sync operation.

How do I change the configuration to use the IP address? I can't see any way to change the host, once set up.

@nophead
Copy link

nophead commented May 15, 2024

Replacing the host name with its IP address in the nextcloud config file gets around the problem for me.

I found that if I ping the hostname from a DOS box then it only succeeds about 50% of the time, so it seems to be a Windows 11 problem, rather than NextCloud problem. Possibly it shows up in NextCloud because it seems to look up the server IP over and over again instead of doing it once and then using the IP address.

The odd thing is my other Windows11 machine that lives in Tenerife and accesses my server over VPN works reliably. This new machine that has a direct ethernet connection to the RPI4 is unreliable doing the DNS resolve.

@jdgwf
Copy link
Author

jdgwf commented Jun 9, 2024

Howdy there folks. This is still an issue in NXC 3.13.0 and FreeBSD 14.1.

Please, please let me know what I can do to help squash this bug :)

@claucambra claucambra added bug Prio: high confirmed bug approved by the team labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed bug approved by the team Prio: high
Projects
None yet
Development

No branches or pull requests

10 participants