Onspaces freezes!
Posted in 2007
Paul couldn't run onspaces locally (it hung, then reported "Shared memory not initialized for INFORMIXSERVER 'suse_shm'") while remote dbaccess clients also failed to connect ("Attempt to connect ... failed", connection refused). Advice covered DBSERVERALIASES, checking ONCONFIG/sqlhosts, /etc/services, netstat for a listening port, and using numeric port numbers in sqlhosts. The fix: he swapped the names so DBSERVERNAME was the TCP server (suse_ows) and DBSERVERALIASES the shared-memory one (suse_shm), restarted the engine, after which both onspaces and remote dbaccess worked. A follow-on "client host or user is not trusted" error was raised but not resolved in the thread.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Server Administration, Networking & sqlhosts Configuration
Marcus, Kagel,
I did as per your recommendations, this how my sqlhosts looks like
suse_shm onipcshm servername ows_shm
suse_ows onsoctcp servername my_srv
Then exported INFORMIXSERVER=suse_shm
NOTE: ows_shm dummy got to be there(slqhosts file only) otherwise onspaces
freezes in time!
But now i cannot be able to do dbaccess from the clients, the thing takes
forever to connect then throws this error:
"Attempt to connect to database server (suse_ows) failed "
we are headed somewhere ,,
Any more ideas...
Paul
Marcus, Kagel,
I did as per your recommendations, this how my sqlhosts looks like
suse_shm onipcshm servername ows_shm
suse_ows onsoctcp servername my_srv
Then exported INFORMIXSERVER=suse_shm
NOTE: ows_shm dummy got to be there(slqhosts file only) otherwise onspaces
freezes in time!
But now i cannot be able to do dbaccess from the clients, the thing takes
forever to connect then throws this error:
"Attempt to connect to database server (suse_ows) failed "
we are headed somewhere ,,
Any more ideas..
Paul,
Is there a firewall in between ? Can you reach the port for my_srv by telnet
?
Is the server my_srv also in the services of the client ? Is it the same
service ?
You could also use numeric service number in sqlhosts of your clients.
You said before, dbaccess from your clients did work ???
The dummy entry should be there, as I stated, but it does not have to be a
valid service from /etc/services.
Marcus
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of PAUL
GATHOGO
Sent: Wednesday, January 17, 2007 8:15 AM
To: ids@iiug.org
Subject: Attempt to connect to database server (mydbServer) [8222]
Marcus, Kagel,
I did as per your recommendations, this how my sqlhosts looks like
suse_shm onipcshm servername ows_shm
suse_ows onsoctcp servername my_srv
Then exported INFORMIXSERVER=suse_shm
NOTE: ows_shm dummy got to be there(slqhosts file only) otherwise onspaces
freezes in time!
But now i cannot be able to do dbaccess from the clients, the thing takes
forever to connect then throws this error:
"Attempt to connect to database server (suse_ows) failed "
we are headed somewhere ,,
Any more ideas..
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
Marcus, I have disabled my firewall, but when i do telnet <MyserverIP> <MyportNum> i get the following error : "Unable to connect to remote host: Connection refused" Yes, my_srv is in the client services file with the same name. By the way how can i use numerics service number on the sqlhosts? Paul
Paul, If you get connection refused, then it is obvious that IDS does not open the socket listener. This is mostly because you forgot to set DBSERVERALIASES in onconfig.suse. Read my previous email for details. Marcus -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of PAUL GATHOGO Sent: Wednesday, January 17, 2007 9:33 AM To: ids@iiug.org Subject: Re: RE: Attempt to connect to database server (myd [8224] Marcus, I have disabled my firewall, but when i do telnet <MyserverIP> <MyportNum> i get the following error : "Unable to connect to remote host: Connection refused" Yes, my_srv is in the client services file with the same name. By the way how can i use numerics service number on the sqlhosts? Paul **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.
You are not listening on the port Have you got nmap on the server ? Try running that Run netstat -a and you should see the port open Paul Watson Tel: +44 1414161772 Mob: +44 7818003457 Web: www.oninit.com Failure is not as frightening as regret. Attend IDUG 2007 San Jose, North America May 6-10, 2007 Visit http://www.iiug.org/conf for more information. > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On > Behalf Of PAUL GATHOGO > Sent: 17 January 2007 02:33 > To: ids@iiug.org > Subject: Re: RE: Attempt to connect to database server (myd [8224] > > > Marcus, > > I have disabled my firewall, but when i do telnet > <MyserverIP> <MyportNum> i get the following error : > > "Unable to connect to remote host: Connection refused" > > Yes, my_srv is in the client services file with the same name. > > By the way how can i use numerics service number on the sqlhosts? > > Paul > > > ************************************************************** > ***************** > Forum Note: Use "Reply" to post a response in the > discussion forum.
Paul,
Did you already check twice that you met the kernel parameter settings as
mention in the machine specific notes ($INFORMIXDIR/release/...) ?
Another question, do you have more than one network interface card on your
server?
HTH,
Robert
Robert Seifert
_________________________________________________________________
IBM Deutschland GmbH, Software, Information Management,
Informix Products, Advanced Support
Elite VAR support engineer
Development Support for IBM Informix Products on-site @ SAP
c/o SAP AG, -PS03-,Neurottstrasse 16, D-69190 Walldorf, Germany
_________________________________________________________________
_________________________________________________________________
ids-bounces@iiug.org wrote on 17.01.2007 06:44:52:
>
> Marcus, Kagel,
>
> I did as per your recommendations, this how my sqlhosts looks like
>
> suse_shm onipcshm servername ows_shm
> suse_ows onsoctcp servername my_srv>
> Then exported INFORMIXSERVER=suse_shm
>
> NOTE: ows_shm dummy got to be there(slqhosts file only) otherwise
onspaces> freezes in time!
>
> But now i cannot be able to do dbaccess from the clients, the thing takes
> forever to connect then throws this error:
> "Attempt to connect to database server (suse_ows) failed "
>
> we are headed somewhere ,,
>
> Any more ideas...
>
> Paul
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Marcus,
My onconfig.suse is looking like this;
DBASERVERNAME suse_shm
DBASERVERALIASES suse_ows
My sqlhosts file;
suse_ows onsoctcp myserver ows_srv r=0,s=0
suse_shm onipcshm myserver ows_shm
My /etc/services file is looking like this;
ows_srv 55000/tcp
What am i missing?
Paul
Paul,
Are you sure, onconfig.suse is being used ?
Environment var ONCONFIG should be onconfig.suse !
Use netstat -an | grep 55000 on your db-server to detect if there is an
active listening socket.
If not, your database should throw some warnings on startup. Try oninit -v
to see what is happening.
"Forking 1 'tlitcp' listener threads...succeeded" is the correct output.
You did restart the engine after modifying the onconfig/sqlhosts ?
Marcus
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of PAUL
GATHOGO
Sent: Wednesday, January 17, 2007 12:24 PM
To: ids@iiug.org
Subject: Re: RE: RE: Attempt to connect to database server [8229]
Marcus,
My onconfig.suse is looking like this;
DBASERVERNAME suse_shm
DBASERVERALIASES suse_ows
My sqlhosts file;
suse_ows onsoctcp myserver ows_srv r=0,s=0 suse_shm onipcshm myserver
ows_shm
My /etc/services file is looking like this;
ows_srv 55000/tcp
What am i missing?
Paul
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
What is your startup environment, in particular $ONCONFIG and $SQLHOSTS Paul Watson Tel: +44 1414161772 Mob: +44 7818003457 Web: www.oninit.com Failure is not as frightening as regret. Attend IDUG 2007 San Jose, North America May 6-10, 2007 Visit http://www.iiug.org/conf for more information. > -----Original Message----- > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On > Behalf Of PAUL GATHOGO > Sent: 17 January 2007 05:24 > To: ids@iiug.org > Subject: Re: RE: RE: Attempt to connect to database server [8229] > > > Marcus, > > My onconfig.suse is looking like this; > > DBASERVERNAME suse_shm > DBASERVERALIASES suse_ows > > My sqlhosts file; > > suse_ows onsoctcp myserver ows_srv r=0,s=0 suse_shm onipcshm > myserver ows_shm > > My /etc/services file is looking like this; > > ows_srv 55000/tcp > > What am i missing? > > Paul > > > ************************************************************** > ***************** > Forum Note: Use "Reply" to post a response in the > discussion forum.
Marcus,
Hamm...interesting stuff,
onconfig.suse is the one been read.
When i do netstat am able to see the port listening.
One thing to tho is, i cannot be able to "onmode" when INFORMIXSERVER value is
set to suse_shm, i have to switch to suse_ows.
But when i do oninit -v, i see the following;
Forking 1 'soctcp' listening thread ....succeeded.
... then onspaces stops to work grrrrr
Help :(
Paul
> I have disabled my firewall, but when i do telnet <MyserverIP> <MyportNum> i
> get the following error :
> "Unable to connect to remote host: Connection refused"
Does netstat show the oninit process listing to port you specified.
> Yes, my_srv is in the client services file with the same name.
> By the way how can i use numerics service number on the sqlhosts?
You can't.
> Hamm...interesting stuff,
> onconfig.suse is the one been read.
> When i do netstat am able to see the port listening.
> One thing to tho is, i cannot be able to "onmode" when INFORMIXSERVER value
is
> set to suse_shm, i have to switch to suse_ows.
My sqlhosts file looks like -
BARNET onsoctcp 192.168.1.60 online
BARIPC onipcshm * *
I'm pretty sure I can do all the adminy stuff with an INFORMIXSERVER
value of BARIPC. I'll double check when I get a chance; since I have a
chunk to add.
> But when i do oninit -v, i see the following;
> Forking 1 'soctcp' listening thread ....succeeded.
> .... then onspaces stops to work grrrrr
I'm running IDS 10 on SLES 9 and I've never had the grief you are
experiencing.
Hi, how is your "servername" resolved? i.e. ping servername or nslookup servername or dig servername If it is 127.0.0.1 then IDS is listening only on localhost and you can not connect to it from "outer world". You must list servername as seen from "outer world" inside sqlhosts. HTH Hrvoje
Paul,
Are you sure, you have the correct binaries installed, which match the
oninit version ?
This could be a problem because these might have a different idea of the
shared memory setup.
Again: using all the onspaces, onmode, oninit commands is recommended via
shared memory,
although some should work over IP (onstat e.g.).
If the listening thread is there, you should be able to telnet to it from
another machine.
If this goes wrong, dbaccess will fail also.
Everything depends on the INFORMIXSERVER values. You should not even enter
the shm portion in the sqlhosts of the client to prevent the use.
I have been using numeric IP ports in sqlhosts for a long time.
Entry in sqlhosts:
server1_tcp ontlitcp servername 1600
No entry in /etc/services necessary.
(I use tlitcp because this is from a Solaris machine).
Marcus
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of PAUL
GATHOGO
Sent: Wednesday, January 17, 2007 1:00 PM
To: ids@iiug.org
Subject: Re: RE: RE: RE: Attempt to connect to database ser [8232]
Marcus,
Hamm...interesting stuff,
onconfig.suse is the one been read.
When i do netstat am able to see the port listening.
One thing to tho is, i cannot be able to "onmode" when INFORMIXSERVER value
is set to suse_shm, i have to switch to suse_ows.
But when i do oninit -v, i see the following;
Forking 1 'soctcp' listening thread ....succeeded.
....... then onspaces stops to work grrrrr
Help :(
Paul
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
Marcus,
The vesions are all looking good!
Notice when onspaces fails, then am able to do a dbaccess from the client
machine and it goes through with no problems.
I'll attempt using the port number on the sqlhosts file and see how it will
behave but this is really really strange!
Why is it that ows_shm is not working with ows_srv ??
PS: By the way what does NETTYPE entry do in the onconfig.suse, does it need
to have a value?
Man this thing is killing me!!!
Paul
Yes, you can use port numbers directly in the sqlhosts file.
Art S. Kagel
----- Original Message -----
From: Adam Tauno Williams <ids@iiug.org>
At: 1/17 7:13:21
> I have disabled my firewall, but when i do telnet <MyserverIP> <MyportNum> i
> get the following error :
> "Unable to connect to remote host: Connection refused"
Does netstat show the oninit process listing to port you specified.
> Yes, my_srv is in the client services file with the same name.
> By the way how can i use numerics service number on the sqlhosts?
You can't.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
That might be a domain issue. Try including/excluding the server's domain on the client. Art S. Kagel ----- Original Message ----- From: Paul Gathogo <ids@iiug.org> At: 1/17 3:43:16 Marcus, I have disabled my firewall, but when i do telnet <MyserverIP> <MyportNum> i get the following error : "Unable to connect to remote host: Connection refused" Yes, my_srv is in the client services file with the same name. By the way how can i use numerics service number on the sqlhosts? Paul ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
Paul,
Lets try to recapitulate:
In onconfig.suse you have set
DBSERVERNAME suse_shm
DBSERVERALIASES suse_ows
In /etc/services you have defined
ows_srv 55000/tcp
In sqlhosts you have defined
suse_ows onsoctcp myserver ows_srv
suse_shm onipcshm myserver ows_shm
The TCP-Listener is coming up and you can see it in netstat
Clients have set INFORMIXSERVER to suse_ows and know the services entry and
sqlhosts is the same for the TCP-Listener
Dbaccess is running from remote via TCP.
Setting INFORMIXSERVER to suse_shm on the DB-Server and locally executing
onspaces fails (waits forever or crashes ?)
You have rebooted the engine and it comes up without warnings/errors.
Does onstat work with either shm or tcp ?
NETTYPE has some internal default values and you do not have to set it
unless you plan to have lots of requests.
It controls how many threads are started to listen for new connections (each
thread, default is one per listener,
could handle up to 150-200 connections).
Marcus
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of PAUL
GATHOGO
Sent: Wednesday, January 17, 2007 4:16 PM
To: ids@iiug.org
Subject: Re: RE: RE: RE: RE: Attempt to connect to database [8237]
Marcus,
The vesions are all looking good!
Notice when onspaces fails, then am able to do a dbaccess from the client
machine and it goes through with no problems.
I'll attempt using the port number on the sqlhosts file and see how it will
behave but this is really really strange!
Why is it that ows_shm is not working with ows_srv ??
PS: By the way what does NETTYPE entry do in the onconfig.suse, does it need
to have a value?
Man this thing is killing me!!!
Paul
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
Marcus,
Exactly that's my configuration. Dbaccess can connect, but onspaces freezes
for a while and then it throws this error:
"Shared memory not initialized for INFORMIXSERVER 'suse_shm'
onstat works with both (shm or tcp).
When i stop and restart the engine (oninit -v) every thing starts
successfully, with either (shm or tcp).
It's really supprising me.
Paul
Marcus,
Thanks for the support,
Now onspaces is working and dbaccess is working. Great. This how i've done it,
i switched the two vars;
DBSERVERNAME suse_ows
DBSERVERALIASES suse_shm
did an onmode -ky, then oninit, then switched the $INFORMIXSERVER to suse_shm,
did onspaces and it run, did dbaccess from a remote SCO box and it run.
Now comes the other nagging problem: when i perform the dbaccess from a SCO
box it connects but it throws an error:
"Client host or user is not trusted by the server"
The actual error on the online.log is;
09:30:56 listener-thread: err = -956: oserr = 0: errstr = informix@server1:
Client host or user informix@server1 is not trusted by the server.
What do you suspect this is,
I have done the following settings:
SCO box(client)
.rhosts added the name of myserver
/etc/hosts.equiv - added the name of myserver
Myserver(IDS server)
/home/informix/.rhosts - added the name of my SCO box
/etc/hosts - added an entry IP and name of the SCO box
/etc/host.equiv - added an entry of the SCO box
...but still it throws the error
Paul
Hi, How can I find out the username of "currenlty logged in user" using query? i.e. if I am logged in as "user1", then how can I get my user name (the result "user1" using query)? Regards, Nandkishor.
You should also add entries for both servers in each others
$INFORMIXDIR/etc/sqlhosts
----- Original Message ----
From: PAUL GATHOGO <pgathogo@gmail.com>
To: ids@iiug.org
Sent: Thursday, January 18, 2007 6:58:20 AM
Subject: Host or user not trusted by the server [8243]
Marcus,
Thanks for the support,
Now onspaces is working and dbaccess is working. Great. This how i've done it,
i switched the two vars;
DBSERVERNAME suse_ows
DBSERVERALIASES suse_shm
did an onmode -ky, then oninit, then switched the $INFORMIXSERVER to suse_shm,
did onspaces and it run, did dbaccess from a remote SCO box and it run.
Now comes the other nagging problem: when i perform the dbaccess from a SCO
box it connects but it throws an error:
"Client host or user is not trusted by the server"
The actual error on the online.log is;
09:30:56 listener-thread: err = -956: oserr = 0: errstr = informix@server1:
Client host or user informix@server1 is not trusted by the server.
What do you suspect this is,
I have done the following settings:
SCO box(client)
..rhosts added the name of myserver
/etc/hosts.equiv - added the name of myserver
Myserver(IDS server)
/home/informix/.rhosts - added the name of my SCO box
/etc/hosts - added an entry IP and name of the SCO box
/etc/host.equiv - added an entry of the SCO box
....but still it throws the error
Paul
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
________________________________________________________________________________
____
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com
Nandkishor-
You can select "user" in any query. If you want to assign it to
a variable, be sure to use a query that returns only one row, or use a
cursor:
select user from my_table
where my_where_clause_that_returns_only_one_row
If you're using 4gl on Unix you can also try this:
My_variable = FGL_GETENV("LOGNAME")
--EEM
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
Nandkishor Singare
Sent: Thursday, January 18, 2007 2:47 AM
To: ids@iiug.org
Subject: Re: Host or user not trusted by the server [8244]
Hi,
How can I find out the username of "currenlty logged in user" using
query?
i.e. if I am logged in as "user1", then how can I get my user name
(the result "user1" using query)?
Regards,
Nandkishor.
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.