11 Replies Latest reply on Jul 13, 2020 1:54 AM by Dude!

    [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro

    ASGR71

      Hi All,

       

      I have a Dell Optiplex 3060 Micro that is/was a supported machine for the database platform

      as per Red-Hat website.

       

      Since Oralce Enterprise Linux 7.6, the Resource Limits will not accept changes through

      any technique making any attempt to install the database futile and having to resort to

      OEL 7.5 but without ANY upgrades.

       

      And yes, OEL 7.5 works flawlessly by either pasting the resource limits into /etc/security/limits.conf

      or as a separate file in /etc/security/limits.d/50-oracle-limits.conf but not being able to

      utilise any upgrade feature as it would install OEL 7.6 and the system would immediately

      become unusable.

       

      Has anybody experienced this or know of a solution? Next step is to post on Red Hat or Dell!

      This issue has exhausted my interest levels and I'll be abandoning Oracle Linux in favour of

      another strain of Fedora or Sun OS.

       

      Regards,

      A.

        • 1. Re: [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro
          Dude!

          I have configured OL 7.6 and 7.7 for Oracle database a couple of times and have not experienced such issues. You're also the first to report such problem in the public community forum. I can only guess it must be something specific to your installation or how you have it configured. There have been fundamental changes between previous and current OS releases that affect how you need to configure the system, and these configuration changes are not Oracle Linux specific. However, there is not much to confirm or work with unless you provide some details. You could probably file a service request with Oracle?

          • 2. Re: [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro
            ASGR71

            Thanks Dude,

             

            I'll try a complete factory reset of the computer and eliminate any OS security setup during install and get back to you here.

            • 3. Re: [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro
              Dude!

              For what it's worth, I have the following in my personal notes. It worked fine under OL 7.7, as far as I can tell.

               

              The usual oracle DB preinstallation packages will configure the limits for the "oracle" user, but will not create the "grid"user. If you use oracle/grid role separation, then you need to set this up correctly. If your user isn't called "grid" or "oracle" you need to substitute it with the right user.

               

              cat > /etc/security/limits.d/oracle-grid.conf << EOF
              # Note: MOS Doc ID 2225317.1
              #
              grid   soft   nofile    1024
              grid   hard   nofile    65536
              grid   soft   nproc    16384
              grid   hard   nproc    16384
              grid   soft   stack    10240
              grid   hard   stack    32768
              grid   hard   memlock    134217728
              grid   soft   memlock    134217728
              EOF

              #

               

               

              https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/checking-resource-limits-for-oracle-software-install…

              • 4. Re: [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro
                ASGR71

                Thanks Dude!,

                 

                I've also been investigating the resource limits aspect of this problem and it may be that since OEL-7.6 Red Hat may have excluded the following:

                    session required pam_limits.so

                from the following file

                    /etc/pam.d/login

                 

                Still having some resource limit issues but it may be because I've not changed the sysctl variables...

                Apparently I should do this before limits.conf (head-smack emoji!).

                • 5. Re: [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro
                  Dude!

                  limits.conf is the configuration file for the pam_limits module.

                   

                  /etc/pam.d/login should contain the following:

                  session    include      system-auth

                   

                  /etc/pam.d/system-auth includes:

                  session required pam_limits.so

                   

                  That is the default as far as I can tell, checking 7.8.

                   

                  I suggest to check /etc/security/limits.conf and the /etc/security/limits.d directory for any files that could overwrite the limits for the oracle/grid user.

                   

                  You will also need to modify /etc/profile, for example:

                   

                  if [ $USER = "oracle" ]; then

                    if [ $SHELL = "/bin/ksh" ]; then

                    ulimit -p 16384

                    ulimit -n 65536

                    else

                    ulimit -u 16384 -n 65536

                    fi

                  fi

                  1 person found this helpful
                  • 6. Re: [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro
                    ASGR71

                    Thanks again Dude!,

                     

                    I have found something interesting in the following file /etc/pam.d/su:

                     

                    session include   postlogin

                    session require   pam-limits.so

                    session optional  pam_xauth.so

                     

                    the bold text has been completely mis-typed! It should read;

                    session required pam_limits.so

                     

                    Can anyone confirm this on there installation?

                    • 7. Re: [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro
                      Dude!

                      That's certainly wrong.

                       

                      Here's from a plain vanilla 7.4 installation, updated to 7.8:

                       

                      [root@localhost pam.d]# cat su

                      #%PAM-1.0

                      auth        sufficient    pam_rootok.so

                      # Uncomment the following line to implicitly trust users in the "wheel" group.

                      #auth        sufficient    pam_wheel.so trust use_uid

                      # Uncomment the following line to require a user to be in the "wheel" group.

                      #auth        required    pam_wheel.so use_uid

                      auth        substack    system-auth

                      auth        include        postlogin

                      account        sufficient    pam_succeed_if.so uid = 0 use_uid quiet

                      account        include        system-auth

                      password    include        system-auth

                      session        include        system-auth

                      session        include        postlogin

                      session        optional    pam_xauth.so

                       

                      [root@localhost pam.d]# ls -l system-auth

                      lrwxrwxrwx. 1 root root 14 Mar 22  2018 system-auth -> system-auth-ac

                       

                      [root@localhost pam.d]# cat  system-auth-ac

                      #%PAM-1.0

                      # This file is auto-generated.

                      # User changes will be destroyed the next time authconfig is run.

                      auth        required      pam_env.so

                      auth        required      pam_faildelay.so delay=2000000

                      auth        sufficient    pam_unix.so nullok try_first_pass

                      auth        requisite     pam_succeed_if.so uid >= 1000 quiet_success

                      auth        required      pam_deny.so

                       

                      account     required      pam_unix.so

                      account     sufficient    pam_localuser.so

                      account     sufficient    pam_succeed_if.so uid < 1000 quiet

                      account     required      pam_permit.so

                       

                      password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=

                      password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok

                      password    required      pam_deny.so

                       

                      session     optional      pam_keyinit.so revoke

                      session     required      pam_limits.so

                      -session     optional      pam_systemd.so

                      session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid

                      session     required      pam_unix.so

                      • 8. Re: [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro
                        ASGR71

                        The plot thinkens!

                         

                        Looks like systemd also likes to set resource limits without any interaction through ulimit.

                        You just have to look through /etc/systemd/system.conf to see the similarities.

                        I'm under the impression that ulimit is a legacy method of setting resource limits and one

                        day will be fully superceeded by systemd. It's the new golden standard!

                         

                        In conclusion, I'll have to agree with your solution with the addition to /etc/profile.

                        I'm tempted to set all the limits through /etc/profile if you don't foresee any issues?

                        I'd rather keep them all in one place instead of flipping between locations.

                         

                        Much Appreciated,

                        A.

                        • 9. Re: [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro
                          Dude!

                          Keep in mind that systemd ignores PAM limits by design. So you need to take this into consideration when starting Oracle using a systemd unit/service, and this is probably also true when using a graphical user interface.

                           

                          If you write a systemd service to automate the starting and stopping of the database, you will need to include appropriate limits, for example:

                           

                          LimitNOFILE=65536

                          LimitNPROC=16384
                          LimitSTACK=32M
                          LimitMEMLOCK=infinity
                          LimitCORE=infinity

                           

                          How do you start and stop your database services? Do you use Grid Infrastructure with ASM and Oracle Clusterworks / Oracle Restart? These Oracle services are started by systemd through a wrapper called SYSV generator.

                           

                          https://www.freedesktop.org/software/systemd/man/systemd-sysv-generator.html.

                          Does the SysV service generator honor PAM limits? I don't know.

                           

                          I think the following is a good article:

                          https://mydbops.wordpress.com/2017/12/10/ulimit-conflict-with-pam-and-systemd%E2%80%8B%E2%80%8B%E2%80%8B/

                           

                          Back to your initial problem, however, I can't see how this relates to 7.6 or updating to 7.6 in particular.

                          • 10. Re: [OEL8.2] Resource Limits changes not registering on Dell Optiplex 3060 micro
                            ASGR71

                            Thanks for all your help dude!

                             

                            I've given up on Linux and only heard much better things about Solaris.

                            I'm ONLY focusing on Solaris now!