interesting problem
Posted in 2003
A shop cloned an AIX server (4.2 -> 4.3) running INFORMIX-4GL 4.00 and SE 4.00. In some directories 4GL programs compile and run fine; in others even a trivial "hello world" fails with -408 "Invalid message type received from the sqlexec process" and -4305 (database cannot be found/opened). The behaviour follows the physical directory, not the name or PATH. Suggestions included checking DBPATH and env vars containing relative (./..) entries, SE .dbs location, mount-point permissions, symlinks (pwd -P), fsck, re-copying the tree, sqlexec/sqlexecd permissions, and reinstalling products in the correct Tools-Engine-Network order. The thread records no confirmed resolution.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Hello,
After copying files to a new server, we're having a very weird
problem. Programs compile perfectly in certain directories, but bomb
out with a compile error in others. Executables copied to the "bad"
diretories get runtime errors.
For example:
Two seemingly identical directories (other than the name).
/usr/fourgen/accounting/ap.4gm/o_finsum.4gc/hello.4gl (perfect).
/usr/fourgen/accounting/gl.4gm/o_finsum.4gc/hello.4gl (errors).
Everything has the same permissions/ownerships
drwxrwxrwx 54 informix informix 1536 Jun 21 21:45 ap.4gm
drwxrwxrwx 150 informix informix 4096 Jun 20 15:47 gl.4gm
drwxr-xr-x 2 informix informix 1024 Jun 21 21:53 o_finsum.4gc
(ap.4gm)
drwxr-xr-x 2 informix informix 512 Jun 21 21:54 o_finsum.4gc
(gl.4gm)
-rwxrwxrwx 1 informix informix 150 Jun 21 21:53 hello.4gl
(ap.4gm)
-rwxrwxrwx 1 informix informix 150 Jun 21 21:54 hello.4gl
(gl.4gm)
The little "hello world" test program below compiles/links/executes
perfectly under ap.4gm, bombs out under gl.4gm with (in hello.err)
------------------------------------------------------------------------
| Invalid message type received from the sqlexec process.
| See error number -408.
|
| The database "patbil" cannot be found or opened. If the
database
| exists, check the database permissions on the database. In
| addition, check the system permissions on the database directory
| and its ascendant directories.
| See error number -4305.
------------------------------------------------------------------------
Here's the little program.
--------------------------------------------------------
#hello.4gl
database patbil
main
define
i integer
display "hello world..."
select count(*) into i
from hhpamstr
display i
end main
---------------------------------------------------------
I can rename ap.4gm to ap.hld and rename gl.4gm to ap.4gm and still
get the same result. Since all file/directory permissions/ownerships
are identical, I'm running out of ideas. Any help greatly
apprecaited!
Joseph Dobbs
wolphie@hotmail.com
Programmer/Analyst
Lifeline Home Health
I will top-post this time. Did anything else changed? O/S, Informix
version etc.
Post versions and hw setup. I had some s**t like this recently with isql
- it was a bad
version!!
Michael
Smitty wrote:
>Hello,
>After copying files to a new server, we're having a very weird
>problem. Programs compile perfectly in certain directories, but bomb
>out with a compile error in others. Executables copied to the "bad"
>diretories get runtime errors.
>
>For example:
>Two seemingly identical directories (other than the name).
>/usr/fourgen/accounting/ap.4gm/o_finsum.4gc/hello.4gl (perfect).
>/usr/fourgen/accounting/gl.4gm/o_finsum.4gc/hello.4gl (errors).
>
>Everything has the same permissions/ownerships
>drwxrwxrwx 54 informix informix 1536 Jun 21 21:45 ap.4gm
>drwxrwxrwx 150 informix informix 4096 Jun 20 15:47 gl.4gm
>
>drwxr-xr-x 2 informix informix 1024 Jun 21 21:53 o_finsum.4gc
>(ap.4gm)
>drwxr-xr-x 2 informix informix 512 Jun 21 21:54 o_finsum.4gc
>(gl.4gm)
>
>-rwxrwxrwx 1 informix informix 150 Jun 21 21:53 hello.4gl
>(ap.4gm)
>-rwxrwxrwx 1 informix informix 150 Jun 21 21:54 hello.4gl
>(gl.4gm)
>
>The little "hello world" test program below compiles/links/executes
>perfectly under ap.4gm, bombs out under gl.4gm with (in hello.err)
>------------------------------------------------------------------------
>| Invalid message type received from the sqlexec process.
>| See error number -408.
>|
>| The database "patbil" cannot be found or opened. If the
>database
>| exists, check the database permissions on the database. In
>| addition, check the system permissions on the database directory
>| and its ascendant directories.
>| See error number -4305.
>------------------------------------------------------------------------
>
>Here's the little program.
>--------------------------------------------------------
>#hello.4gl
>database patbil
>
>main
>define
> i integer
> display "hello world..."
>
> select count(*) into i
> from hhpamstr>
> display i
>
>end main
>---------------------------------------------------------
>
>I can rename ap.4gm to ap.hld and rename gl.4gm to ap.4gm and still
>get the same result. Since all file/directory permissions/ownerships
>are identical, I'm running out of ideas. Any help greatly
>apprecaited!
>
>Joseph Dobbs
>wolphie@hotmail.com
>Programmer/Analyst
>Lifeline Home Health
>
>
Yes, the OS version changed, AIX 4.2.? to AIX 4.3.?. Still why do
programs compile/run perfectly in some directories, but not others
(with same rights/permissions)? We've gone through library hell
thinking it was something to do w/our CASE tool, but even a little 4
or 5 line "hello world" program bombs out.
> I will top-post this time. Did anything else changed? O/S, Informix
> version etc.
> Post versions and hw setup. I had some s**t like this recently with isql
> - it was a bad
> version!!
>
> Michael
> Smitty wrote:
>
> >Hello,
> >After copying files to a new server, we're having a very weird
> >problem. Programs compile perfectly in certain directories, but bomb
> >out with a compile error in others. Executables copied to the "bad"
> >diretories get runtime errors.
> >
> >For example:
> >Two seemingly identical directories (other than the name).
> >/usr/fourgen/accounting/ap.4gm/o_finsum.4gc/hello.4gl (perfect).
> >/usr/fourgen/accounting/gl.4gm/o_finsum.4gc/hello.4gl (errors).
> >
> >Everything has the same permissions/ownerships
> >drwxrwxrwx 54 informix informix 1536 Jun 21 21:45 ap.4gm
> >drwxrwxrwx 150 informix informix 4096 Jun 20 15:47 gl.4gm
> >
> >drwxr-xr-x 2 informix informix 1024 Jun 21 21:53 o_finsum.4gc
> >(ap.4gm)
> >drwxr-xr-x 2 informix informix 512 Jun 21 21:54 o_finsum.4gc
> >(gl.4gm)
> >
> >-rwxrwxrwx 1 informix informix 150 Jun 21 21:53 hello.4gl
> >(ap.4gm)
> >-rwxrwxrwx 1 informix informix 150 Jun 21 21:54 hello.4gl
> >(gl.4gm)
> >
> >The little "hello world" test program below compiles/links/executes
> >perfectly under ap.4gm, bombs out under gl.4gm with (in hello.err)
> >------------------------------------------------------------------------
> >| Invalid message type received from the sqlexec process.
> >| See error number -408.
> >|
> >| The database "patbil" cannot be found or opened. If the
> database
> >| exists, check the database permissions on the database. In
> >| addition, check the system permissions on the database directory
> >| and its ascendant directories.
> >| See error number -4305.
> >------------------------------------------------------------------------
> >
> >Here's the little program.
> >--------------------------------------------------------
> >#hello.4gl
> >database patbil
> >
> >main
> >define
> > i integer
> > display "hello world..."
> >
> > select count(*) into i
> > from hhpamstr> >
> > display i
> >
> >end main
> >---------------------------------------------------------
> >
> >I can rename ap.4gm to ap.hld and rename gl.4gm to ap.4gm and still
> >get the same result. Since all file/directory permissions/ownerships
> >are identical, I'm running out of ideas. Any help greatly
> >apprecaited!
> >
> >Joseph Dobbs
> >wolphie@hotmail.com
> >Programmer/Analyst
> >Lifeline Home Health
> >
> >
To clarify a little, the bottom line is that we cloned all the data on our server to a newer server, and in certain directories everything works perfectly. In other directories (same basic path/rights/permissions) things won't compile, Uniplex won't run, any executable than runs in a "good" directory, bombs out when copied to a "bad" directory. Renaming a "bad" directory to the same name as a "good" directory (original named *.hld) doesn't help, things still run in the old *.hld directory and still bomb under the new directory with the same name as the previously working one. I hope there's a simple fix, maybe having to do with how Informix was originally installed or something. It's been driving us crazy!! Thanks for any help.
Another clue is that as long as I'm sitting in one of the "good" directories, I can run a program from a "bad" directory by supplying an explicit path to the *.4ge. But cd/ into the "bad" directory and run the same program and it bombs out (see details below). I'd love to figure this out myself, or find a free answer on newsgroups, but if any smart consultant/guru has a clue, drop me a line and we can work out some $$$$$, we're desperate at this point. Joseph Dobbs Senior Programmer/Analyst joe.dobbs@lifelineweb.com or wolphie@hotmail.com
What happens when you run a "bad" program, from a "bad" directory, but supplying full path name? Which version of 4gl and engine are you running? What happens, when you put the hello.4gl program in your home directory, reset PATH to the absolute minumum (bin, /usr/bin, $INFORMIXDIR/bin) - does it compile and run? Michael Remove caps from address to e-mail directly. Smitty wrote: >Another clue is that as long as I'm sitting in one of the "good" >directories, I can run a program from a "bad" directory by supplying >an explicit path to the *.4ge. But cd/ into the "bad" directory and >run the same program and it bombs out (see details below). I'd love >to figure this out myself, or find a free answer on newsgroups, but if >any smart consultant/guru has a clue, drop me a line and we can work >out some $$$$$, we're desperate at this point. > >Joseph Dobbs >Senior Programmer/Analyst >joe.dobbs@lifelineweb.com or >wolphie@hotmail.com > >
"Smitty" <wolphie@hotmail.com> wrote in message news:4f39af7f.0306221117.19b666a7@posting.google.com... > Another clue is that as long as I'm sitting in one of the "good" > directories, I can run a program from a "bad" directory by supplying > an explicit path to the *.4ge. But cd/ into the "bad" directory and > run the same program and it bombs out (see details below). I'd love > to figure this out myself, or find a free answer on newsgroups, but if > any smart consultant/guru has a clue, drop me a line and we can work > out some $$$$$, we're desperate at this point. > - Some environment variable somewhere contains an entry starting with . or .. so it is picked up relative to the "good" directory but not there when starting from the "bad" directory. OR - The database is a Standard Engine database and the <database>.dbs is in the "good" directory. OR - something else is picked up from the current directoy and is in the "good" directory which is not in the "bad" directory. > Joseph Dobbs > Senior Programmer/Analyst > joe.dobbs@lifelineweb.com or > wolphie@hotmail.com
Have you checked the underlying mount point permissions?
Smitty wrote:
>
> Yes, the OS version changed, AIX 4.2.? to AIX 4.3.?. Still why do
> programs compile/run perfectly in some directories, but not others
> (with same rights/permissions)? We've gone through library hell
> thinking it was something to do w/our CASE tool, but even a little 4
> or 5 line "hello world" program bombs out.
>
> > I will top-post this time. Did anything else changed? O/S, Informix
> > version etc.
> > Post versions and hw setup. I had some s**t like this recently with isql
> > - it was a bad
> > version!!
> >
> > Michael
> > Smitty wrote:
> >
> > >Hello,
> > >After copying files to a new server, we're having a very weird
> > >problem. Programs compile perfectly in certain directories, but bomb
> > >out with a compile error in others. Executables copied to the "bad"
> > >diretories get runtime errors.
> > >
> > >For example:
> > >Two seemingly identical directories (other than the name).
> > >/usr/fourgen/accounting/ap.4gm/o_finsum.4gc/hello.4gl (perfect).
> > >/usr/fourgen/accounting/gl.4gm/o_finsum.4gc/hello.4gl (errors).
> > >
> > >Everything has the same permissions/ownerships
> > >drwxrwxrwx 54 informix informix 1536 Jun 21 21:45 ap.4gm
> > >drwxrwxrwx 150 informix informix 4096 Jun 20 15:47 gl.4gm
> > >
> > >drwxr-xr-x 2 informix informix 1024 Jun 21 21:53 o_finsum.4gc
> > >(ap.4gm)
> > >drwxr-xr-x 2 informix informix 512 Jun 21 21:54 o_finsum.4gc
> > >(gl.4gm)
> > >
> > >-rwxrwxrwx 1 informix informix 150 Jun 21 21:53 hello.4gl
> > >(ap.4gm)
> > >-rwxrwxrwx 1 informix informix 150 Jun 21 21:54 hello.4gl
> > >(gl.4gm)
> > >
> > >The little "hello world" test program below compiles/links/executes
> > >perfectly under ap.4gm, bombs out under gl.4gm with (in hello.err)
> > >------------------------------------------------------------------------
> > >| Invalid message type received from the sqlexec process.
> > >| See error number -408.
> > >|
> > >| The database "patbil" cannot be found or opened. If the
> > database
> > >| exists, check the database permissions on the database. In
> > >| addition, check the system permissions on the database directory
> > >| and its ascendant directories.
> > >| See error number -4305.
> > >------------------------------------------------------------------------
> > >
> > >Here's the little program.
> > >--------------------------------------------------------
> > >#hello.4gl
> > >database patbil
> > >
> > >main
> > >define
> > > i integer
> > > display "hello world..."
> > >
> > > select count(*) into i
> > > from hhpamstr> > >
> > > display i
> > >
> > >end main
> > >---------------------------------------------------------
> > >
> > >I can rename ap.4gm to ap.hld and rename gl.4gm to ap.4gm and still
> > >get the same result. Since all file/directory permissions/ownerships
> > >are identical, I'm running out of ideas. Any help greatly
> > >apprecaited!
> > >
> > >Joseph Dobbs
> > >wolphie@hotmail.com
> > >Programmer/Analyst
> > >Lifeline Home Health
> > >
> > >
--
Paul Watson #
Oninit Ltd # Growing old is mandatory
Tel: +44 1436 672201 # Growing up is optional
Fax: +44 1436 678693 #
Mob: +44 7818 003457 #
www.oninit.com #
> - Some environment variable somewhere contains an entry starting with . or > .. > so it is picked up relative to the "good" directory but not there when > starting > from the "bad" directory. i appreciate you sticking w/my good/bad metaphor! I did an experiment that may rule out any environment variable path problem. i can rename a good directory to a bad (and vice-versa) and the problem is not fooled. programs bomb under a bad directory even when it's renamed with the exact path as a good one (good one temporarily renamed *.hld) Both paths are nearly identical. /usr/fourgen/accounting/ap.4gm (good) /usr/fourgen/accountign/gl.4gm (bad) > - The database is a Standard Engine database and the <database>.dbs is in > the > "good" directory. > The database is SE 4.0, and the database(s) in question are in directies (*.dbs) where things work. yet my little program that access this database bomb out when run from certain directories. to simplify testing i put hello.4ge in my /u/dobbsj home directory. when i cd into "good" ones, it runs good old /u/dobbsj/hello.4ge just fine. when in a "bad" one, the same /u/dobbsj/hello.4ge bombs out. it's odd you mentioned SE though, you nailed that one. even if the <database>.dbs is in the "good" directory, i'm still puzzled as how to make programs that from the "bad" (i know the metaphor's wearing thin-lol) access them.
> What happens when you run a "bad" program, from a "bad" directory, but
> supplying full path name?
i experimented and while sitting in a bad directory i gave an explicit
path to run the *.4ge in that same directory, it bombed out.
> Which version of 4gl and engine are you running?
INFORMIX-4GL Version 4.00.UE1
INFORMIX-SE Version 4.00.UE2
(jurassic, but that's what they want for now).
> What happens, when you put the hello.4gl program in your
> home directory, reset PATH to the absolute minumum
> (bin, /usr/bin, $INFORMIXDIR/bin) - does it compile and run?
I set the path to...
PATH=/bin:/usr/bin:/usr/informix/bin
And try to c4gl in my home directory, same old thing...
| Invalid message type received from the sqlexec process.
| See error number -408.
Interestingly enough, when I copy a working version of hello.4ge to my
home directory, it will run perfectly while sitting in other "good"
directories (it's picked up from my path), but not while sitting in a
bad directory. We just had a guy from IBM "clone" our existing server
to a new server, perhaps this is more of an AIX problem than an
Informix problems (someone suggested checking the mount points? I'll
look into that). Again all help gratefully appreciated, thanks!
> Have you checked the underlying mount point permissions? Having mostly exhausted all path issues (maybe), this is a new route we haven't tried. In the above posts I mentioned I can rename directories and things still work/won't work just the same, the name doesn't seem to matter at all. As a developer (forced into attempting to fix this problem) it'll take some research. If after hearing this weird problem, you think this might be a possiblity, that's a ray of hope. lol Thanks!
Since looks like you still have the old server running, I would do a
full backup of
the directory tree with cpio to tape, blow it away from the "new" server
and restore. It does look like O/S problem to me. BTW: Have you rebooted
the darn thing? Also have a look at the permissions of sqlexec and sqlexecd
in $INFORMIXDIR/bin on both servers.I sort of remember having to fix
them on one of the files (10 years ago....).
If you find the problem, would you be so kind as to post the solution.
Michael
Smitty wrote:
>>What happens when you run a "bad" program, from a "bad" directory, but
>>supplying full path name?
>>
>>
>
>i experimented and while sitting in a bad directory i gave an explicit
>path to run the *.4ge in that same directory, it bombed out.
>
>
>
>>Which version of 4gl and engine are you running?
>>
>>
>INFORMIX-4GL Version 4.00.UE1
>INFORMIX-SE Version 4.00.UE2
>(jurassic, but that's what they want for now).
>
>
>
>>What happens, when you put the hello.4gl program in your
>>home directory, reset PATH to the absolute minumum
>>(bin, /usr/bin, $INFORMIXDIR/bin) - does it compile and run?
>>
>>
>
>I set the path to...
>PATH=/bin:/usr/bin:/usr/informix/bin>
>And try to c4gl in my home directory, same old thing...
>
>| Invalid message type received from the sqlexec process.
>| See error number -408.
>
>Interestingly enough, when I copy a working version of hello.4ge to my
>home directory, it will run perfectly while sitting in other "good"
>directories (it's picked up from my path), but not while sitting in a
>bad directory. We just had a guy from IBM "clone" our existing server
>to a new server, perhaps this is more of an AIX problem than an
>Informix problems (someone suggested checking the mount points? I'll
>look into that). Again all help gratefully appreciated, thanks!
>
>
1) Prove that twisted symlinks are not part of the problem, by running pwd -P in each directory. This should print the physical path of the directory if AIX is anything like other UNIX. If the Physical path is not the same as the logical path, then you'll have to somehow prove that all symlinks in the directory tree are not messed up. 2) prove that the filesystem is not corrupt by unmounting the filesystem then running fsck with the most detailed options possible. Of course, run it with the -n (or AIX equivalent) so that it doesn't attempt to fix anything the first time you run it. 3) environment - run this env | sort > /tmp/envfile on both the new and the old machine, and post to the newsgroup or e-mail directly to me: ahamm at sanderson dot net dot au. Of course, you can compare the two files yourself and look for any sillies... 4) Has the database been transferred by copying the .dbs directory (potentially bad) or by exporting and importing (safest option). If the paths to the table files is different, or table that was manually relocated in the old machine is not noticed and accommodated on the new machine, it can get really silly. 5) You appear to be running .4ge executables. If you can, try running .4gi pcode against fglgo. This might point the finger at the .4ge build process. 6) Since you've got different version of AIX, have you completely re-built all objects and libraries using the new O/S C compiler? Binary incompatibilities can be a problem. Since you are using 4GL 4.0 then you may well be suffering major compatibility problems that cannot be worked around except by upgrading. NOTE: you probably don't have the source to the UCL library, so if you are using that, the .a for the UCL's may be hopelessly out of date and hopelessly un-rebuildable. 7) Since you are trying to run version 4 informix products, you may not be able to run them on a modern version of AIX. 8) Are the Informix products installed in the right order? The Invalid message type received from the sqlexec process. error is a classic symptom of incorrect installation order. Each of the products has a few files that over-ride each other, so it's important to get the proper ones installed last. Follow the rule of T.E.N. - Tools, engine, Network. Check the contents of $INFORMIXDIR/etc/.snfile to prove that the Informix products have been installed in the following order: iSQL (if installed - it's less important than 4GL) 4GL RDS (if used) 4GL (ie to .4ge) Standard Engine iStar (or, what was it called for SE? anyway, the network connectivity product should go down last) 9) Ultimately, you are probably hitting the wall because you are trying to use really old versions of 4GL. I don't know *why* you are getting random behaviour depending on the physical directory, although there's a teeny nagging voice whispering at the back of my brain that it's seen a directory-dependent fault before. If so it truly escapes me, but let's see if the background neurones come up with something... -- There's nowt wrong wi' owt what mitherin' clutterbucks don't barly grummit! - Replies directly to this message will go to an account that may not be checked for a week or two. For more timely e-mail response, use (only in an emergency) ahamm sanderson net au with all the usual punctuation.
What is DBPATH set to? Smitty wrote: > > > - Some environment variable somewhere contains an entry starting with . or > > .. > > so it is picked up relative to the "good" directory but not there when > > starting > > from the "bad" directory. > > i appreciate you sticking w/my good/bad metaphor! > I did an experiment that may rule out any environment variable path > problem. > i can rename a good directory to a bad (and vice-versa) and the > problem is not fooled. programs bomb under a bad directory even when > it's renamed with the exact path as a good one (good one temporarily > renamed *.hld) > > Both paths are nearly identical. > /usr/fourgen/accounting/ap.4gm (good) > /usr/fourgen/accountign/gl.4gm (bad) > > > - The database is a Standard Engine database and the <database>.dbs is in > > the > > "good" directory. > > > > The database is SE 4.0, and the database(s) in question are in > directies (*.dbs) where things work. yet my little program that > access this database bomb out when run from certain directories. to > simplify testing i put hello.4ge in my /u/dobbsj home directory. when > i cd into "good" ones, it runs good old /u/dobbsj/hello.4ge just fine. > when in a "bad" one, the same /u/dobbsj/hello.4ge bombs out. it's > odd you mentioned SE though, you nailed that one. even if the > <database>.dbs is in the "good" directory, i'm still puzzled as how to > make programs that from the "bad" (i know the metaphor's wearing > thin-lol) access them. -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com #