Informix

 View Only
Expand all | Collapse all

Shared memory segments are not removed with the onmode -ky command

  • 1.  Shared memory segments are not removed with the onmode -ky command

    Posted Fri October 30, 2020 02:27 AM
    Hello everyone.
    I would like to ask for advice on the problem of restarting after stopping Informix.

    Below is the order in which the instances were created.
    1. Compress the entire Informix directory $INFORMIXDIR of the existing host (host1) with tar
    2. Copy the tar file to another host (host_dev)
    3. Uncompress tar file and start instance (-ivy)

    The start of the newly configured instance on host_dev worked well, but when I restarted again after shutting down with onmode -ky command, shmget: [EEXIST][17] error message occurred. Checking with the ipcs command, the shared memory segment was not removed. It was removed with the onclean command.

    Interestingly, running the onmode -ky command as the root user removed the shared memory segment.

    It is being used in an AIX environment and the informix user ID (uid) and group ID (gid) are the same.
    The authority of the /INFORMIXTMP directory is informix:informix. There are no other instances with the same SERVERNUM.

    What else should I check?

    ------------------------------
    SangGyu Jeong
    Software Engineer
    Infrasoft
    Seoul Korea, Republic of
    ------------------------------

    #Informix


  • 2.  RE: Shared memory segments are not removed with the onmode -ky command

    Posted Fri October 30, 2020 06:34 AM
    Hello,

    It can be this issue?

    IT29597:  shutting down an instance using INFORMIXSERVER different from the one used for startup would leave shared memory segments behind 

    For AIX, it should be fixed in

    14.10.FC3X1
    12.10.FC13XF
    12.10.FC13XH

     



    ------------------------------
    Milan Rafaj
    ------------------------------



  • 3.  RE: Shared memory segments are not removed with the onmode -ky command

    IBM Champion
    Posted Fri October 30, 2020 01:55 PM
    Milan - thanks for sharing this.  I have run into this issue when Informix is started with INFORMIXSERVER set to a SHM connection, and then I stop it with INFORMIXSERVER set to a network connection.  I don't know if this is the same issue that SangGyu is facing but I'm glad to know that there's a fix for this, and it is easy to verify if this is the problem by just switching INFORMIXSERVER when shutting Informix down.

    ------------------------------
    Mike Walker
    ------------------------------



  • 4.  RE: Shared memory segments are not removed with the onmode -ky command

    Posted Fri October 30, 2020 09:53 PM
    Hi Milan.
    Thank you for sharing information about the defect IT29597.
    I'll try the workaround of the document.

    ------------------------------
    SangGyu Jeong
    Software Engineer
    Infrasoft
    Seoul Korea, Republic of
    ------------------------------



  • 5.  RE: Shared memory segments are not removed with the onmode -ky command

    IBM Champion
    Posted Fri October 30, 2020 09:44 AM

    Did you tar/untar as root ?

     

    Cheers

    Paul

     






  • 6.  RE: Shared memory segments are not removed with the onmode -ky command

    Posted Fri October 30, 2020 06:44 PM
    Check the owership of oninit, onstat, onmode. It could have been changed during tar/untar if you did not use root.

    -rwsr-sr-- 1 root informix 27392099 Jun 12 2019 oninit
    -rwsr-sr-x 1 root informix 2430365 Jun 12 2019 onmode
    -rwxr-sr-x 1 informix informix 6512735 Jun 12 2019 onstat

    Below are the correct permission for the 3 files. 
    egrep "oninit|onmode|onstat" IIFfiles
    bin/onstat informix informix 2755 BRAND VRSN - IDS-CORE
    bin/oninit root informix 6754 BRAND VRSN - IDS-CORE
    bin/onmode root informix 6755 BRAND VRSN - IDS-CORE

    ------------------------------
    Casey Tan
    ------------------------------



  • 7.  RE: Shared memory segments are not removed with the onmode -ky command

    Posted Fri October 30, 2020 10:07 PM
    Hello Casey, Thanks for your reply.
    I also tried running the ifmx_security.sh script to modify the permissions of files such as onmode. I don't know if that's the right way ;)
    The only way to restore the permissions of Informix installation is to unzip the existing tar file or reinstall the product?

    ------------------------------
    SangGyu Jeong
    Software Engineer
    Infrasoft
    Seoul Korea, Republic of
    ------------------------------



  • 8.  RE: Shared memory segments are not removed with the onmode -ky command

    Posted Sun November 01, 2020 05:13 PM
    If the permissions of the 3 main files are incorrect, likely that other files needed to be fixed as well. The best method is to run ids_install installation again.

    ifx_security.sh script does not fix all the file permissions.

    Another way to try is to tar again on the source. Check if the host1 source directory $INFORMIXDIR/bin has the correct permissions, if they are correct, make sure you use the option to preserve the file permission. I do not have access to an AIX machine to test, so not too sure whether it would work well with the AIX tar -p option. 


    ------------------------------
    Casey Tan
    ------------------------------



  • 9.  RE: Shared memory segments are not removed with the onmode -ky command

    IBM Champion
    Posted Mon November 02, 2020 10:05 AM

    To fix the perms then run the runasroot script (if you have it)

     

    Cheers

    Paul

     






  • 10.  RE: Shared memory segments are not removed with the onmode -ky command

    Posted Fri October 30, 2020 10:17 PM
    Thanks for your reply, Paul.
    I ran tar/untar as the root user and checked the permissions of each file.


    ------------------------------
    SangGyu Jeong
    Software Engineer
    Infrasoft
    Seoul Korea, Republic of
    ------------------------------