Pg_hba.conf problem after unexpected IP change
Pg_hba.conf problem after unexpected IP change
От:
Yessica Brinkmann <brinkmann.yessica@gmail.com>
Дата:
Hello. I write for the following reason: I had configured a pg_hba.conf file, which I am using with some debian virtual machines, to be able to communicate between two different virtual machines.
Well, it turns out that at one point when I was using my virtual machines, suddenly and unexpectedly, the IP of one of the virtual machines changed.
I was trying to find out why the commands that I was executing between one virtual machine and the other did not work for me, until finally I came to the conclusion that the IP of one of my virtual machines had changed.
Well, then, I went to modify my pg_hba.conf file so that it reflected the new IP that I did not know why it changed, and to continue communicating between the two virtual machines, but it turns out that when I change my pg_hba.conf file, the connection still does not work for me .
The new line in my pg_hba.conf file is as follows:
host ds2 postgres 192.168.52.153/32 trust
and the line above was:
host ds2 postgres 192.168.52.150/32 trust
I clarify that right now when doing ip addr in the virtual machine whose IP changed unexpectedly, the following IP address appears: 192.168.52.153/24.
I will greatly appreciate a help please.
Regards,
Yessica Brinkmann
Re: Pg_hba.conf problem after unexpected IP change
От:
Adrian Klaver <adrian.klaver@aklaver.com>
Дата:
On 11/11/21 17:14, Yessica Brinkmann wrote: > Hello. I write for the following reason: I had configured a pg_hba.conf > file, which I am using with some debian virtual machines, to be able to > communicate between two different virtual machines. > Well, then, I went to modify my pg_hba.conf file so that it reflected > the new IP that I did not know why it changed, and to continue > communicating between the two virtual machines, but it turns out that > when I change my pg_hba.conf file, the connection still does not work > for me . Did you reload or restart the server after making the change? > I clarify that right now when doing ip addr in the virtual machine whose > IP changed unexpectedly, the following IP address appears: > 192.168.52.153/24 . > I will greatly appreciate a help please. > Regards, > Yessica Brinkmann > -- Adrian Klaver adrian.klaver@aklaver.com
Re: Pg_hba.conf problem after unexpected IP change
От:
Yessica Brinkmann <brinkmann.yessica@gmail.com>
Дата:
Hello.
Thank you very much for your answer.
Yes, I restart the server after making the changes.
Regards,
Yessica Brinkmann
El jue, 11 nov 2021 a las 22:41, Adrian Klaver (<adrian.klaver@aklaver.com>) escribió:
On 11/11/21 17:14, Yessica Brinkmann wrote:
> Hello. I write for the following reason: I had configured a pg_hba.conf
> file, which I am using with some debian virtual machines, to be able to
> communicate between two different virtual machines.
> Well, then, I went to modify my pg_hba.conf file so that it reflected
> the new IP that I did not know why it changed, and to continue
> communicating between the two virtual machines, but it turns out that
> when I change my pg_hba.conf file, the connection still does not work
> for me .
Did you reload or restart the server after making the change?
> I clarify that right now when doing ip addr in the virtual machine whose
> IP changed unexpectedly, the following IP address appears:
> 192.168.52.153/24 <http://192.168.52.153/24>.
> I will greatly appreciate a help please.
> Regards,
> Yessica Brinkmann
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Re: Pg_hba.conf problem after unexpected IP change
От:
Dave Cramer <davecramer@postgres.rocks>
Дата:
On Fri, 12 Nov 2021 at 06:12, Yessica Brinkmann <brinkmann.yessica@gmail.com> wrote:
Hello.Thank you very much for your answer.Yes, I restart the server after making the changes.Regards,Yessica Brinkmann
Check the logs for postgres to make sure there were no errors in your new configuration.
Dave Cramer
www.postgres.rocks
Re: Pg_hba.conf problem after unexpected IP change
От:
Yessica Brinkmann <brinkmann.yessica@gmail.com>
Дата:
Thank you very much for your answer.
Regards,
Yessica Brinkmann
El vie, 12 nov 2021 a las 9:22, Dave Cramer (<davecramer@postgres.rocks>) escribió:
On Fri, 12 Nov 2021 at 06:12, Yessica Brinkmann <brinkmann.yessica@gmail.com> wrote:Hello.Thank you very much for your answer.Yes, I restart the server after making the changes.Regards,Yessica BrinkmannCheck the logs for postgres to make sure there were no errors in your new configuration.Dave Cramerwww.postgres.rocks
Re: Pg_hba.conf problem after unexpected IP change
От:
Adrian Klaver <adrian.klaver@aklaver.com>
Дата:
On 11/12/21 10:34 AM, Yessica Brinkmann wrote: > Thank you very much for your answer. Did you find the problem? If not have you investigated whether whatever changed the IP also enabled a firewall rule that blocks port(5432 I'm assuming)? > Regards, > Yessica Brinkmann > > > El vie, 12 nov 2021 a las 9:22, Dave Cramer > () escribió: > > > > > On Fri, 12 Nov 2021 at 06:12, Yessica Brinkmann > > > wrote: > > Hello. > Thank you very much for your answer. > Yes, I restart the server after making the changes. > Regards, > Yessica Brinkmann > > > Check the logs for postgres to make sure there were no errors in > your new configuration. > > Dave Cramer > www.postgres.rocks > > -- Adrian Klaver adrian.klaver@aklaver.com
Re: Pg_hba.conf problem after unexpected IP change
От:
Yessica Brinkmann <brinkmann.yessica@gmail.com>
Дата:
Hello.
Thank you very much for your answer.
The configuration actually works for me. After restarting my computer, I went to test again and it was already working. I assume that perhaps because they are virtual machines it was not only enough to restart the server, I think you also had to restart the computer.
It's what I think, or I don't know what else could have happened, but now it's working for me.
Thank you very much and greetings,
Yessica Brinkmann
El vie, 12 nov 2021 a las 15:37, Adrian Klaver (<adrian.klaver@aklaver.com>) escribió:
On 11/12/21 10:34 AM, Yessica Brinkmann wrote:
> Thank you very much for your answer.
Did you find the problem?
If not have you investigated whether whatever changed the IP also
enabled a firewall rule that blocks port(5432 I'm assuming)?
> Regards,
> Yessica Brinkmann
>
>
> El vie, 12 nov 2021 a las 9:22, Dave Cramer
> (<davecramer@postgres.rocks>) escribió:
>
>
>
>
> On Fri, 12 Nov 2021 at 06:12, Yessica Brinkmann
> <brinkmann.yessica@gmail.com <mailto:brinkmann.yessica@gmail.com>>
> wrote:
>
> Hello.
> Thank you very much for your answer.
> Yes, I restart the server after making the changes.
> Regards,
> Yessica Brinkmann
>
>
> Check the logs for postgres to make sure there were no errors in
> your new configuration.
>
> Dave Cramer
> www.postgres.rocks
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Re: Pg_hba.conf problem after unexpected IP change
От:
Ray O'Donnell <ray@rodonnell.ie>
Дата:
On 14/11/2021 19:46, Yessica Brinkmann wrote:
> Hello.
> Thank you very much for your answer.
> The configuration actually works for me.After restarting my computer, I
> went to test again and it was already working. I assume that perhaps
> because they are virtual machines it was not only enough to restart the
> server, I think you also had to restart the computer.
> It's what I think, or I don't know what else could have happened, but
> now it's working for me.
Restarting the entire computer shouldn't be necessary... On the Debian
servers I look after, it's enough to do:
systemctl restart postgresql
(or whatever the name of the particular service is).
Ray.
--
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie
Re: Pg_hba.conf problem after unexpected IP change
От:
Adrian Klaver <adrian.klaver@aklaver.com>
Дата:
On 11/14/21 11:55, Ray O'Donnell wrote: > On 14/11/2021 19:46, Yessica Brinkmann wrote: >> Hello. >> Thank you very much for your answer. >> The configuration actually works for me.After restarting my computer, >> I went to test again and it was already working. I assume that perhaps >> because they are virtual machines it was not only enough to restart >> the server, I think you also had to restart the computer. >> It's what I think, or I don't know what else could have happened, but >> now it's working for me. > > Restarting the entire computer shouldn't be necessary... On the Debian > servers I look after, it's enough to do: > > systemctl restart postgresql > > (or whatever the name of the particular service is). Actually that was already done: https://www.postgresql.org/message-id/CAOR%2BmccGARtFsb7c%2BF%3DRUk832%3DdaaJ8%2ByQW8eBYa1Krypr4O6Q%40mail.gmail.com The problems seems to have stemmed from this(per OP): "Well, it turns out that at one point when I was using my virtual machines, suddenly and unexpectedly, the IP of one of the virtual machines changed." Something to do with the networking between host and VM's I presume. > > Ray. > -- Adrian Klaver adrian.klaver@aklaver.com
Re: Pg_hba.conf problem after unexpected IP change
От:
Ray O'Donnell <ray@rodonnell.ie>
Дата:
On 14/11/2021 20:16, Adrian Klaver wrote: > > Actually that was already done: > > https://www.postgresql.org/message-id/CAOR%2BmccGARtFsb7c%2BF%3DRUk832%3DdaaJ8%2ByQW8eBYa1Krypr4O6Q%40mail.gmail.com > > > The problems seems to have stemmed from this(per OP): > > "Well, it turns out that at one point when I was using my virtual > machines, suddenly and unexpectedly, the IP of one of the virtual > machines changed." > > Something to do with the networking between host and VM's I presume. Ah, OK - I missed that. Serves me right for jumping in late. :-) Ray. -- Raymond O'Donnell // Galway // Ireland ray@rodonnell.ie