The Pluggable Authentication Modules (PAM) is a component of the Linux system. PAM provides dynamic authentication support for applications and services. If the configuration of the system causes the configured PAM authentication procedure to fail, the OCP-Agent pos_proxy process will not be able to run commands. This topic describes how to troubleshoot the unavailability of the pos_proxy process caused by system resource constraints and the PAM.
Problem description
When you add a host, deploy a cluster, or deploy an OBProxy in the OceanBase Cloud Platform (OCP) console, some sub-tasks fail with an error message "sudo: pam_open_session: Permission denied".
Possible causes
The configured PAM of the Session type failed to authenticate the status of the corresponding operations. General causes include:
An error occurred while authenticating sudo permissions because you have not granted the corresponding user the required permissions in the
sudoersfile under the/etc/directory.An error occurred while authenticating the system resource constraint configuration because you have configured improper system resource constraints by using the
ulimitcommand or in thelimits.conffile under the/etc/security/directory.
Solutions
Grant the required sudo permissions to the corresponding user
Log on to the host that returns the error as the root user.
Run the
vi /etc/sudoerscommand to check whether the root user and administrator have the following permissions:root ALL=(ALL) ALL admin ALL=(ALL) ALLIf yes, they have the required permissions.
Otherwise, you need to modify the permissions as shown in the preceding figure and proceed to the next step.
Restart the ocp_agent processes.
You can restart a process by clicking Restart in the Processes list in the OCP console or by running a command in the OCP-Agent script.
Make sure that the system resource constraints are correctly configured.
Log on to the host that returns the error as the root user.
Run the
cat/proc/sys/fs/nr_opencommand to view the maximum number of files that the OBServer allows the process to open.Open the
/etc/security/limits.conffile and set a value smaller than the maximum number of files that can be opened.# Assume that 655360 is less than the maximum number specified. cat >> /etc/security/limits.conf <<EOF * soft nofile 655360 * hard nofile 655360 EOFRestart the ocp_agent processes.