Several network (DNS) problems

  • Hello,


    i have several problems with resolving names (domains), most work without problems and some don't.

    For example Syncthing had problems, and Nextcloud has problems (only with the database?!)


    The install is fairly fresh, i tried some things allready, but without real succes exept for using macvlan with syncthing.

    Iinstalled OMV on top of Debian just a few days ago and allready had weird issues with my network config that the server disconnected..


    Is this resolv.conf how it should be?

    (i set multiple DNS servers in the OMV-GUI)

    Code
    nameserver 127.0.0.53
    options edns0 trust-ad
    search quad9.net
  • votdev

    Hat das Label OMV 6.x hinzugefügt.
  • For example Syncthing had problems, and Nextcloud has problems (only with the database?!)

    And how are you running these services?

  • Yes this is correct, systemd-resolved is running as DNS server on 127.0.0.53. The UI settings are handled by system-resolved internally.

    Thank you for confirming.


    And how are you running these services?

    With docker (Using docker compose plugin from omv-extras as GUI for that).


    The problem i am facing with the Syncthing conatiner is that i can connect to my local laptop and computer, but not to my smartphone.

    And in the log was the following:


    Code
    2023-06-05 11:22:57 Using discovery mechanism: IPv4 local broadcast discovery on port 21027
    2023-06-05 11:22:57 Using discovery mechanism: IPv6 local multicast discovery on address [ff12::8384]:21027
    2023-06-05 11:22:57 Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
    2023-06-05 11:22:57 ...
    2023-06-06 08:56:15 Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
    2023-06-06 08:56:15 listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net on [::1]:53: dial udp [::1]:53: connect: cannot assign requested address
    2023-06-06 08:56:15 Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
    2023-06-06 08:56:15 Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
    2023-06-06 08:56:15 listenerSupervisor@dynamic+https://relays.syncthing.net/endpoint: service dynamic+https://relays.syncthing.net/endpoint failed: Get "https://relays.syncthing.net/endpoint": dial tcp: lookup relays.syncthing.net on [::1]:53: dial udp [::1]:53: connect: cannot assign requested address

    And this goes on and on, so i guess that is the issue and it seams (to me) to be something with DNS. At least by searching the web it came to the result with issues with the resolve.conf.



    With nextcloud allthough i dont know if thats because of DNS or it is some error on my side with using docker i have the problem with using the OCC command, i could not find much on it though and everithing i found i tried but without success.


    The error i am getting:


    As it is an error with name resolution i thought it cold be related maybe.






    Also, after freshly installing my NAS would after some time just disconnect from the router and thus be not reachable anymore.

    The server still said that it has the local IP even though the router did not see the server at all, not was it rechable.


    The issue seamed to be related to this: My Openmediacloud is dead since my last update this morning


    As after appling the fixes given in there it worked untill now, so i assume that issue is gone.

    I had OMV running untill i reinstalled it on that system before, so i dont know what caused that issue.






    Thanks to everyone, specialy to the OMV team for providing help in the Forum and making such a great opensource NAS solution ^^

    • Offizieller Beitrag

    IPv4 local broadcast discovery on port 21027

    I see that you have the syncthing configuration in local. Does Syncthing access your laptop via Wi-Fi or wired?

    If the laptop is connected by Wi-Fi and the smartphone is connected, and you can access the laptop but not the smartphone, it is probably a problem in Android settings. Android restricts access to syncthing if you don't set it right, I'd check that out.


    As for Nextcloud, it seems like a connection problem with the database. Soma knows the secrets of Nextcloud better than me, he will be a better help.

  • With nextcloud allthough i dont know if thats because of DNS or it is some error on my side with using docker

    Running it on docker won't interact with the DNS resolve from the host

    You can only access it via IP, not hostname unless you add a SWAG reverse-proxy for WAN access.


    The command you are using is OCC www-data.

    It means you are using nextcloud oficial docker.

    I can't help you since the only supported guides here run on the linuxserver image.


    Or post the used YML to see if something looks off

  • I see that you have the syncthing configuration in local. Does Syncthing access your laptop via Wi-Fi or wired?

    If the laptop is connected by Wi-Fi and the smartphone is connected, and you can access the laptop but not the smartphone, it is probably a problem in Android settings. Android restricts access to syncthing if you don't set it right, I'd check that out.


    As for Nextcloud, it seems like a connection problem with the database. Soma knows the secrets of Nextcloud better than me, he will be a better help.

    Thanks for helping.


    The laptop uses the same WIFI as the Android device.

    The PC and the NAS on which Syncthing runs in a docker container use LAN.

    The laptop and PC can connect and sync with the smartphone perfectly fine, only the NAS Syncthing can't connect nor sync with the phone, nor when the phone is connected to Wi-Fi nor when its on cellular network...


    I also double checked the smartphone so that syncthing is not battery restricted or anything and also reinstalled the app once to make sure.

    But as it works with smartphone <> PC and smartphone <> laptop i don't think the phones app is the issue.


    I did not quiet understand what you mean by me having the syncthing configuration in local, heres the connection settings in the GUI (if you mean that):

  • Running it on docker won't interact with the DNS resolve from the host

    Okay, i go that wrong then,

    I read in some post on the Nextcloud forum that its an issue with the hosts resolv.conf as docker accesses that for the networking.


    You can only access it via IP, not hostname unless you add a SWAG reverse-proxy for WAN access.

    If you mean the Nextcloud UI it is accesable via cloud.mydomain.com as i have it setup with Nginx Proxy Manager.


    The command you are using is OCC www-data.

    It means you are using nextcloud oficial docker.

    I can't help you since the only supported guides here run on the linuxserver image.

    Hmm, okay.

    I thought running the official one would be better.

    I tried running the AIO one, as i read that it should be better performing (and more reliable?!) but i also had some strange DNS lookup failure for: localhost error and tried fixing it without really getting anywhere with that.


    Or post the used YML to see if something looks off

    Here is the compose.yml for my Nextcloud:


    Thanks for helping me with this issue :)

    • Offizieller Beitrag

    The laptop uses the same WIFI as the Android device.

    The PC and the NAS on which Syncthing runs in a docker container use LAN.

    The laptop and PC can connect and sync with the smartphone perfectly fine, only the NAS Syncthing can't connect nor sync with the phone, nor when the phone is connected to Wi-Fi nor when its on cellular network...


    I also double checked the smartphone so that syncthing is not battery restricted or anything and also reinstalled the app once to make sure.

    But as it works with smartphone <> PC and smartphone <> laptop i don't think the phones app is the issue.

    After reading this information, the only thing that occurs to me is a possible configuration error between the connections of some nodes with others.

    I'm sorry but I don't think I'm going to be able to help much more with this. If no one contributes something you would get better support on the Syncthing forum. https://forum.syncthing.net/ They know your application better than anyone, of course.

  • I read in some post on the Nextcloud forum that its an issue with the hosts resolv.conf as docker accesses that for the networking.

    Docker uses the HOST network but not the DNS.



    If you mean the Nextcloud UI it is accesable via cloud.mydomain.com as i have it setup with Nginx Proxy Manager.

    Yes, SWAg and NPM are both reverse-proxies.
    As long as cloud.mydomain.com is pointing to your NPM IP and it reverses it to the Nextcloud LAN IP, that's how it should work.


    I thought running the official one would be better.

    It might but on the forum, all guides are using the linuxserver images and that's what is supported.

    I tried running the AIO one, as i read that it should be better performing (and more reliable?!) but i also had some strange DNS lookup failure for: localhost error and tried fixing it without really getting anywhere with that.

    Again, that is not used/supported here on the forum.

    What comes to mind is that your router might not allow Hairpinning. or has some issues with it.


    Seeing the YML that you use, it makes not much sense comparing it to the one used from Linuxserver.


    If you are just starting and don't really have a big DATA on NC, I can only tell you to start fresh with one Guide from the forum either from macom or from KM0201


    Both are well supported and easy to configure.


    More than this, I can't help

    • Offizieller Beitrag

    Again, that is not used/supported here on the forum.

    What comes to mind is that your router might not allow Hairpinning. or has some issues with it.

    I've seen this quite a few times... Easy test.. is take a device off your home network (phone, tablet, whatever may have a data plan). And see if you can hit your nextcloud domain. If you can, turn your wireless back on, and try going back to it. If you can, it's a hairpinning issue.


    I've heard some people say it's their router causing it, I've heard others say it's their service provider (or it may be their service provider's router)... I'm not sure what it is, but I've seen it quite a bit.

  • After reading this information, the only thing that occurs to me is a possible configuration error between the connections of some nodes with others.

    I'm sorry but I don't think I'm going to be able to help much more with this. If no one contributes something you would get better support on the Syncthing forum. https://forum.syncthing.net/ They know your application better than anyone, of course.

    Thanks, i will probably make a thread there later, and check if they can help me.

    I will post the link of the thread here too so if someone might have the issue too and a solution is found it will help.

  • Okay, thank you for your help.


    I will later try to reinstall it with the raw nextcloud compose first and see if occ works there, if not i will follow a tutorial on the forum.

  • I've seen this quite a few times... Easy test.. is take a device off your home network (phone, tablet, whatever may have a data plan). And see if you can hit your nextcloud domain. If you can, turn your wireless back on, and try going back to it. If you can, it's a hairpinning issue.


    I've heard some people say it's their router causing it, I've heard others say it's their service provider (or it may be their service provider's router)... I'm not sure what it is, but I've seen it quite a bit.

    I can reach my cloud.mydomain.com without any problem both from lan and from the internet.


    The issue with the AIO one was that i opened https://nas.local:8080 (i think it was 8080, i tried the nas ip too) when accesing it http it gave an error that its an https site and should not be accesed with http and when accesing via https it was giving DNS lookup failure for: localhost.


    The problem is something with the connection to the database (regarding to the output of php occ) but the database worked during the Nextcloud setup, and the Nextcloud instance works with the Database still.


    I am going to later also check the hairpinning regardless.

    • Offizieller Beitrag

    Dunno... I don't use AIO.

  • So whatever is going on with my Docker install or my OMV seams to be fairly rare.

    Only odd thing for me is that its a fresh install, and i did not make any big changes..


    I searched the web a litle bit more and found (on chinese and some other languages) allways some awnsers with DNS problems, i guess my dockers networking is messed up.

    I will check further on that tomorrow and probably rm -rf my docker dir and check if reinstalling it might help, alltough i think i did that allready.


    Its not an issue with Nextcloud nor is it with Syncthing, i tried different software i was going to install and it was allways having some simmilar strange issues that allways linked back to DNS..

    • Offizieller Beitrag

    If this problem were common in new installations we would have the forum flooded with queries and it is not like that. So I'd say it's something in your container setup or your network/router.

  • If this problem were common in new installations we would have the forum flooded with queries and it is not like that. So I'd say it's something in your container setup or your network/router.

    I don't think its the router, as it worked flawless with before the re-install.

    I guess its either because of the other issue i had with networking or its with docker networking allthough i did not change anything there.


    Most sense to me makes that its related with that issue.

    As those steps in there fixed my network disconnecting and my nas not beeing rechable after some time after my fresh OMV imstall.

    And i did not change any config and freshly installed OMV, OMV-Compose and Docker..


    If nothing helps i will probably once again reinstall debian and then install OMV

    • Offizieller Beitrag
  • SOLVED


    Thanks to everyone who helped.


    I solved the issue like this (its more of a a workaround)

    (If anyone ever has the same issue and wants to try this solution make sure you move/copy your docker volumes and any potential important configs first)


    I did remove my docker completely using:

    rm -rf /srv/dev-by-.../Docker (same as Docker storage in OMV-Compose)

    apt purge docker* (to fully remove any docker packages)

    rm -rf /etc/docker (to remove any remaining files, as apt outputs that it did not delete the directory as its not empty)


    Then i (re)installed docker using the OMV-Compose GUI and now the networking issues are gone.

    I can now use the php occ command in the Nextcloud conatiner and also Syncthing works with my phone and can connect to the relays.


    Before i did that i checked my router once more if NAT loopback (hairpinning) was enabled and it was.

    And i tried every possible solution in this thread, and checked every hint without succes, also searched the web multiple times for possible solutions also non of them fixed it.


    So this was an issue not at all related to the hosts networking issue:


    I do not see this as a real solution as it is not addressing the root cause, but it works.

    Sadly i was not able to find out what caused it, not what was actually going wrong in detail.


    I was fiddling around with this way too long for this to be the solution, i would have my services up and running a long time ago if i would have done that in the beginning... :S

    I would even bet i tried reinstalling Docker, but it either was without removing /etc/docker or it was on the old OMV install.


    Strangest thing is that Nextcloud could install and use the database and that Syncthing worked with my Laptop and PC but not my phone, also other services in docker had similar strange issues.

    Very interesting DNS issue within docker, happy i got rid of that.


    Anyways, thanks again to everyone that helped and gave possible solutions.

    And thanks to the OMV-Team for this great NAS software ^^

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!