AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / ubuntu / 问题

All perguntas(ubuntu)

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

libgl1-mesa-dri removido por acidente

  • 5

O Python relatou um problema com o MESA-Loader, então executei os seguintes comandos no Ubuntu 24.04 LTS (para ser honesto, eu realmente não sabia o que estava fazendo):

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

Agora, só estou vendo a linha de comando e nenhuma interface gráfica na máquina.

Tudo o que eu quero é recuperar a interface gráfica (revertendo os comandos acima)

O que eu tentei:

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

O que não ajudou. Quando eu faço, dpkg -l | grep mesaeu recebo:

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 respostas
  • 48 Views
Martin Hope
ashishvijay_
Asked: 2024-10-31 00:25:50 +0800 CST

Alertas frequentes no Ubuntu 24 dizendo: 'Desculpe, o programa "chrome" fechou inesperadamente.'

  • 5

Eu tinha instalado o Google Chrome e comecei a usá-lo, mas depois de um dia, estou recebendo esses avisos com muita frequência. Tentei desinstalar o Google Chrome e o VSCode, e ainda estou recebendo esses alertas.

Problema no chrome

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

Tela cheia resulta em tela inteira de linhas horizontais

  • 6

Após a atualização do Ubuntu 24.04, o Firefox não tem problemas, enquanto no Chrome, todas as telas cheias no YouTube e em um outro site preenchem a tela com linhas horizontais verdes e amarelas. Parece:

Uma tela cheia de linhas amarelas e verdes

Uma tentativa de fazer uma captura de tela retorna brevemente para uma tela normal congelada.

Alguns outros programas em tela cheia também resultam na mesma tela listrada de amarelo/verde: VLC player e Visual Studio Code; enquanto outros, como o Stremio, não apresentam problemas com tela cheia.

Conectar uma tela externa anula o problema em todos os programas que verifiquei (Chrome e VLC), a tela cheia funciona sem problemas tanto na tela principal quanto na secundária. Desconectar a tela externa resulta em voltar para as listras amarelas/verdes quando em tela cheia.

Perguntei sobre isso no suporte do Chrome.google em setembro, mas não recebi resposta.

No caso do Chrome, tentei: desabilitar extensões do Chrome, desabilitar a aceleração de hardware, limpar o cache e os cookies e reinstalar o Chrome; mas não vi nenhuma melhora.

Tentei descobrir quais drivers de GPU tenho para meu Intel® UHD Graphics 620 (WHL GT2). Segui as instruções da Intel daqui , mas cheguei a um beco sem saída. 'clinfo' mostra o número de plataformas 0, e não consegui entender o porquê. 'Software e atualizações', na aba 'Drivers adicionais' diz que não tenho nenhum driver proprietário em uso e nenhum driver adicional (está vazio).

Não encontrei perguntas sobre o mesmo problema. Alguém mais encontrou um problema semelhante e o que tentou? Não tenho certeza do que verificar e apreciaria qualquer ajuda e sugestões

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

Como verificar se todos os IPs de domínio resolvidos são de um resolvedor DNS externo quando o Unbound está configurado para encaminhar consultas de domínio?

  • 8

Configurei o Unbound para:

  1. ouvir consultas de domínio em todas as interfaces em uma LAN,
  2. encaminhar essas consultas de domínio para um resolvedor DNS externo via TLS,
  3. receber os IPs de domínio resolvidos do resolvedor DNS externo e devolvê-los aos clientes correspondentes.

Como verifico se tal configuração está funcionando? Especialmente, como verifico que:

  1. O Unbound encaminhou as consultas de domínio para o resolvedor DNS externo desejado via TLS?
  2. Os IPS de domínio resolvidos são do resolvedor DNS externo e não são resolvidos pelo Unbound?

Abaixo estão dois resultados de digging google.com. Como posso usar esses resultados para fazer as verificações mencionadas acima?

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

Abaixo estão os logs unbound.logcom verbosity: 3depois de reiniciar o unbound.servicee executar o comando dig acima duas vezes. Posso ver que o resolvedor DNS externo é mencionado, mas não consigo entender qual linha mostra que ele resolveu o domínio e retorna os resultados para unbound.

[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 respostas
  • 73 Views
Martin Hope
Sun Bear
Asked: 2024-10-30 12:13:59 +0800 CST

unbound[6165:0] erro fatal: não foi possível configurar o controle remoto

  • 5

Esta é uma pergunta de acompanhamento para minha 2ª pergunta . A solução de @mpboden foi implementada. Além disso, adicionei auto-trust-anchor-file:e enabled remote-control:, conforme definido no exemplo Unbound para Setting up para o restante do exemplo de rede .

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

No entanto, descobri 4 erros e 1 mensagem de falha usando o modo de depuração. Com meus esforços de solução de problemas, descobri que essas mensagens de erro e falha ocorriam sempre que control-enable: yesera permitido.

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

Verifiquei que /var/lib/unbound/root.keyexiste. O Unbound ainda funciona, mas unbound-controlnão pode ser usado. O Unbound está procurando, /etc/unbound/unbound_server.pemmas este arquivo não existe. Como resolvo este problema de configuração de controle remoto?

Atualizar:

com a resposta do @mpboden , descobri que o comando unbound-control-setupserve para criar esses arquivos em /etc/unbound: unbound_control.pem, unbound_server.pem, unbound_control.key, unbound_server.key, para permitir o controle remoto.

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 respostas
  • 41 Views
Martin Hope
MIke
Asked: 2024-10-30 08:44:19 +0800 CST

Por que o bash não relata o erro de linha onde se omite o " no final

  • 6

Minha pergunta é por que o bash não reporta a linha 2, onde parei o " final de propósito, para ver como ele reporta isso de volta.

Eu executo um script bash e recebo este erro: ./test: linha 4: EOF inesperado ao procurar por `"' correspondente

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

Como faço para fixar a versão apt do Firefox no Ubuntu 22.04?

  • 7

Segui as instruções no site de suporte da Mozilla :

Instalar o pacote Firefox .deb para distribuições baseadas em Debian (recomendado)

Para instalar o .debpacote através do repositório APT, faça o seguinte:

  1. Crie um diretório para armazenar as chaves do repositório APT caso ele não exista:

    sudo install -d -m 0755 /etc/apt/keyrings
    
  2. Importe a chave de assinatura do repositório 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

    Caso não tenha wgetinstalado, você pode instalar com:sudo apt-get install wget

  3. A impressão digital deve ser 35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3. Você pode verificar com o seguinte comando:

    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. Em seguida, adicione o repositório Mozilla APT à sua lista de fontes:

    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. Configure o APT para priorizar pacotes do repositório Mozilla:

    echo '
    Package: *
    Pin: origin packages.mozilla.org
    Pin-Priority: 1000
    ' | sudo tee /etc/apt/preferences.d/mozilla
    
  6. Atualize sua lista de pacotes e instale o .debpacote do Firefox:

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

Então agora eu tenho:

$ 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**         -

Não me importo de ter ambas aptas snapversões instaladas no meu sistema. O problema é que a aptversão é desinstalada quando uma atualização de software é feita, mesmo que o passo "Configurar APT para priorizar pacotes do repositório Mozilla" tenha sido feito.

Como faço para impedir que a aptversão seja desinstalada e substituída por snapatualizações de software?

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

Por que o DNS não vinculado falhou ao escavar um domínio?

  • 8

Esta é uma pergunta de acompanhamento para minha pergunta anterior . Abaixo está o /etc/unbound/unbound.confarquivo:

# 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

Com unbound.serviceiniciado, tentei digum domínio através do servidor local não vinculado:

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

Não entendo por que WARNING: recursion requested but not availableunbound é configurado para ser um resolvedor recursivo por padrão. Também. SERVER: 192.168.1.50#3000(192.168.1.50) (UDP)mostra que unbound foi usado, no entanto, ele falhou em obter o domínio. O que está errado e como eu conserto esse problema?

Abaixo mostramos a resposta via systemd-resolved.serviceservidor stub:

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

Atualizar:

Após corrigir a sub-rede, como mencionado pela resposta de @mpboden, o digcomando só funcionou uma vez. Por que esse é o caso?

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 respostas
  • 310 Views
Martin Hope
Paul Jurczak
Asked: 2024-10-29 11:31:25 +0800 CST

Por que esse script bash não é executado na inicialização?

  • 7

Este test.shscript:

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

funciona bem no terminal no Ubuntu 20.04.6 com este comando:

nick@jetson:~$ ./test.sh

Quando eu o adiciono às Preferências de Aplicativos de Inicialização com:

insira a descrição da imagem aqui

não funciona. O que está errado?


Esta pergunta é diferente de Como inicio aplicativos automaticamente no login?. Não estou perguntando como inicio aplicativos automaticamente no login. Estou perguntando por que um comando diferente tem que ser usado na Commandlinha de comando Add Startup programdo que o comando que eu digito no terminal em ~pasta.

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

Por que a interface: 0.0.0.0 está causando falha ao reiniciar o unbound.service?

  • 7

unbound.serviceé executado sem erro quando estes 3 arquivos padrão (criados após a instalação do unbound) são usados:

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"

No entanto, quando esses 3 arquivos são removidos e o conteúdo é /etc/unbound/unbound.conffeito para conter

# 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.servicefalha ao reiniciar usando service unbound restart. por exemplo

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.

Para solucionar o problema, comentei cada linha, seguido de descomentei cada linha até que unbound.servicefalhou ao reiniciar. Descobri que a linha interface: 0.0.0.0é a causa do erro. Não consigo descobrir o que 0.0.0.0está causando o problema. Por que esse endereço IP está causando esse problema?

Sistema:

  • Versão não consolidada: 1.19.2
  • SO: Linux DNS 6.1.63 #218 SMP Qui Nov 30 20:48:04 CST 2023 aarch64 aarch64 aarch64 GNU/Linux no Ubuntu Server 24.04.1
  • unbound -Vsaída:
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

Atualizar:

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 respostas
  • 84 Views
Prev
Próximo

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Existe um comando para listar todos os usuários? Também para adicionar, excluir, modificar usuários, no terminal?

    • 9 respostas
  • Marko Smith

    Como excluir um diretório não vazio no Terminal?

    • 4 respostas
  • Marko Smith

    Como descompactar um arquivo zip do Terminal?

    • 9 respostas
  • Marko Smith

    Como instalo um arquivo .deb por meio da linha de comando?

    • 11 respostas
  • Marko Smith

    Como instalo um arquivo .tar.gz (ou .tar.bz2)?

    • 14 respostas
  • Marko Smith

    Como listar todos os pacotes instalados

    • 24 respostas
  • Martin Hope
    Flimm Como posso usar o docker sem sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp Como faço para salvar a saída do terminal em um arquivo? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd Como descompactar um arquivo zip do Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    TheXed Como instalo um arquivo .deb por meio da linha de comando? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan Como listar todos os pacotes instalados 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    David Barry Como determino o tamanho total de um diretório (pasta) na linha de comando? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "Os seguintes pacotes foram retidos:" Por que e como resolvo isso? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford Como os PPAs podem ser removidos? 2010-07-30 01:09:42 +0800 CST

Hot tag

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

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve