Menu

#3 Informix D4GL having perms issue

1.0
closed
None
2019-11-26
2019-11-26
No

I'm getting an error when trying to run Informix D4GL coff code on a new RHEL 7 production box
( It works fine on my standard rhel 7 devel box.)
The production box has selinux set in permisive mode,, (disabling makes no difference).

I've compared modes/ owner/group on the ibcs-us which has ..
setcap cap_sys_rawio+eip ibcs-us
-rwxr-xr-x. 1 root root 181160 Oct 17 15:36/usr/local/bin/ ibcs-us
which are the same on the dev and prod

-bash-4.2$ ibcs-us /u/catcom/bin/orgstruct.42e
Program stopped at "globals.4gl", line number 1.
SQL statement error number -468.
Cannot obtain user id from system: unable to start database engine.

the informix db finerr tool expands on the error
-bash-4.2$ finderr -468
-468 Cannot obtain user id from system: unable to start
database server.

Your application is trying to open communications to a database server.
As part of this action, it has to read your user ID from the system
password file, and it failed to do this. Look for operating-system
error messages that might give more specific information. Consult with
a system administrator to ensure that the file of user IDs is readable
to all users.

FYI, anotherr 4gl program that doesn't connect to the database works fine...

On my working dev box
runiing the orgstruct. 42e test
and lookibg at the process list shows what Informix DB progeams get executed
process tree
catcom 24635 24627 0 19:20 pts/1 00:00:00 ibcs-us /u/catcom/bin/orgstruct.42e
-> catcom 24636 24635 0 19:20 pts/1 00:00: /usr/informix_sqldev_se725_csdk370_x32/lib/sqlrm
-> catcom 24638 24636 0 19:20 pts/1 00:00:00 sqlexec catcom_se mon7.transmit

the perms on these are the same on both systems also
-rwxr-xr-x. 1 informix catcom 643174 Mar 11 2018 sqlrm (relay module)
-rwsr-sr-x. 1 root catcom 1564871 Mar 11 2018 sqlexec (db engine)
these are also the same on dev and prod
(notice the setud and setgid on the sqlexec,)

the /etc/passwd is readable to all
-rw-r--r--. 1 root root 5494 Nov 26 12:20 /etc/passwd

I'm lost to know where to look next for differences,
,any insights on where the issue my lie woiuld be much appreciated.

Rod

Rod

Discussion

  • Rod Sheppard

    Rod Sheppard - 2019-11-26

    ibcs-us trace when run on production box and gets the error
    Program stopped at "globals.4gl", line number 1.
    SQL statement error number -468.
    Cannot obtain user id from system: unable to start database engine.

     
  • Russell Stuart

    Russell Stuart - 2019-11-26

    I'll need to re-create the same environment I used last time. I've deleted it as requested because of the licencing issues, so I'll need the same stuff again - a tar ball of a chroot that reproduces the problem.

     
  • Rod Sheppard

    Rod Sheppard - 2019-11-26

    I will attempt to create a tar ball of a chroot with the error,
    What Ive determined from testing is that if the test user is withon 1024 bytes (1 read ) of /etc/passwd then the 4gl worrks fine.
    the production box is always doing only 1 read of 1024 bytes on the open /etc/passwd
    wh\ere as the Dev box loops on the read () 1024 bytes of /etc/passwd unitil it finds the line matching getuid()

     

    Last edit: Rod Sheppard 2019-11-26
  • Rod Sheppard

    Rod Sheppard - 2019-11-26

    Found the issue, there was a # out entry in /etc/passwd that had the number of ":' separrateors accidentally changed,
    So thing to do with ibcs-us
    Please close

     
  • Russell Stuart

    Russell Stuart - 2019-11-26
    • status: open --> closed
    • assigned_to: Russell Stuart
     

Log in to post a comment.