pgool2 watchdog not listening on Virtual IP interface - watchdog

I have set up a pgpool in replication mode with watchdog having a Virtual IP (unused one).
The pgpool and watchdog startup completes successfully.
Virtual eth0:0 interface is created with the specified IP 192.168.143.95. pgPool is configured to run at port 5432
When trying to connect to the virtual IP:port the psql command psql -h 192.168.143.95 -p 5432 -l says
psql: could not connect to server: Connection refused
Is the server running on host "192.168.143.95" and accepting
TCP/IP connections on port 5432?
apparently, there is no listening socket on any port for the virtual ip address.
Does anybody have a similar working configuration?
Are there some unspecified requirements for the Virtual IP address (like same subnet with pgpool interface) ?
I will be thankful for any suggestions as to why this may not work.
Thanks a lot

You need to have the netmask of the virtual IP as the same range as pg instance. Also make sure you don't have firewall opened.

Related

How to ping instance's internal network from Host on Devstack

I am running Devstack on my machine and i would like to know if it is possible to ping an instance from Host. The default external network of Devstack is 172.24.4.0/24 and br-ex on Host has the IP 172.24.4.1. I launch an instance using the internal network of Devstack (192.168.233.0/24) and the instance gets the IP 192.168.233.100. My Host's IP is 192.168.1.10. Is there a way to ping 192.168.233.100 from my Host? Another thing i thought is to boot up a VM directly to the external network (172.24.4.0/24) but the VM does not boot up correctly. I can only use that network for associating floating IP's.
I have edited the security group and i have allowed ICMP and SSH, so this is not a problem.

How to setup network setting on virtual box so that i can do ssh - mac os

I am setting up a virtual machine via virtual box and after setting it up with an installed ubuntu. I want to be able to ssh on the my machine. I don't know which network setting to use.
I tried to change the adapter1 from NAT to Bridge Adapter, but after doing that I couldn't start my vm disk.
In the VirtualBox settings press network, then adapter 1. Select NAT, then press advanced. Here you can press Port Forwarding and you can add a new port forwarding rule. The default for SSH is 22. I would suggest using localhost IP (127.0.1.1) on for example port 2222 and then you can ssh using the command.
Just to be clear port forward setup:
name 'port-fwd', protocol TCP, host IP 127.0.0.1 host port 2222 guest IP 10.0.2.15 guest port 22. Then you can run:
ssh -p 2222 user#127.0.0.1

The VM can ping the host machine, but can not ping other public IP

I in a remote Server (I call it host machine) setup the OpenStack Ocata.
And in the OpenStack Ocata I created a VM, the VM use the Security Group (named allow ping & ssh), which is created by myself:
Now, I can use my Mac ping the VM. but can not ssh connect to the VM.
And in the VM(it's IP is 192.168.1.4 and floating IP is 103.35.202.3), I can ping 192.168.1.1 and 103.35.202.1(the host machine's public IP), but can not ping google.com or other public IP.
Why in my Mac I can ping the VM but can not ssh to it?
Why in the VM I can ping the host machine, but can not ping other public IP?
where is the issue?
Currently the only Egress traffic allowed out is for ICMP. Egress is missing for TCP/UDP. Add in Egress rules for both UDP (should help resolve the DNS issue) and TCP (should resolve the SSH issue.)
After adding in the Egress rules for TCP - test ssh again.
After adding in the Egress rules for UDP - test DNS resolution, if you are still running into issues then you may want to verify the DNS servers used when configuring the network.

Boot2Docker: how to access container with Bridged Networking

I am running Boot2Docker in Virtual Box on Windows, using VB bridged networking. The IP address of my PC (192.168.2.2) and of the VM (192.168.2.30) is determined by the DHCP server.
I have configured the docker bridge as follows:
File /var/lib/boot2docker/profile:
EXTRA_ARGS='--bip=192.168.2.192/25 --fixed-cidr=192.168.2.224/27'
From my Windows PC I can successfully ping the folloing IP addresses:
192.168.2.30 (ip address of eth1 in the Docker Host)
192.168.2.192 (ip address of docker0)
However I cannot ping any container that I start. E.g. for container IP 192.168.2.226,
I get a reply from 192.168.2.2 (my PC address) that the Desitination Host is unreachable.
How can I get this to work?
I figured it out in the meantime:
On Windows 7, from an elevated cmd shell do:
route add 192.168.2.224/27 192.168.2.30
This way the IP packets find their way to the containers!

Connection to a local Tomcat server through virtual interfaces

I am hoping to connect to a Tomcat server on a local host from virtual machines running on VMWare Station that connects to the host with a NAT virtual network.
I started a Tomcat server with port 8080 on my host PC.
The host normally has the following interfaces:
Loopback interface, IP: 127.0.0.1
An interface for the ethernet, IP: 10.10.31.194 Gateway: 10.10.31.254
The IP and DNS values are automatically assigned.
A virtual interface for the virtual network VNet8, IP: 192.168.129.1 Gateway: 192.168.129.2
The IP and DNS values are automatically assigned. (This interface appears after the VMNet 8 is setup, to reduce confusion)
I can connect to a webpage (say /helloProject/helloPage.html) on the Tomcat server with the following URLs:
http://127.0.0.1:8080/helloProject/helloPage.html
http://10.10.31.194:8080/helloProject/helloPage.html
Then I setup my VMWare Station and opened a Network Address Translation network with the following configurations:
VMNet8
DHCP: Enabled
Subnet Address: 192.168.129.0
Subnet Mask: 255.255.255.0
Gateway IP: 192.168.129.2
But I cannot connect to the helloPage.html webpage through:
http://192.168.129.1:8080/helloProject/helloPage.html
Either from the host itself with IP 192.168.129.1, or from a Linux CentOS virtual machine with IP 192.168.129.128 on the same network.
However, pinging the host from the host or the Linux VM I get response:
ping 192.168.129.1
Reply from 192.168.129.1: bytes=32 time<1ms TTL=128
...
Can anyone suggest something to try so as to make the connection work?
In addition: VM (192.168.129.128) can reach Gateway (192.168.129.2) as well as host (192.168.129.1). But host (192.168.129.1) cannot reach Gateway (192.168.129.2), ping no response. Strange.
Check if you have adress=0.0.0.0 in server.xml Connector's tag for port 8080. It will tell Tomcat to listen on all interfaces available on the host.
Restart Tomcat after the change.

Resources