Unable to reach localhost from Chrome, after having installed Rancher desktop on Windows 10 - google-chrome

After having installed Rancher desktop on my Windows 10 laptop, I cannot reach services listening on localhost through Chrome. Rancher desktop is configured to support Moby/dockerd.
The error reported by Chrome is:
This site can’t be reached
The connection was reset.
Try:
Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
ERR_CONNECTION_RESET
Replacing localhost with 127.0.0.1 they are reachable, instead.
Ping resolves localhost to 127.0.0.1 correctly:
PS C:\> ping localhost
Pinging xxxxxxxxxx [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
PS C:\>
I noticed that the hosts file (C:\Windows\System32\drivers\etc\hosts) contains the following entry:
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section
I tried to add
127.0.0.1 localhost
to the hosts file, unsuccessfully.
I tried to run the following:
netsh winsock reset
netsh int ip reset
ipconfig /release
ip/config /renew
ipconfig /flushdns
and to restart the pc, but it didn't work, either.
I also tried solutions to similar problems, like:
Localhost not working in Chrome, 127.0.0.1 does work
chrome wont let me access localhost (it google searches instead)
Any suggestion to solve the problem?

Related

Locked out of SSH terminal

I manated to lock myself out of SSH on an Canonical-Ubuntu-22.04 SSH always free server. do anyone know how i can get access back?
PS C:\Users\mikel> ssh -i ~/.ssh/ssh-key-2022-10-19.key ubuntu#129.xxx.200.16
ssh: connect to host 129.xxx.200.16 port 22: Connection refused
ssh: connect to host 129.xxx.200.16 port 22: Connection refused
means the remote host is sending the reject flags back, it can be due to
firewall blocking ssh port
iptables blocking port 22
security groups (Ingress, egress) blocking port 22
First check if you have allowed port 22 in console, if yes
then login to instance via console connection and then try to debug 1,2 points

Oracle Cloud Infra connection between instances not working

I have two instances in Oracle Cloud Infra. Both running Ubuntu 20.4. I have very strange problem. I cannot access Apache on instance 1 from 2 or even from public IP. Both instances are part of same Subnet. I have enable traffic from Security list, NSG. I can ping and SSH but just can't access apache page on port 80
ubuntu#docker1:~$ ping 10.100.246.237
PING 10.100.246.237 (10.100.246.237) 56(84) bytes of data.
64 bytes from 10.100.246.237: icmp_seq=1 ttl=64 time=0.410 ms
64 bytes from 10.100.246.237: icmp_seq=2 ttl=64 time=0.662 ms
^C
--- 10.100.246.237 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1022ms
rtt min/avg/max/mdev = 0.410/0.536/0.662/0.126 ms
ubuntu#docker1:~$ curl http://10.100.246.237
curl: (7) Failed to connect to 10.100.246.237 port 80: No route to host
ubuntu#docker1:~$
Instance 1 Docker1 = 10.100.246.50
Instance 2 Docker2 = 10.100.246.237
I tried using Oracle Linux but still same problem.
You also need to open the port 80 in your firewall on your Ubuntu instances.
By default Ubuntu comes with UFW (Uncomplicated Firewall) so you can open the port with something like this : sudo ufw allow 80/tcp.
Oracle Linux uses firewalld.

Can`t connect to mysql server on X.X.X.X on Windows

As the title says I want to connect remotely to mysql and it is on windows server but I got this error message.
Cant connect to mysql server on X.X.X.X
I am tring it with HeidiSql
I have MariaDB installed.
Also I can connect to server using remote connection.
Server is running and can connect to mysql localy
What have I tried:
I located my my.ini file and checked that I dont have one of these commands:
Skip-networking
bind-address = some IP
I didnt have them there in the first place
I logged in my MariaDB terminal and granted all permisions to user using this:
GRANT ALL PRIVILEGES ON *.* TO 'root'#'192.168.100.%'
IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;
I have added port 3306 to windows firewall
I guess it is worth mentioning that I cant ping that server either
if I do
ping X.X.X.X
it returns:
Pinging X.X.X.X with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for X.X.X.X:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
I have spent many hours on forums and tried all instructions but still cant connect.
Any help would be much appreciated!
The detailed problem can be from two different causes:
First option:
MySQL is binded to 127.0.0.1 or no ip at all. Check netstat on windows cmd for locating 3306 port opened to mysql process and binded to your network LAN interface or 0.0.0.0 (not to loopback / 127.0.0.1 // ::1)
For check netstat, use netstat -a -n -o, you can see in the response the PID of the process too.
For check MySQL is working on the same machine, try to connect from local console using mysql -h 127.0.0.1 (for localhost connection) or mysql -h (your LAN IP) (If you have mysql binded only to your LAN IP address).
Second option:
If first test are OK. Maybe windows firewall is not configured correctly. Try to disable windows firewall (double check disabling it). The error response on your question are because windows firewall are active and blocking connections. When you have verified you can reach 3306 with firewall off, enable it and configure. Check always you're opening the port on the required network profile (Remember, windows firewall can have different rules for private / public connections).
For check firewall correctly configured, try to access to the 3306 port on the computer from another comp on the LAN.
If you have a huge LAN network with VLANs and similar technologies, check your routing topology. Also, remember always for initial checks, disable windows firewall. Your ping are failing because firewall are enabled.

redmine email configuration with smtp

I installed Redmine 2.6.1.1 using Bitnami on Win 7, but couldn't figure out why redmine cannot send any email. I edited the configuration.yml file under \redmine-2.6.1-1\apps\redmine\htdocs\config and tried to send a test mail via both Gmail and our own e-mail server, but it didn't work.
My configuration.yml file is just like below:
default:
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: smtp.gmail.com
port: 587
domain: smtp.gmail.com
authentication: :plain
user_name: "someusername#gmail.com"
password: "somepassword"
In this configuration the error is:
an error occurred while sending mail (a socket operation was attempted to an unreachable network. - connect (2))
If I change the address and domain values with IP addresses then the error becomes:
an error occurred while sending mail (Permission denied - connect(2))
If I try to configure it with the values of our own mail server, then I still get the second error (permission denied).
I tried it in another PC and it worked. However, the same configuration in the old PC, it does not work. 2 PCs are in the same network and the only difference between 2 installations is that I did not configure mail settings during the Bitnami installtion in the old machine. After the installation was completed, I modified configuration.yml. However, in the new PC, I configured it during the installation.
I could solve the problem finally. The reason is McAfee security. When I disable McAfee's "Access Protection" task, it worked without any problem.

error 2003 : can't connect on '192.168.1.180' (10061)?

I am trying to log into server using -
mysql -u abc -p abc -h 192.168.1.180
But getting error -
error 2003 : can't connect on '192.168.1.180' (10061)
Please help me out how to connect.
I am using window 7 and trying to connect win xp.
i am able to ping win 7 but win 7 not able to ping me(just for information).
10061 is 'network connection refused'.
Check if mysql is actually listening with:
netstat -an | find '3306'
That line, run on the host which has mysql running on it, will tell you if mysql has an open network port. If mysql is actually externally accessible, it should return one line something like this(pardon me, I run linux so from memory..):
TCP 0.0.0.0:3306 0.0.0.0:0 LISTENING
Translation..
mysql is listening on all adapters: 0.0.0.0
listening on port 3306 :3306
3306 is the default port.
I believe my.cnf has to have bind-address un-commented to enable network connections though.
Edit: so if it is listening, try getting to it from the other box without involving mysql yet:
telnet <mysqlboxip> 3306
if that fails, you have a firewall issue.
Edit: Barring a firewall issue, next guess is you have mis-configured one of your network adapters. Make sure the netmask is the same on both machines, and (without explaining networking) you don't change anything but the last number when changing the address.. For your average home network, netmask should most likely be 255.255.255.0, and ip address should be in the 192.168.(1 or 15).(2-254)
If in doubt, turn dhcp back on, and look at what your router gives you for an address/netmask with:
ipconfig -a
Most home routers reserve upper addresses for dhcp assigned, so pick a low one. Stay outside the range used by the router for dhcp basically.
To see where the machine thinks it should sending the traffic:
tracert <mysqlboxip>
An incorrect netmask or a faulty route on either box could cause the traffic destined for the other box to go out the public internet way or off into nothingness.
There shoudn't be space between -p and abc as abc is password
mysql -u abc -pabc -h 192.168.1.180
Also Check bind-address in my.cnf it should be commented and also check your firewall settings.
First you confirm this address is being ping by doing this
ping 192.168.1.180