coffeegreg / YTuner

YTuner is a simple project designed to replace vTuner internet radio service and dedicated to all users of AVRs made by Yamaha, Denon, Onkyo, Marantz and others with built-in vTuner support.
MIT License
34 stars 3 forks source link

DNS Server error: Could not bind socket. #39

Open SimonBard opened 2 days ago

SimonBard commented 2 days ago

Many thanks for the development of the application. When starting it on my rpi, I encounter the following error:

$ sudo ./ytuner
YTuner v1.2.4 Copyright (c) 2024 Greg P. (https://github.com/coffeegreg)
1-12-24 20:46:02 : Inf : Starting services...
1-12-24 20:46:02 : Err : CheckMyStationsThread Error: Unable to open file "/home/manfred/Downloads/ytuner124-docker/config/stations.ini": No such file or directory.
1-12-24 20:46:02 : Inf : Checking local database.
1-12-24 20:46:02 : Inf : Local database is ready.
1-12-24 20:46:02 : Err : DNS Server error: Could not bind socket..
1-12-24 20:46:02 : Inf : Web Service: listening on: 192.168.178.176:80.

There is no other application blocking the port:

$ sudo netstat -tnlp | grep :80
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      3612314/docker-prox
tcp6       0      0 :::8080                 :::*                    LISTEN      3612321/docker-prox
TheBossME commented 2 days ago

systemd-resolver running on Port 53 ?

Please type ss -tulpn and post result please.

Or sudo netstat -tnlp | grep :53

SimonBard commented 2 days ago

Or sudo netstat -tnlp | grep :53

Many thanks for the quick reply.

I have no clue what the output means. Do I need to kill that process?

$ ss -tulpn
Netid  State   Recv-Q  Send-Q                    Local Address:Port     Peer Address:Port  Process
udp    UNCONN  0       0                         127.0.0.53%lo:53            0.0.0.0:*
udp    UNCONN  0       0                               0.0.0.0:41503         0.0.0.0:*
udp    UNCONN  0       0                               0.0.0.0:5353          0.0.0.0:*
udp    UNCONN  0       0        [fe80::f85:6a57:26a:ffd2]%eth0:546              [::]:*
udp    UNCONN  0       0                                  [::]:5353             [::]:*
udp    UNCONN  0       0                                  [::]:47276            [::]:*
tcp    LISTEN  0       4096                            0.0.0.0:8123          0.0.0.0:*
tcp    LISTEN  0       4096                            0.0.0.0:8080          0.0.0.0:*
tcp    LISTEN  0       128                           127.0.0.1:631           0.0.0.0:*
tcp    LISTEN  0       4096                          127.0.0.1:44651         0.0.0.0:*
tcp    LISTEN  0       4096                      127.0.0.53%lo:53            0.0.0.0:*
tcp    LISTEN  0       128                             0.0.0.0:22            0.0.0.0:*
tcp    LISTEN  0       4096                               [::]:8123             [::]:*
tcp    LISTEN  0       4096                               [::]:8080             [::]:*
tcp    LISTEN  0       128                               [::1]:631              [::]:*
tcp    LISTEN  0       128                                [::]:22               [::]:*
$ sudo netstat -tnlp | grep :53
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      702/systemd-resolve
TheBossME commented 2 days ago

Port 53 is used by systemd resolver actually.

you can easily stop systemd-resolver if you didn't use that.

systemctl stop systemd-resolved Systemctl disable systemd-resolved

also you can remove it.

apt purge systemd-resolved

coffeegreg commented 2 days ago

$ sudo netstat -tnlp | grep :53 tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 702/systemd-resolve

As you can see systemd-resolved listening on UDP 53 port. I'm not sure and I have no way to check it right now :thinking: .. try this :

  sudo systemctl disable systemd-resolved.service
  sudo systemctl stop systemd-resolved

place dns=default line in the [main] section of your /etc/NetworkManager/NetworkManager.conf mv /etc/resolv.conf /etc/resolv.conf.del sudo service network-manager restart or sudo systemctl restart NetworkManager.service :thinking: Beatrice .. can you confirm this ? :thinking:

TheBossME commented 2 days ago

What OS is used actually ?. Debian ? Then purge systemd-resolver If Ubuntu then follow Greg's recommendations