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

请教Ubuntu 18.04 安装无效问题求教。 #14

Closed
Azreulo opened this issue Aug 15, 2018 · 10 comments
Closed

请教Ubuntu 18.04 安装无效问题求教。 #14

Azreulo opened this issue Aug 15, 2018 · 10 comments

Comments

@Azreulo
Copy link

Azreulo commented Aug 15, 2018

安装过程:
wget https://github.com/pymumu/smartdns/releases/download/Beta10/smartdns.1.2018.08.10-1830.x86_64.tar.gz -O smartdns.tar.gz
tar -zxf smartdns.tar.gz
sudo sh smartdns/install -i
rm -rf smartdns*
sudo sed -i '/8.8.8.8$/a\server 114.114.114.114:53,\nserver 223.5.5.5:53,\nserver 180.76.76.76:53,\nserver 208.67.222.222:53,\nserver 9.9.9.9:53,\nserver 8.8.8.8:53' /etc/smartdns/smartdns.conf
sudo systemctl restart smartdns

将Ubuntu的DNS改成127.0.0.1,无法解析域名。
执行
nslookup -querytype=ptr 127.0.0.1
结果
raphael@Raphael-Ubuntu:~/smartdns$ nslookup -querytype=ptr 127.0.0.1
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
1.0.0.127.in-addr.arpa name = localhost.

Authoritative answers can be found from:

请教一下哪里出了问题。
:)

@pymumu
Copy link
Owner

pymumu commented Aug 15, 2018

看看端口是不是冲突了
netstat -anp | grep 53
在看看日志里面有什么/var/log/smartdns.log

@Azreulo
Copy link
Author

Azreulo commented Aug 15, 2018

53端口貌似没被占用。
raphael@Raphael-Ubuntu:~/smartdns$ netstat -anp |grep 53
(并非所有进程都能被检测到,所有非本用户的进程信息将不会显示,如果想看到所有信息,则必须切换到 root 用户)
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
udp 20736 0 127.0.0.53:53 0.0.0.0:* -
udp 0 0 0.0.0.0:41953 0.0.0.0:* -
udp 38784 0 0.0.0.0:5353 0.0.0.0:* -
udp6 31232 0 :::5353 :::* -
unix 3 [ ] 流 已连接 2753 - /var/run/dbus/system_bus_socket
unix 3 [ ] 流 已连接 25383 - /run/systemd/journal/stdout
unix 3 [ ] 流 已连接 23853 938/dbus-daemon /run/user/1000/bus
unix 2 [ ] 数据报 653 -
unix 3 [ ] 流 已连接 29531 - /var/run/dbus/system_bus_socket
unix 3 [ ] 流 已连接 25384 - /run/systemd/journal/stdout
unix 3 [ ] 流 已连接 25380 1320/gsd-rfkill
unix 3 [ ] 流 已连接 29530 - /run/systemd/journal/stdout
unix 3 [ ] 流 已连接 25381 - /run/systemd/journal/stdout
unix 3 [ ] 流 已连接 25382 - /run/systemd/journal/stdout
unix 3 [ ] 流 已连接 26653 1426/kerneloops-app
unix 3 [ ] 流 已连接 25378 1320/gsd-rfkill
unix 3 [ ] 流 已连接 24674 1153/gnome-shell-ca
unix 3 [ ] 流 已连接 25379 1320/gsd-rfkill
unix 3 [ ] 流 已连接 25338 - /run/systemd/journal/stdout
unix 3 [ ] 流 已连接 20453 - /var/run/dbus/system_bus_socket
unix 3 [ ] 流 已连接 25337 - /run/systemd/journal/stdout
unix 3 [ ] 流 已连接 21284 1153/gnome-shell-ca
unix 3 [ ] 流 已连接 21285 1153/gnome-shell-ca
unix 3 [ ] 流 已连接 25335 - /run/systemd/journal/stdout
unix 3 [ ] 流 已连接 28753 1045/dbus-daemon @/tmp/dbus-xwQ8QCjZCM
unix 3 [ ] 流 已连接 25339 928/Xorg @/tmp/.X11-unix/X0
unix 3 [ ] 流 已连接 17553 -
unix 3 [ ] 流 已连接 25537 1374/gsd-media-keys
unix 3 [ ] 流 已连接 25538 928/Xorg @/tmp/.X11-unix/X0
unix 3 [ ] 流 已连接 25334 - /run/systemd/journal/stdout

log记录如下:
[2018-08-15 10:36:42,699][ERROR][ dns_client.c:158 ] get addr info failed. Unknown error
[2018-08-15 10:36:42,699][ERROR][ dns_client.c:159 ] host = 114.114.114.114,, port = 53, type = 2, protocol = 0
[2018-08-15 10:36:42,699][ERROR][ dns_client.c:330 ] get address failed, 114.114.114.114,:53
[2018-08-15 10:36:42,699][ERROR][ smartdns.c:125 ] add server failed, 114.114.114.114,:53
[2018-08-15 10:36:42,699][ERROR][ smartdns.c:230 ] add servers failed.
[2018-08-15 10:36:54,958][ERROR][ dns_client.c:158 ] get addr info failed. Unknown error
[2018-08-15 10:36:54,959][ERROR][ dns_client.c:159 ] host = 114.114.114.114,, port = 53, type = 2, protocol = 0
[2018-08-15 10:36:54,959][ERROR][ dns_client.c:330 ] get address failed, 114.114.114.114,:53
[2018-08-15 10:36:54,959][ERROR][ smartdns.c:125 ] add server failed, 114.114.114.114,:53
[2018-08-15 10:36:54,959][ERROR][ smartdns.c:230 ] add servers failed.
[2018-08-15 10:37:01,676][ERROR][ dns_client.c:158 ] get addr info failed. Unknown error
[2018-08-15 10:37:01,676][ERROR][ dns_client.c:159 ] host = 114.114.114.114,, port = 53, type = 2, protocol = 0
[2018-08-15 10:37:01,676][ERROR][ dns_client.c:330 ] get address failed, 114.114.114.114,:53
[2018-08-15 10:37:01,676][ERROR][ smartdns.c:125 ] add server failed, 114.114.114.114,:53
[2018-08-15 10:37:01,676][ERROR][ smartdns.c:230 ] add servers failed.
[2018-08-15 10:37:13,964][ERROR][ dns_client.c:158 ] get addr info failed. Unknown error
[2018-08-15 10:37:13,964][ERROR][ dns_client.c:159 ] host = 114.114.114.114,, port = 53, type = 2, protocol = 0
[2018-08-15 10:37:13,964][ERROR][ dns_client.c:330 ] get address failed, 114.114.114.114,:53
[2018-08-15 10:37:13,964][ERROR][ smartdns.c:125 ] add server failed, 114.114.114.114,:53
[2018-08-15 10:37:13,964][ERROR][ smartdns.c:230 ] add servers failed.
[2018-08-15 10:37:26,204][ERROR][ dns_client.c:158 ] get addr info failed. Unknown error
[2018-08-15 10:37:26,204][ERROR][ dns_client.c:159 ] host = 114.114.114.114,, port = 53, type = 2, protocol = 0
[2018-08-15 10:37:26,204][ERROR][ dns_client.c:330 ] get address failed, 114.114.114.114,:53
[2018-08-15 10:37:26,204][ERROR][ smartdns.c:125 ] add server failed, 114.114.114.114,:53
[2018-08-15 10:37:26,204][ERROR][ smartdns.c:230 ] add servers failed.
[2018-08-15 10:37:38,458][ERROR][ dns_client.c:158 ] get addr info failed. Unknown error

@pymumu
Copy link
Owner

pymumu commented Aug 15, 2018

你的配置文件有问题,手工改一下吧。
里面多了逗号。

@pymumu
Copy link
Owner

pymumu commented Aug 15, 2018

还有重复的记录,要删掉。

@Azreulo
Copy link
Author

Azreulo commented Aug 15, 2018

刚看到了,傻逼了。TAT
已经马上改了。
但是nslookup -querytype=ptr 127.0.0.1的结果还是localhost。

Ubuntu的DNS,设置的是127.0.0.1,9.9.9.9,这样OK吗?

@pymumu
Copy link
Owner

pymumu commented Aug 15, 2018

x86默认是用的主机名,你可以再配置文件中指定如下配置项:
server-name smartdns
这样查询的时候,就可以看到smartdns了。

你这是怎么用?ubuntu自己连接自己?

@Azreulo
Copy link
Author

Azreulo commented Aug 15, 2018

哈哈,这台Ubuntu是虚拟机,测试用的。
自己连自己。XD

所以,这样smartdns已经是正常工作了?

@pymumu
Copy link
Owner

pymumu commented Aug 15, 2018

只要解析的域名,任何一个域名都只返回一个IP地址,那就是OK的了。

@pymumu
Copy link
Owner

pymumu commented Aug 15, 2018

并且你的53端口好像被占用了,看看是不是开启了dnsmasq服务。

@pymumu
Copy link
Owner

pymumu commented Aug 19, 2018

如还有问题,请reopen issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants