wget: unable to resolve host address 'terraria.org' - wget

I am very unfamiliarized with linux and I have a spare pc lying around, I installed Ubuntu Server 20.04.4 LTS. It's all connected to the internet and I have verified that, but when I run:
terraria#mc-ubuntu:~$ wget https://terraria.org/api/download/pc-dedicated-server/terraria-server-1436.zip -O server.zip
all that it gives me is this that of which I have no clue what to do:
wget: unable to resolve host address 'terraria.org'
I need help, and yes I have tried in root, same output.

I checked if mentioned file exists using --spider option
wget --spider https://terraria.org/api/download/pc-dedicated-server/terraria-server-1436.zip
output
Spider mode enabled. Check if remote file exists.
--2022-06-28 10:19:47-- https://terraria.org/api/download/pc-dedicated-server/terraria-server-1436.zip
Resolving terraria.org (terraria.org)... 188.114.96.13, 188.114.97.13
Connecting to terraria.org (terraria.org)|188.114.96.13|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 43392536 (41M) [application/zip]
Remote file exists.
so URL you have used seems to be correct, therefore I suspect issue with DNS lookup. wget is unable to find IP address corresponding to terraria.org. You need to add some nameserver aware of terraria.org to /etc/resolv.conf file, I suggest trying Google one that is add following line
nameserver 8.8.8.8
to /etc/resolv.conf then write if it did help (I do not have ability to test that)

Related

Busybox wget strange behaviour

I need some help with a really strange problem.
I use wget (busybox) to obtain the the IP address of some remote clients, to use it on a DNS (a sort of "homemade ddns"). Those clients run a script that every 5 mins calls
wget -O /dev/null "https://my_dns.org/poll.php?user=User_N&pwd=password_N"
Everything was fine, until I updated my http server to remove TLS1.0/TLS1.1
After updating: running the above command on the clients' console it still works OK, while running it automatically (launching it from a script in /etc/init.d) I get this error:
Connecting to my_dns.org (www.xxx.yyy.zzz:443)
wget: error getting response: Connection reset by peer
...Any idea about why does this happen, and how to fix...?
(The shell on the clients runs as root...)
Thank you in advance for your help
Regards

Yarn: Error: connect ECONNREFUSED 127.0.0.1:443

When I install ELM via yarn, I get
-- ERROR -----------------------------------------------------------------------
Something went wrong while fetching the following URL:
https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz
It is saying:
Error: connect ECONNREFUSED 127.0.0.1:443
NOTE: You can avoid npm entirely by downloading directly from:
https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz
When I manually browse to https://github.com/elm/compiler/releases/download/0.19.1/binary-for-windows-64-bit.gz. I get
However other people can access the link and it downloads the file.
EDIT:
HOSTS File:
127.0.0.1 view-localhost # view localhost server
127.0.0.1 mydevsnapcap.com www.mydevsnapcap.com app.mydevsnapcap.com internal.mydevsnapcap.com
0.0.0.1 mssplus.mcafee.com
Edit
This use to work a few days ago.
More tests:
I cannot access it from my phone and pc using my fibre connection, but I can access it on both my phone and mobile using my mobile connection.
It turns out that it was my ISP that was for some reason blocking the link. I switch to using the google dns and all is good in the hood: https://developers.google.com/speed/public-dns/docs/using
Something in your computer or on your network is resolving the domain github.com to 127.0.0.1, i.e. localhost. Hence, everytime you attempt this access, it tries to reach a service running on the very same computer you're making the request from.
Check your DNS settings.
Check that there are no entries for github.com in the hosts file (on Windows C:\Windows\System32\drivers\etc\hosts, everywhere else /etc/hosts).
If you're running something like Pi-Hole on your network, check, that it doesn't catch github.com

can ping 8.8.8.8 but not google.com

I just got a new router and internet connection.
My phone and my second computer have no problem to connect to internet (wifi or cable). My first computer, where I am running Limux Mint 18.1 Serena, can connect with cable or wifi but I am unable to browser.
I can ping 8.8.8.8 but not google.com.
I do not understand much of DNS but I tried to follow some online tutorials.
I tried to modify the /etc/resolconf directory by adding a resolv.conf file with a new servername but didn't work (even after restarting network-manager). I tried as well to modify the /etc/resolv.conf.d/tail file (as read in other tutorials) by adding a new servername but still not working.
Any suggestion?
Your DNS resolving doesn't work.
Check your firewall for an open port UDP/53 to 8.8.8.8
# iptables -L -n -v
Check with your ISP for DNS server provided. They are probably blocking UDP/53 somewhere on the way out to force you to use internal DNS server.
If you are on DHCP, renew the lease.
Depends on distro (most probably networkmanager, ifdown/ifup combination may work as well). This happens quite often with resolvconfd and dnsmasq. You may need to restart the NetworkManager then
Again - command depends on distro, usually with systemd
# systemctl restart NetworkManager
If you are on static IP and have noone to ask or check their config, you may sniff (tcpdump -nnvv -i <interface> udp port 53).
The problem occurs due to trouble with DNS setting
If you are using linux follow:
Clear this file content (root permission required)
nano /etc/resolv.conf
Add the folling text:
nameserver 1.1.1.1
nameserver 8.8.8.8
Save and Reboot
If using Windows Follow:
Control Panel\Network and Internet\Network and Sharing Center
Select current active connection (wifi/broadband)
Properties > Networking > ipv4 > custom dns > 1.1.1.1 & 8.8.8.8
check Validate setting upon exit > save

Rye::Box commands failing on remote server

Firstly, I can ssh into the remote server and execute the following commands
cd public_html
du -sh
each successful & exiting with code 0.
Automating the process with Rye::Box & with option safe: false
rbox.cd :public_html
does change directory but also returns exit code -1
rbox.execute 'du -sh'
fails with error message "SocketError::getaddrinfo: Name or service not known"
Would appreciate an explanation if possible.
Check your hosts entry for 127.0.0.1
You might have to add a hostname in /etc/hosts for 127.0.0.1.
A similar question addresses this issue on SO.
See also
SocketError (getaddrinfo: Name or service not known) - Sunspot/Solr Rails development

Errno 256 No more mirrors to try centos 6.6

I am trying to install metasploit on crentos 6.6 server
now when i tried to yum install or wget or even git any bundle i got errors
then after alot of search i found that it is a problem in the DNS so i tried to edit /etc/resolv.conf
and add 8.8.8.8 as name server it worked fine but after server reboot or even eth0 restart it keeps returning without the modifications i made
this is my /etc/resolv.conf content
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
is there any solution for this problem
I remember I got similar errors with CentOS.
Problem was: No internet connection.
First check a network connection:
#ping google.com
If there is no connection. You have to debug this first.
You are getting your networking configuration from DHCP but your DHCP server is failing to give you any DNS server addresses.
Did you try doing what that file tells you to do? Because that will "fix" your problem for you (assuming you don't choose to get your DHCP server fixed to provide you with DNS servers correctly).
Check location /etc/yum.repos.d/mongodb-org-3.2.repo
Delete all the irrelevent repositories in that location but be careful at that. Ex:- delete datastax repo which may be present
Run yum clean all
Run yum update