<div dir="ltr">Hi Glyn,<div><br></div><div>Yes I had stopped all the slons for every node but I did not DELETE FROM "_Cluster1".sl_nodelock WHERE nl_nodeid = 1 AND nl_conncnt = 0;</div><div><br></div><div>Regards,</div><div>Granthana<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 14, 2014 at 9:13 PM, Glyn Astill <span dir="ltr"><<a href="mailto:glynastill@yahoo.co.uk" target="_blank">glynastill@yahoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
> From: Granthana Biswas <<a href="mailto:granthana.biswas@gmail.com">granthana.biswas@gmail.com</a>><br>
>To: "<a href="mailto:slony1-general@lists.slony.info">slony1-general@lists.slony.info</a>" <<a href="mailto:slony1-general@lists.slony.info">slony1-general@lists.slony.info</a>><br>
>Sent: Tuesday, 14 October 2014, 11:15<br>
>Subject: [Slony1-general] Changing master node's IP & port<br>
<span class="">><br>
><br>
><br>
>Hi All,<br>
><br>
><br>
>I am trying to change the master node's IP and port<br>
><br>
>After stopping the slon process, I ran store path as follows:<br>
><br>
>store path (server = 1, client = 2, conninfo='host=new_ip dbname=$DB1 user=$USER1 port=$PORT1');<br>
>store path (server = 1, client = 3, conninfo='host=new_ip dbname=$DB1 user=$USER1 port=$PORT1');<br>
><br>
><br>
>But on trying to start slon process again after changing the node config, I got the following error:<br>
><br>
>nohup /usr/bin/slon -d 2 -p /var/run/slony1/cl1node1.pid -f /home/postgres/slony_test/cl1_node1.conf > /home/postgres/slony_test/log/cl1node1.log 2>&1 &<br>
>[1] 5626<br>
>postgres@GB:~/slony_test$ 2014-10-14 13:09:13 IST ERROR: duplicate key value violates unique constraint "sl_nodelock-pkey"<br>
>2014-10-14 13:09:13 IST DETAIL: Key (nl_nodeid, nl_conncnt)=(1, 0) already exists.<br>
>2014-10-14<br>
13:09:13 IST STATEMENT: select "_Cluster1".cleanupNodelock(); insert<br>
into "_Cluster1".sl_nodelock values ( 1, 0,<br>
"pg_catalog".pg_backend_pid());<br>
><br>
><br>
<br>
</span>Hi Granthana,<br>
<br>
Are you sure you'd stopped all the slons? A quick "ps aux | grep slon" on each machine where you have slons running should be enough to check.<br>
<br>
As long as you're positive you've stopped all the slon processes, you could clean up sl_nodelock by just doing DELETE FROM "_Cluster1".sl_nodelock WHERE nl_nodeid = 1 AND nl_conncnt = 0;<br>
<span class=""><br>
<br>
<br>
>I even tried the drop path but it gives the following error:<br>
><br>
>sh drop_path.sh<br>
>2014-10-14 13:52:06 IST ERROR: Slony-I: Path cannot be dropped, subscription of set 1 needs it<br>
>2014-10-14 13:52:06 IST STATEMENT: lock table "_Cluster1".sl_event_lock, "_Cluster1".sl_config_lock;select "_Cluster1".dropPath(1, 2);<br>
><stdin>:8: PGRES_FATAL_ERROR lock table "_Cluster1".sl_event_lock, "_Cluster1".sl_config_lock;select "_Cluster1".dropPath(1, 2); - ERROR: Slony-I: Path cannot be dropped, subscription of set 1 needs it<br>
><br>
><br>
>Did anyone face the same issue when trying to change ip of a node? In my case, I am trying to change IP of master node.<br>
><br>
><br>
><br>
>Regards,<br>
>Granthana<br>
</span>>_______________________________________________<br>
>Slony1-general mailing list<br>
><a href="mailto:Slony1-general@lists.slony.info">Slony1-general@lists.slony.info</a><br>
><a href="http://lists.slony.info/mailman/listinfo/slony1-general" target="_blank">http://lists.slony.info/mailman/listinfo/slony1-general</a><br>
><br>
><br>
><br>
</blockquote></div><br></div></div></div>