908 - cannot connect - record locked.
Posted in 2007
I see in my drafts a note I started and never completed. Let's see if I can
fill in the missing parts. I know that everybody else has been down this
road before, but as a n00b to HDR this caught me and I could find nothing
useful in the group that I could recognize as such. (Although the pointers
to netstat did send me down a meaningful road).
j.
----------
Just been through a miserable several hours chasing this down. Mostly from
my own stupidity - not seeing the clues in front of my face. Reading all of
the notes telling me to check my config - checking it and not seeing the
tree in front of my face. Thought I'd document it for the next fellow.
So I'm setting up some replicates. The Fine Manual indicates that you
should test connectivity by doing a connect from one instance to the other
(dbaccess -> connect, or dbaccess db@server) (I have three going). I duly
try this, none of them work - i get a 908 error 'record locked'. Well not
totally, one does work, two don't. I bang my head against this for quite
some time, trying different things - talked to a fellow I trust who
suggested that I check to see if I could telnet into the ports in question
on the machines in question. I could to one machine, but not the other 2.
STOP NOW. GO NO FURTHER. "netstat -an | grep [port]". What is listening
on the port?
If you see:
192.168.1.208:[port] 0.0.0.0:* LISTEN -- This one is
working
127.0.0.1:[port] 0.0.0.0:* LISTEN -- This one is not
working,
but will answer
locally
One which is not working at all has no entry. (-- because doofus
re-installed the os
and hasn't even put
informix on yet)
Ah - don't forget to either turn off iptables or chain it properly.
-----------------
Setup points:
1 - /etc/hosts Ensure that the 127.0.0.1 line does NOT include the name of
the current host. If it does, you will get a netstat -an of:
127.0.0.1:[port] 0.0.0.0:* LISTEN This is what burnt me.
[repeat of well documented stuff]
2 - /etc/hosts.equiv (or .rhosts or .netrc - whatever). Each server must be
allowed to log into the other server as Informix without a password.
3 - /etc/services. According to my notes, there must be an entry for each
member of the replicant set. However, I have also been able to make it work
with a single identical entry across all participants. (That's because this
is the port it's listening on - not a port that it's trying to go out on).
4 - sqlhosts. Must have an entry for each replicant. Must also include a
group entry for each replicant set. (See manual) e.g.:
hdr_group group - - i=100
hdr_primary_tcp onsoctcp node1 hdr_tcp1 g=hdr_group
hdr_secondary_tcp onsoctcp node2 hdr_tcp2 g=hdr_group
cdr_group group - - i=101
dr_root onsoctcp node3 CDR_Root_tcp1 g=cdr_group
Windows sqlhosts goes into the registry and is similar - RTFM.
Now when you dbaccess you will have the option to connect to hdr_group as
well as the primary and secondary. If you connect to the group it will
connect you to whichever is the primary.
This rest of it is nicely covered in the manual.
j.