AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

全部问题(ubuntu)

Martin Hope
q.uijote
Asked: 2024-10-31 03:11:51 +0800 CST

意外删除了 libgl1-mesa-dri

  • 5

Python 报告了 MESA-Loader 的问题,所以我在 Ubuntu 24.04 LTS 上运行了以下命令(说实话,我真的不知道自己在做什么):

dpkg -l | grep mesa
sudo apt remove --purge libgl1-mesa-dri
sudo apt install libglu1-mesa
sudo apt install libgl1-mesa-dri
sudo apt install mesa-utils

现在,我只看到机器上的命令行,没有图形界面。

我想要的只是恢复图形界面(恢复上述命令)

我尝试过的:

sudo apt update
sudo apt upgrade
sudo apt install libgl1-mesa-dri
sudo apt install mesa-utils
sudo reboot

这没有帮助。当我这样做时,dpkg -l | grep mesa我得到:

ii libegl-mesa0:amd64                24.0.9.-0ubuntu0.2    amd64  ...
ii libgl1-mesa-dri:amd64             24.0.9.-0ubuntu0.2    amd64  ...
ii libglapi-mesa:amd64               24.0.9.-0ubuntu0.2    amd64  ...
ii libglu1-mesa:amd64                9.0.2-1.1build1       amd64  ...
ii libglx-mesa0:amd64                24.0.9.-0ubuntu0.2    amd64  ...
ii mesa-utils                        9.0.0-2               amd64  ...
ii mesa-utils-bin:amd64              9.0.0-2               amd64  ...
ii mesa-va-drivers:amd64             24.0.9.-0ubuntu0.2    amd64  ...
ii mesa-vdpau-drivers:amd64          24.0.9.-0ubuntu0.2    amd64  ...
ii mesa-vulkan-drivers:amd64         24.0.9.-0ubuntu0.2    amd64  ...
drivers
  • 1 个回答
  • 48 Views
Martin Hope
ashishvijay_
Asked: 2024-10-31 00:25:50 +0800 CST

Ubuntu 24 中频繁出现警报,‘抱歉,程序“chrome”意外关闭。’

  • 5

我已经安装了 Google Chrome 并开始使用它,但一天后,我经常收到这些警告。我尝试卸载 Google Chrome 和 VSCode,但仍然收到这些警报。

Chrome 中的问题

google-chrome
  • 1 个回答
  • 71 Views
Martin Hope
Yuri
Asked: 2024-10-31 00:20:55 +0800 CST

全屏导致整个屏幕都是水平线

  • 6

升级到 Ubuntu 24.04 后,Firefox 在 Chrome 中没有出现问题,YouTube 和另一个网站的每个全屏都用绿色和黄色的水平线填满屏幕。看起来像:

屏幕上全是黄色和绿色的线条

尝试截取屏幕截图后,屏幕短暂地冻结并返回到正常状态。

全屏模式下其他一些程序也会出现相同的黄色/绿色条纹屏幕:VLC 播放器和 Visual Studio Code;而其他程序(如 Stremio)在全屏模式下则没有问题。

连接外接屏幕后,我检查的所有程序(Chrome 和 VLC)中的问题都解决了,主屏幕和副屏幕上的全屏显示都没有问题。断开外接屏幕会导致全屏显示时出现黄色/绿色条纹。

我曾在 9 月份通过 Chrome support.google 询问过此问题,但尚未收到回复。

对于 Chrome,我尝试过:禁用 Chrome 扩展程序、禁用硬件加速、清除缓存和 cookie,然后重新安装 Chrome;但没有任何改善。

我试图弄清楚我的 Intel® UHD Graphics 620 (WHL GT2) 有哪些 GPU 驱动程序。我按照此处的英特尔说明进行操作,但陷入了困境。'clinfo' 显示平台数量为 0,我不明白为什么。'附加驱动程序' 选项卡中的 '软件和更新' 显示我没有使用任何专有驱动程序,也没有附加驱动程序(它是空的)。

我没有找到关于同一问题的问题。其他人遇到过类似问题吗?他们尝试过什么?我不确定要检查什么,如果能提供任何帮助和建议,我将不胜感激

google-chrome
  • 2 个回答
  • 98 Views
Martin Hope
Sun Bear
Asked: 2024-10-30 21:29:40 +0800 CST

当 Unbound 配置为转发域查询时,如何验证所有解析的域 IP 是否来自外部 DNS 解析器?

  • 8

我已将 Unbound 配置为:

  1. 在 LAN 的所有接口上监听域查询,
  2. 通过 TLS 将这些域查询转发到外部 DNS 解析器,
  3. 从外部DNS解析器接收解析后的域名IP并返回给相应的客户端。

如何验证此类配置是否有效?特别是,如何验证:

  1. Unbound 是否已通过 TLS 将域查询转发到所需的外部 DNS 解析器?
  2. 解析的域名 IPS 来自外部 DNS 解析器,并且不由 Unbound 解析?

dig以下是来自ging的两个结果google.com。我如何使用这些结果进行上述验证?

root@DNS:/etc/unbound# dig google.com A @192.168.1.50 -p 3000

; <<>> DiG 9.18.28-0ubuntu0.24.04.1-Ubuntu <<>> google.com A @192.168.1.50 -p 3000
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22452
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com.            IN  A

;; ANSWER SECTION:
google.com.     300 IN  A   142.251.175.138
google.com.     300 IN  A   142.251.175.100
google.com.     300 IN  A   142.251.175.113
google.com.     300 IN  A   142.251.175.101
google.com.     300 IN  A   142.251.175.139
google.com.     300 IN  A   142.251.175.102

;; Query time: 12 msec
;; SERVER: 192.168.1.50#3000(192.168.1.50) (UDP)
;; WHEN: Wed Oct 30 14:04:16 UTC 2024
;; MSG SIZE  rcvd: 135

root@DNS:/etc/unbound# dig google.com A @192.168.1.50 -p 3000

; <<>> DiG 9.18.28-0ubuntu0.24.04.1-Ubuntu <<>> google.com A @192.168.1.50 -p 3000
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39764
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com.            IN  A

;; ANSWER SECTION:
google.com.     300 IN  A   142.251.175.139
google.com.     300 IN  A   142.251.175.113
google.com.     300 IN  A   142.251.175.100
google.com.     300 IN  A   142.251.175.101
google.com.     300 IN  A   142.251.175.138
google.com.     300 IN  A   142.251.175.102

;; Query time: 184 msec
;; SERVER: 192.168.1.50#3000(192.168.1.50) (UDP)
;; WHEN: Wed Oct 30 14:05:30 UTC 2024
;; MSG SIZE  rcvd: 135

以下是重新启动并运行上述 dig 命令两次后的unbound.log日志。我可以看到提到了外部 DNS 解析器,但我不明白哪一行显示它已解析域并将结果返回给 unbound。verbosity: 3unbound.service

[1730296502] unbound[6506:0] info: service stopped (unbound 1.19.2).
[1730296502] unbound[6506:0] info: server stats for thread 0: 0 queries, 0 answers from cache, 0 recursions, 0 prefetch, 0 rejected by ip ratelimiting
[1730296502] unbound[6506:0] info: server stats for thread 0: requestlist max 0 avg 0 exceeded 0 jostled 0
[1730296502] unbound[6506:0] info: server stats for thread 1: 0 queries, 0 answers from cache, 0 recursions, 0 prefetch, 0 rejected by ip ratelimiting
[1730296502] unbound[6506:0] info: server stats for thread 1: requestlist max 0 avg 0 exceeded 0 jostled 0
[1730296502] unbound[6506:0] info: server stats for thread 2: 0 queries, 0 answers from cache, 0 recursions, 0 prefetch, 0 rejected by ip ratelimiting
[1730296502] unbound[6506:0] info: server stats for thread 2: requestlist max 0 avg 0 exceeded 0 jostled 0
[1730296502] unbound[6506:0] info: server stats for thread 3: 0 queries, 0 answers from cache, 0 recursions, 0 prefetch, 0 rejected by ip ratelimiting
[1730296502] unbound[6506:0] info: server stats for thread 3: requestlist max 0 avg 0 exceeded 0 jostled 0
[1730296503] unbound[6658:0] debug: module config: "subnetcache validator iterator"
[1730296503] unbound[6658:0] notice: init module 0: subnetcache
[1730296503] unbound[6658:0] warning: subnetcache: serve-expired is set but not working for data originating from the subnet module cache.
[1730296503] unbound[6658:0] warning: subnetcache: prefetch is set but not working for data originating from the subnet module cache.
[1730296503] unbound[6658:0] debug: subnetcache: option registered (8)
[1730296503] unbound[6658:0] notice: init module 1: validator
[1730296503] unbound[6658:0] notice: init module 2: iterator
[1730296503] unbound[6658:0] debug: target fetch policy for level 0 is 3
[1730296503] unbound[6658:0] debug: target fetch policy for level 1 is 2
[1730296503] unbound[6658:0] debug: target fetch policy for level 2 is 1
[1730296503] unbound[6658:0] debug: target fetch policy for level 3 is 0
[1730296503] unbound[6658:0] debug: target fetch policy for level 4 is 0
[1730296503] unbound[6658:0] debug: Forward zone server list:
[1730296503] unbound[6658:0] info: DelegationPoint<dns.quad9.net.>: 0 names (0 missing), 4 addrs (0 result, 4 avail) parentNS
[1730296503] unbound[6658:2] debug: Forward zone server list:
[1730296503] unbound[6658:2] info: DelegationPoint<dns.quad9.net.>: 0 names (0 missing), 4 addrs (0 result, 4 avail) parentNS
[1730296503] unbound[6658:0] debug: cache memory msg=66104 rrset=66104 infra=7952 val=66400 subnet=74536
[1730296503] unbound[6658:1] debug: Forward zone server list:
[1730296503] unbound[6658:1] info: DelegationPoint<dns.quad9.net.>: 0 names (0 missing), 4 addrs (0 result, 4 avail) parentNS
[1730296503] unbound[6658:0] info: start of service (unbound 1.19.2).
[1730296503] unbound[6658:2] debug: cache memory msg=66104 rrset=66104 infra=7952 val=66400 subnet=74536
[1730296503] unbound[6658:3] debug: Forward zone server list:
[1730296503] unbound[6658:3] info: DelegationPoint<dns.quad9.net.>: 0 names (0 missing), 4 addrs (0 result, 4 avail) parentNS
[1730296503] unbound[6658:1] debug: cache memory msg=66104 rrset=66104 infra=7952 val=66400 subnet=74536
[1730296503] unbound[6658:3] debug: cache memory msg=66104 rrset=66104 infra=7952 val=66400 subnet=74536
[1730297056] unbound[5388:0] debug: subnetcache[module 0] operate: extstate:module_state_initial event:module_event_new
[1730297056] unbound[5388:0] info: subnetcache operate: query google.com. A IN
[1730297056] unbound[5388:0] debug: validator[module 1] operate: extstate:module_state_initial event:module_event_pass
[1730297056] unbound[5388:0] info: validator operate: query google.com. A IN
[1730297056] unbound[5388:0] debug: iterator[module 2] operate: extstate:module_state_initial event:module_event_pass
[1730297056] unbound[5388:0] info: resolving google.com. A IN
[1730297056] unbound[5388:0] info: resolving (init part 2):  google.com. A IN
[1730297056] unbound[5388:0] info: resolving (init part 3):  google.com. A IN
[1730297056] unbound[5388:0] info: processQueryTargets: google.com. A IN
[1730297056] unbound[5388:0] info: sending query: google.com. A IN
[1730297056] unbound[5388:0] debug: sending to target: <google.com.> 216.239.38.10#53
[1730297056] unbound[5388:0] debug: cache memory msg=70045 rrset=100203 infra=29147 val=67208 subnet=74536
[1730297056] unbound[5388:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
[1730297056] unbound[5388:0] info: iterator operate: query google.com. A IN
[1730297056] unbound[5388:0] info: response for google.com. A IN
[1730297056] unbound[5388:0] info: reply from <google.com.> 216.239.38.10#53
[1730297056] unbound[5388:0] info: query response was ANSWER
[1730297056] unbound[5388:0] info: finishing processing for google.com. A IN
[1730297056] unbound[5388:0] debug: validator[module 1] operate: extstate:module_wait_module event:module_event_moddone
[1730297056] unbound[5388:0] info: validator operate: query google.com. A IN
[1730297056] unbound[5388:0] debug: subnetcache[module 0] operate: extstate:module_wait_module event:module_event_moddone
[1730297056] unbound[5388:0] info: subnetcache operate: query google.com. A IN
[1730297056] unbound[5388:0] debug: cache memory msg=70045 rrset=100203 infra=29147 val=67208 subnet=74536
[1730297130] unbound[5379:0] debug: subnetcache[module 0] operate: extstate:module_state_initial event:module_event_new
[1730297130] unbound[5379:0] info: subnetcache operate: query google.com. A IN
[1730297130] unbound[5379:0] debug: validator[module 1] operate: extstate:module_state_initial event:module_event_pass
[1730297130] unbound[5379:0] info: validator operate: query google.com. A IN
[1730297130] unbound[5379:0] debug: iterator[module 2] operate: extstate:module_state_initial event:module_event_pass
[1730297130] unbound[5379:0] info: resolving google.com. A IN
[1730297130] unbound[5379:0] info: resolving (init part 2):  google.com. A IN
[1730297130] unbound[5379:0] info: resolving (init part 3):  google.com. A IN
[1730297130] unbound[5379:0] info: processQueryTargets: google.com. A IN
[1730297130] unbound[5379:0] info: sending query: google.com. A IN
[1730297130] unbound[5379:0] debug: sending to target: <com.> 2001:503:83eb::30#53
[1730297130] unbound[5379:0] debug: cache memory msg=78073 rrset=130165 infra=41184 val=69264 subnet=74536
[1730297130] unbound[5379:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_noreply
[1730297130] unbound[5379:0] info: iterator operate: query google.com. A IN
[1730297130] unbound[5379:0] info: processQueryTargets: google.com. A IN
[1730297130] unbound[5379:0] info: sending query: google.com. A IN
[1730297130] unbound[5379:0] debug: sending to target: <com.> 192.41.162.30#53
[1730297130] unbound[5379:0] debug: cache memory msg=78073 rrset=130165 infra=41184 val=69264 subnet=74536
[1730297130] unbound[5379:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
[1730297130] unbound[5379:0] info: iterator operate: query google.com. A IN
[1730297130] unbound[5379:0] info: response for google.com. A IN
[1730297130] unbound[5379:0] info: reply from <com.> 192.41.162.30#53
[1730297130] unbound[5379:0] info: query response was REFERRAL
[1730297130] unbound[5379:0] info: processQueryTargets: google.com. A IN
[1730297130] unbound[5379:0] info: sending query: google.com. A IN
[1730297130] unbound[5379:0] debug: sending to target: <google.com.> 216.239.32.10#53
[1730297130] unbound[5379:0] debug: cache memory msg=78073 rrset=132972 infra=41184 val=69414 subnet=74536
[1730297130] unbound[5379:0] debug: iterator[module 2] operate: extstate:module_wait_reply event:module_event_reply
[1730297130] unbound[5379:0] info: iterator operate: query google.com. A IN
[1730297130] unbound[5379:0] info: response for google.com. A IN
[1730297130] unbound[5379:0] info: reply from <google.com.> 216.239.32.10#53
[1730297130] unbound[5379:0] info: query response was ANSWER
[1730297130] unbound[5379:0] info: finishing processing for google.com. A IN
[1730297130] unbound[5379:0] debug: validator[module 1] operate: extstate:module_wait_module event:module_event_moddone
[1730297130] unbound[5379:0] info: validator operate: query google.com. A IN
[1730297130] unbound[5379:0] debug: subnetcache[module 0] operate: extstate:module_wait_module event:module_event_moddone
[1730297130] unbound[5379:0] info: subnetcache operate: query google.com. A IN
[1730297130] unbound[5379:0] debug: cache memory msg=78333 rrset=133364 infra=41492 val=69414 subnet=74536
networking
  • 2 个回答
  • 73 Views
Martin Hope
Sun Bear
Asked: 2024-10-30 12:13:59 +0800 CST

unbound[6165:0] 致命错误:无法设置远程控制

  • 5

这是我第二个问题的后续问题。@mpboden 的解决方案已实施。此外,我添加了auto-trust-anchor-file:和启用remote-control:,如未绑定示例中为其余网络示例设置所定义。

server:
    directory: "/etc/unbound"
    username: "unbound"
    chroot: ""
    verbosity: 1
    logfile: "/etc/unbound/unbound.log"
    pidfile: "/etc/unbound/unbound.pid"
    # location of the trust anchor file that enables DNSSEC
    auto-trust-anchor-file: "/var/lib/unbound/root.key"
    # send minimal amount of information to upstream servers to enhance privacy
    qname-minimisation: yes
    # The port number on which the server responds to queries. 
    port: 3000
    # the interface that is used to connect to the network (this will listen to all interfaces)
    interface: 0.0.0.0
    interface: ::0
    # addresses from the IP range that are allowed to connect to the resolver
    access-control: 192.168.1.0/24 allow
    access-control: 2001:DB8::/64 allow

remote-control:
    # allows controling unbound using "unbound-control"
    control-enable: yes

但是,我在调试模式下发现了 4 个错误和 1 个失败消息。通过我的故障排除工作,我发现这些错误和失败消息在control-enable: yes允许的情况下发生。

root@DNS:/etc/unbound# unbound -d -vv -c unbound.conf
[1730259092] unbound[6165:0] notice: Start of unbound 1.19.2.
[1730259092] unbound[6165:0] error: Error for server-cert-file: /etc/unbound/unbound_server.pem
[1730259092] unbound[6165:0] error: Error in SSL_CTX use_certificate_chain_file crypto error:80000002:system library::No such file or directory
[1730259092] unbound[6165:0] error: and additionally crypto error:10080002:BIO routines::system lib
[1730259092] unbound[6165:0] error: and additionally crypto error:0A080002:SSL routines::system lib
[1730259092] unbound[6165:0] fatal error: could not set up remote-control

我已检查过是否/var/lib/unbound/root.key存在。Unbound 仍可工作但unbound-control无法使用。Unbound 正在寻找/etc/unbound/unbound_server.pem但该文件不存在。我该如何解决此远程控制配置问题?

更新:

通过@mpboden的回答,我发现该命令unbound-control-setup旨在在 /etc/unbound 中创建这些文件:unbound_control.pem,,,, 以允许远程控制。unbound_server.pemunbound_control.keyunbound_server.key

root@DNS:/etc/unbound# unbound-control-setup -h
usage: /usr/sbin/unbound-control-setup OPTIONS
OPTIONS
-d <dir>  used directory to store keys and certificates (default: /etc/unbound)
-h        show help notice
-r        recreate certificates
root@DNS:/etc/unbound# unbound-control-setup
setup in directory /etc/unbound
Certificate request self-signature ok
subject=CN = unbound-control
removing artifacts
Setup success. Certificates created. Enable in unbound.conf file to use
root@DNS:/etc/unbound# ls
unbound.conf    unbound.conf.d       unbound.pid          unbound_control.pem  unbound_server.pem
unbound.log     unbound_control.key  unbound_server.key
networking
  • 1 个回答
  • 41 Views
Martin Hope
MIke
Asked: 2024-10-30 08:44:19 +0800 CST

为什么 bash 不报告行尾没有 " 的错误

  • 6

我的问题是为什么 bash 没有针对第 2 行进行报告,我故意在行末留下了尾随的“以查看它是如何报告这一点的。

我运行一个 bash 脚本并收到此错误:./test: 第 4 行:查找匹配的“”时出现意外的 EOF

#!/usr/bin/bash
echo "this is life
echo "now is the time"
echo "have we reached the end"
bash
  • 1 个回答
  • 43 Views
Martin Hope
stumblebee
Asked: 2024-10-30 08:40:56 +0800 CST

如何在 Ubuntu 22.04 上固定 Firefox 的 apt 版本?

  • 7

我按照Mozilla 支持网站上的说明进行操作:

为基于 Debian 的发行版安装 Firefox .deb 包(推荐)

.deb要通过 APT 存储库安装该软件包,请执行以下操作:

  1. 如果不存在,则创建一个目录来存储 APT 存储库密钥:

    sudo install -d -m 0755 /etc/apt/keyrings
    
  2. 导入 Mozilla APT 存储库签名密钥:

    wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null

    如果你还没有wget安装,你可以使用以下命令安装:sudo apt-get install wget

  3. 指纹应该是35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3。您可以使用以下命令检查它:

    gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0").\n"; else print "\nVerification failed: the fingerprint ("$0") does not match the expected one.\n"}'

  4. 接下来,将 Mozilla APT 存储库添加到您的源列表中:

    echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null

  5. 配置 APT 以优先考虑来自 Mozilla 存储库的软件包:

    echo '
    Package: *
    Pin: origin packages.mozilla.org
    Pin-Priority: 1000
    ' | sudo tee /etc/apt/preferences.d/mozilla
    
  6. 更新您的软件包列表,并安装 Firefox.deb软件包:

    sudo apt-get update && sudo apt-get install firefox
    

所以现在我有:

$ apt list --installed | grep firefox
firefox/mozilla,now 132.0~build1 amd64 [installed]

$ snap list | grep firefox
firefox                    131.0.2-1                    5091   latest/stable
mozilla**         -

我不介意在我的系统上同时安装apt和snap版本。问题是,apt即使完成了“配置 APT 以优先处理来自 Mozilla 存储库的软件包”步骤,版本也会在软件更新完成后被卸载。

如何阻止版本被卸载并被软件更新apt替换?snap

apt
  • 1 个回答
  • 85 Views
Martin Hope
Sun Bear
Asked: 2024-10-30 00:39:49 +0800 CST

未绑定DNS为什么挖域名失败?

  • 8

这是我之前问题的后续问题。以下是/etc/unbound/unbound.conf文件:

# unbound.conf(5) config file for unbound(8).
server:
    directory: "/etc/unbound"
    username: "unbound"
    chroot: ""
    logfile: "/etc/unbound/unbound.log"
    pidfile: "/etc/unbound/unbound.pid"
    verbosity: 1
    # listen on all interfaces and answer queries from the local port 3000.
    interface: 0.0.0.0 
    interface: ::0
    port: 3000
    access-control: 10.0.0.0/8 allow
    #access-control: 2001:DB8::/64 allow

开始时unbound.service,我尝试dig通过本地未绑定的服务器访问域:

root@DNS:/etc/unbound# dig example.com A @192.168.1.50 -p 3000

; <<>> DiG 9.18.28-0ubuntu0.24.04.1-Ubuntu <<>> example.com A @192.168.1.50 -p 3000
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 8367
;; flags: qr rd ad; QUERY: 0, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; Query time: 0 msec
;; SERVER: 192.168.1.50#3000(192.168.1.50) (UDP)
;; WHEN: Tue Oct 29 16:18:19 UTC 2024
;; MSG SIZE  rcvd: 12

我不明白为什么 WARNING: recursion requested but not availableunbound 默认配置为递归解析器。另外。SERVER: 192.168.1.50#3000(192.168.1.50) (UDP)显示使用了 unbound,但无法获取域。哪里出了问题,如何修复此问题?

下面显示了通过存根服务器的答案systemd-resolved.service:

root@DNS:/etc/unbound# dig example.com

; <<>> DiG 9.18.28-0ubuntu0.24.04.1-Ubuntu <<>> example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36356
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;example.com.           IN  A

;; ANSWER SECTION:
example.com.        3304    IN  A   93.184.215.14

;; Query time: 12 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Oct 29 16:43:59 UTC 2024
;; MSG SIZE  rcvd: 56

更新:

按照 @mpboden 的回答纠正子网后,该dig命令仅起作用一次。为什么会这样?

root@DNS:/etc/unbound/unbound.conf.d# systemctl start unbound.service
root@DNS:/etc/unbound/unbound.conf.d# [1730230920] unbound[5780:0] notice: init module 0: subnetcache
[1730230920] unbound[5780:0] notice: init module 1: validator
[1730230920] unbound[5780:0] notice: init module 2: iterator
[1730230921] unbound[5780:0] info: start of service (unbound 1.19.2).

root@DNS:/etc/unbound/unbound.conf.d# dig example.com A @192.168.1.50 -p 3000

; <<>> DiG 9.18.28-0ubuntu0.24.04.1-Ubuntu <<>> example.com A @192.168.1.50 -p 3000
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40273
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;example.com.           IN  A

;; ANSWER SECTION:
example.com.        3600    IN  A   93.184.215.14

;; Query time: 712 msec
;; SERVER: 192.168.1.50#3000(192.168.1.50) (UDP)
;; WHEN: Tue Oct 29 19:42:34 UTC 2024
;; MSG SIZE  rcvd: 56

root@DNS:/etc/unbound/unbound.conf.d# dig google.com A @192.168.1.50 -p 3000

; <<>> DiG 9.18.28-0ubuntu0.24.04.1-Ubuntu <<>> google.com A @192.168.1.50 -p 3000
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 49774
;; flags: qr rd ad; QUERY: 0, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; Query time: 0 msec
;; SERVER: 192.168.1.50#3000(192.168.1.50) (UDP)
;; WHEN: Tue Oct 29 19:42:56 UTC 2024
;; MSG SIZE  rcvd: 12


root@DNS:/etc/unbound/unbound.conf.d# dig example.com A @192.168.1.50 -p 3000

; <<>> DiG 9.18.28-0ubuntu0.24.04.1-Ubuntu <<>> example.com A @192.168.1.50 -p 3000
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 46236
;; flags: qr rd ad; QUERY: 0, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; Query time: 0 msec
;; SERVER: 192.168.1.50#3000(192.168.1.50) (UDP)
;; WHEN: Tue Oct 29 19:43:36 UTC 2024
;; MSG SIZE  rcvd: 12
networking
  • 1 个回答
  • 310 Views
Martin Hope
Paul Jurczak
Asked: 2024-10-29 11:31:25 +0800 CST

为什么这个 bash 脚本在启动时不运行?

  • 7

此test.sh脚本:

cd test-1
source .venv/bin/activate
python test.py
deactivate

使用以下命令从 Ubuntu 20.04.6 上的终端正常运行:

nick@jetson:~$ ./test.sh

当我将其添加到启动应用程序偏好设置中时:

在此处输入图片描述

它不运行。出了什么问题?


这个问题与如何在登录时自动启动应用程序?不同。我不是在问如何在登录时自动启动应用程序。我是在问为什么必须使用与我在文件夹中的终端中输入的命令不同Command的Add Startup program命令~。

bash
  • 2 个回答
  • 578 Views
Martin Hope
Sun Bear
Asked: 2024-10-29 10:49:26 +0800 CST

为什么接口:0.0.0.0会导致重新启动unbound.service失败?

  • 7

unbound.service使用以下 3 个默认文件(安装 unbound 后创建)时,运行无错误:

root@DNS:/etc/unbound# cat unbound.conf
# Unbound configuration file for Debian.
#
# See the unbound.conf(5) man page.
#
# See /usr/share/doc/unbound/examples/unbound.conf for a commented
# reference config file.
#
# The following line includes additional configuration files from the
# /etc/unbound/unbound.conf.d directory.
include-toplevel: "/etc/unbound/unbound.conf.d/*.conf"
root@DNS:/etc/unbound# cat unbound.conf.d/remote-control.conf 
remote-control:
  control-enable: yes
  # by default the control interface is is 127.0.0.1 and ::1 and port 8953
  # it is possible to use a unix socket too
  control-interface: /run/unbound.ctl
root@DNS:/etc/unbound# cat unbound.conf.d/root-auto-trust-anchor-file.conf 
server:
    # The following line will configure unbound to perform cryptographic
    # DNSSEC validation using the root trust anchor.
    auto-trust-anchor-file: "/var/lib/unbound/root.key"

然而,当这 3 个文件被删除,并且内容/etc/unbound/unbound.conf包含

# unbound.conf(5) config file for unbound(8).
server:
    directory: "/etc/unbound"
    username: "unbound"
    # make sure unbound can access entropy from inside the chroot.
    # e.g. on linux the use these commands (on BSD, devfs(8) is used):
    #      mount --bind -n /dev/urandom /etc/unbound/dev/urandom
    # and  mount --bind -n /dev/log /etc/unbound/dev/log
    #chroot: "/etc/unbound"
    # logfile: "/etc/unbound/unbound.log"  #uncomment to use logfile.
    pidfile: "/etc/unbound/unbound.pid"
    # verbosity: 1      # uncomment and increase to get more logging.
    # listen on all interfaces, answer queries from the local subnet.
    interface: 0.0.0.0
    interface: ::0
    access-control: 10.0.0.0/8 allow
    #access-control: 2001:DB8::/64 allow

unbound.service无法使用 重启service unbound restart。例如

root@DNS:/etc/unbound# service unbound restart
Job for unbound.service failed because the control process exited with error code.
See "systemctl status unbound.service" and "journalctl -xeu unbound.service" for details.
root@DNS:/etc/unbound# systemctl status unbound.service
× unbound.service - Unbound DNS server
     Loaded: loaded (/usr/lib/systemd/system/unbound.service; disabled; preset: enabled)
     Active: failed (Result: exit-code) since Mon 2024-10-28 16:01:59 UTC; 18s ago
   Duration: 50min 13.453s
       Docs: man:unbound(8)
    Process: 3385 ExecStartPre=/usr/libexec/unbound-helper chroot_setup (code=exited, status=0/SUCCESS)
    Process: 3388 ExecStartPre=/usr/libexec/unbound-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
    Process: 3391 ExecStart=/usr/sbin/unbound -d -p $DAEMON_OPTS (code=exited, status=1/FAILURE)
    Process: 3393 ExecStopPost=/usr/libexec/unbound-helper chroot_teardown (code=exited, status=0/SUCCESS)
   Main PID: 3391 (code=exited, status=1/FAILURE)
        CPU: 168ms

Oct 28 16:01:59 DNS systemd[1]: unbound.service: Scheduled restart job, restart counter is at 5.
Oct 28 16:01:59 DNS systemd[1]: unbound.service: Start request repeated too quickly.
Oct 28 16:01:59 DNS systemd[1]: unbound.service: Failed with result 'exit-code'.
Oct 28 16:01:59 DNS systemd[1]: Failed to start unbound.service - Unbound DNS server.

为了排除故障,我注释掉了每一行,然后取消注释每一行,直到unbound.service无法重新启动。我发现该行interface: 0.0.0.0是导致错误的原因。我不明白为什么0.0.0.0会导致这个问题。为什么这个 IP 地址会导致这个问题?

系统:

  • 未绑定版本:1.19.2
  • 操作系统:Linux DNS 6.1.63 #218 SMP 星期四 11 月 30 日 20:48:04 CST 2023 aarch64 aarch64 aarch64 GNU/Linux 于 Ubuntu Server 24.04.1
  • unbound -V输出:
root@DNS::/etc/unbound# unbound -V
Version 1.19.2

Configure line: --build=aarch64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=${prefix}/lib/aarch64-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking --with-pythonmodule --with-pyunbound --enable-subnet --enable-dnstap --enable-systemd --enable-cachedb --with-libhiredis --with-libnghttp2 --with-chroot-dir= --with-dnstap-socket-path=/run/dnstap.sock --disable-rpath --with-pidfile=/run/unbound.pid --with-libevent --enable-tfo-client --with-rootkey-file=/usr/share/dns/root.key --disable-flto --enable-tfo-server
Linked libs: libevent 2.1.12-stable (it uses epoll), OpenSSL 3.0.13 30 Jan 2024
Linked modules: dns64 python cachedb subnetcache respip validator iterator
TCP Fastopen feature available


BSD licensed, see LICENSE in source package for details.
Report bugs to [email protected] or https://github.com/NLnetLabs/unbound/issues

更新:

root@DNS:/etc/unbound# unbound -d -vv -c /etc/unbound/unbound.conf
[1730176049] unbound[4263:0] notice: Start of unbound 1.19.2.
[1730176049] unbound[4263:0] error: can't bind socket: Address already in use for 0.0.0.0 port 53
[1730176049] unbound[4263:0] fatal error: could not open ports
networking
  • 2 个回答
  • 84 Views
上一页
下一页

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve