How to access docker container from another machine on local network - networking

I'm using Docker for Windows( I am not using Docker Toolbox that use a VM) but I cannot see my container from another machine on local network. In my host everything is perfect and runs well,however, I want that other people use my container.
Despite being posting the same question in Docker's Forum , The answer was not show it. Plus, I have been looking for here but the solutions found it are about setting up the bridge option in the virtual machine , and as I said before, I am using Docker for windows that no use Virtual machine.
Docker version Command
Client:
Version: 1.12.0
API version: 1.24
Go version: go1.6.3
Git commit: 8eab29e
Built: Thu Jul 28 21:15:28 2016
OS/Arch: windows/amd64
Server:
Version: 1.12.0
API version: 1.24
Go version: go1.6.3
Git commit: 8eab29e
Built: Thu Jul 28 21:15:28 2016
OS/Arch: linux/amd64
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
789d7bf48025 gogs/gogs "docker/start.sh /bin" 5 days ago Up 42 minutes 0.0.0.0:10022->22/tcp, 0.0.0.0:5656->3000/tcp gogs
7fa7978996b8 mysql:5.7.14 "docker-entrypoint.sh" 5 days ago Up 56 minutes 0.0.0.0:8989->3306/tcp mysql
The container I want to use is gogs that is working in the port 5656.
When I use localhost:5656 y 127.0.0.1:5656 work properly, but when I use My local network IP (192.168.0.127) from other machine the container is unreachable.
Thanks in advance.

Solution:
When I installed Docker for Windows, it creates a network called vEthernet (DockerNAT) (Usually with the ip 10.0.75.1)
My local machine had a network called local area connection with the ip 192.168.0.172(With this ip I was trying to access from other PCs).
So far, My local Machine had Two networks Conections so that I went to Control panel > NetWork and Sharing center > Change Adapter Settings I selected the two networks and I right-click selected Add to bridge. That create a Third network called Ethernet.
At this point, I didnt know what was the Ip of Ethernet network, so I executed ipconfig command that show me the ip 192.168.0.17(The settings of local area connection and vEthernet (DockerNAT) disappeared and the ips 10.0.75.1 and 192.168.0.172 stop working).
With this new ip (192.168.0.17) I tried from other machine in the network and finally I could access to the container(192.168.0.17:5656).

In Hyper-V settings, putting "Docker NAT" network in "external" mode worked for me. (I can access to my container on my local network with my host's IP)

Related

ERROR 2002 (HY000): Can't connect to server on 'xxx.xxx.XX' (60) (MariaDB 10.8)

Since a day or so I can not access the databases on two of my servers any longer
I use
mysql -h host.sld.TLD -P 3306 -user user
which I have configured to allow my user from my host without password
but get the above error.
However, when I use
telnet host.sld.TLD 3306
I get
5.5.5-10.8.5-MariaDB-1:10.8.5+maria~ubu2004(si4cyW'Y��-n;{ypDA\)VU)mysql_native_passwordC
I am using homebrew's mariadb (currently 10.9.3) on my machine, which I can reach from the outside. One each of the 'failed' remotes is on ubuntu with 10.8 and one on a Mac also with 10.8, and outgoing works from both. OpenSSL is version 1.1.1s on both Macs
I have installed a number of different mariadb versions all have the same issues, as do their perl libraries. mysql itself works.
What am I doing wrong here?
This issue has been fixed in MariaDB 10.9.4 which was released yesterday. Brew still offers 10.9.3, usually it takes a couple of days until latest 10.9 release will be available via brew.
The issue doesn't affect the server itself, but Connector/C and command line tools which link against Connector/C.
See also: MariaDB connector in Python cannot connect to remote server

Install Kubernetes + Cilium on different networks

There is the following topology:
'left-1', 'left-2', 'right-1', 'right-2', 'center' - hosts (DNS names are same).
"Clouds" - networks.
kubeadm, kubectl, kubelet, docker on all hosts installed correctly.
Kubernetes need install like: 'Master-1' on host 'left-1', 'Master-2' on host 'right-1', and workers on hosts 'left-2' and 'right-2'
All hosts ping each other by the domain name. All ports on all hosts are open. No firewall anywhere.
All hosts have access to the internet.
Here there is a manual to install Kubernetes:
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/
If I install Kubernetes only on 'left-1' and 'left-2' - all works fine.
If I install Kubernetes only on 'right-1' and 'right-2' - all works fine.
But if I install on all nodes - pods from the left do not connect to pods from right, and right pods do not connect to left pods.
How to install Kubernetes on the left and right nodes together?
I use a Cilium network.
I installed a Cilium network with the command:
kubectl apply -f https://raw.githubusercontent.com/cilium/cilium/v1.6.8/install/kubernetes/quick-install.yaml
When i init the first master node, i describe CIDR: 10.217.0.0/16
I tried to install etcd separately from kubernetes. i've got error:
2020-06-25 02:49:37.073290 I | embed: rejected connection from "10.7.0.1:48422" (error "tls: \"10.7.0.1\" does not match any of DNSNames [\"right-1\" \"localhost\"]", ServerName "", IPAddresses ["10.8.1.1" "127.0.0.1" "::1" "10.8.1.1"], DNSNames ["right-1" "localhost"])
10.7.0.1 - it is center, and center is not a part of the etcd cluster. Why etcd checks it?
[left-1]$ traceroute right-1
traceroute to right-1 (10.8.1.1), 30 hops max, 60 byte packets
1 center (10.7.0.1) 1.381 ms 1.252 ms 1.159 ms
2 right-1 (10.8.1.1) 1.068 ms 0.990 ms 0.912 ms
We solved the problem.
Cluster must be created by command:
kubeadm init --config=kubeadm-config.yaml --upload-certs
Where kubeadm-config.yaml contains:
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
kubernetesVersion: 1.18.3
controlPlaneEndpoint: "10.7.1.1:6443"
networking:
podSubnet: "10.217.0.0/16"
etcd:
local:
serverCertSANs: ["10.7.1.1", "10.7.2.2", "10.7.0.1", "10.8.1.1", "10.8.2.2", "10.8.0.1"]
peerCertSANs: ["10.7.1.1", "10.7.2.2", "10.7.0.1", "10.8.1.1", "10.8.2.2", "10.8.0.1"]
Pay attention to yaml-parameters: serverCertSANs, and peerCertSANs : its contain 10.7.0.1 and 10.8.0.1 - these IPs come to node in network packages as client IP and must be registered as trusted IP. If you have another IPs in inter-node interaction, it must be registered too.

Docker / Azerothcore connection configuration, unable to connect

I can not connect to server running on Docker through WoWclient on same computer let alone on network.
Tried changing worldserver.conf inside C:\Users\Seth\azerothcore-wotlk\docker\worldserver\etc to
LoginDatabaseInfo = "127.0.0.1;3306;root;password;acore_auth"
WorldDatabaseInfo = "127.0.0.1;3306;root;password;acore_world"
CharacterDatabaseInfo = "127.0.0.1;3306;root;password;acore_characters"
I've also left it default.
I am able to connect through HeidiSQL with 127.0.0.1 3306 and am able to change realmlist to 127.0.0.1
When I type "docker ps" into gitBash
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ba3bc132e076 azerothcore/worldserver "/azeroth-server/bin…" 24 hours ago Up 11 seconds 0.0.0.0:8085->8085/tcp azerothcore-wotlk_ac-worldserver_1
6b4d4d41f814 azerothcore/authserver "/azeroth-server/bin…" 24 hours ago Up 11 seconds 0.0.0.0:3724->3724/tcp azerothcore-wotlk_ac-authserver_1
8501ee8e2202 azerothcore/database "docker-entrypoint.s…" 24 hours ago Up 12 seconds 0.0.0.0:3306->3306/tcp, 33060/tcp azerothcore-wotlk_ac-database_1
I don't know if I am not doing something right with docker or if its my WoW 3.3.5a client I downloaded.
Problem was Client I downloaded automatically patched config.wtf file to connect to their server. Had to go inside WoTLK\Data\enGB and change realmlist inside there. Not sure if this is true for all clients.
The ip address must refer to your container database address, which is ac-database by default with the Docker setup. For example:
LoginDatabaseInfo = "ac-database;3306;root;password;acore_auth"
so you should NOT use 127.0.0.1 here.
Then you should set your realmlist as:
set realmlist localhost

Failed to start domain SC-1

I am trying to bring common base architecture controller for my ovs setup on the esxi box sles linux os . when i try to bring up my controller i am getting the following error. Could you please help me out.
"unsupported configuration: Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the kvm modules."
Steps followed to bring up my controller
linux-u96x:~/cbavms/products # virsh define SC-1.xml
Domain SC-1 defined from SC-1.xml
linux-u96x:~/cbavms/products # virsh start SC-1
error: Failed to start domain SC-1
error: unsupported configuration: Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the kvm modules.
linux-u96x:~/cbavms/products #
KVM Software tools should be on the controller
patterns-sles-kvm_server - KVM Host Server 12-58.8
patterns-sles-kvm_server-32bit - KVM Host Server
patterns-sles-kvm_tools - KVM Virtualization Host and tools
patterns-sles-kvm_tools-32bit - KVM Virtualization Host and tools
qemu-kvm - Kernel-based Virtual Machine
virt-v2v - Convert a virtual machine to run on KVM
yast2-vm - Configure Hypervisor and Tools for Xen and KVM
check the hardware requirement as mentioned below:
1.1. Hardware Requirements¶
Currently, SUSE only supports KVM full virtualization on x86_64 hosts. KVM is designed around hardware virtualization
features included in AMD (AMD-V) and Intel (VT-x) CPUs. It supports virtualization features of chipsets, and PCI devices,
such as an I/O Memory Mapping Unit (IOMMU) and Single Root I/O Virtualization (SR-IOV)).
You can test whether your CPU supports hardware virtualization with the following command:
egrep '(vmx|svm)' /proc/cpuinfo
If this command returns no output, your processor either does not support hardware virtualization, or this feature has been
disabled in the BIOS.
The following Web site identifies processors which support hardware virtualization:
how to enable the vx-t in virtual machine :
https://forum.ivorde.com/kvm-nested-in-vmware-esxi-5-5-enable-guest-hypervisor-vmx-svm-flags-without-vsphere-web-client-
t19773.html
GO to the VMS vmdk folders and edit .vmx file and add the following flag in that file and save it.
vhv.enable = "TRUE"
Follow the commands below to restart the VM and reboot the machine.
/vmfs/volumes/53071ba5-6f9682d4-5898-002590883ef6/SLES 12 VM # vim-cmd vmsvc/getallvms | grep -i sles
15 SLES-82 [datastore1] SLES 1/SLES 1.vmx sles11_64Guest vmx-08
59 SLES 12 VM [datastore1] SLES 12 VM/SLES 12 VM.vmx sles11_64Guest vmx-08
/vmfs/volumes/53071ba5-6f9682d4-5898-002590883ef6/SLES 12 VM # vim-cmd vmsvc/reload 59
/vmfs/volumes/53071ba5-6f9682d4-5898-002590883ef6/SLES 12 VM #

Unable to execute MPICH2 on multiple machines on ubuntu 12.04 (HYDU_sock_connect issue)

I am facing difficulty in executing MPI program on two machines. The OS is Ubuntu 12.04. And the MPI implementation is MPICH2
ssh is working fine:
root#ubuntu:/home# ssh 192.168.1.9
root#gpuguy's password:
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-29-generic i686)
* Documentation: https://help.ubuntu.com/
131 packages can be updated.
67 updates are security updates.
Last login: Thu Oct 24 17:36:25 2013 from ubuntu.local
root#gpuguy:~#
But when I run my MPI programs it fails:
root#ubuntu:/home# mpiexec -f hosts.cfg -n 4 hello
root#192.168.1.9's password:
[proxy:0:0#gpuguy] HYDU_sock_connect (./utils/sock/sock.c:171): unable to get host address for ubuntu (1)
[proxy:0:0#gpuguy] main (./pm/pmiserv/pmip.c:209): unable to connect to server ubuntu at port 42104 (check for firewalls!)
I have already disabled firewall on both machines that is the reason I can do ssh successfully. But how to solve this issue?
My MPI code runs successfully on single machine.
For MPICH (or any MPI implementation) to work, you need to have passwordless SSH set up. I should also mention that you really shouldn't have to be logged in as root to make this work. It's generally a very bad idea to be logged in as root all of the time.
In /etc/hosts file, add ip address of each server and its hostname.
You should do this for all the servers.
for example:
10.10.0.5 server1
10.10.0.6 server2
10.10.0.7 server3
Just check in /etc/hosts file, not use tab (\t) instead of space to separate between ip address and hostname.
This is wrong:
10.10.0.5 \t server1
This is true:
10.10.0.5 server1
Be careful to not delete or modify existed lines in /etc/hosts file. only add new lines at end of file.
Also, you do not need to disable firewall to fix this issue.

Resources