PHP Error log growing to fill root partition- New

PHP Error log growing to fill root partition- New

by Matthew DiSano -
Number of replies: 6

I am starting this discussion topic again as requested in the title of the discussion topic above.


I am also having the problem outlined where my /var file system is growing to a point of filling up the partition because of errors in the php error log as such:

PHP Warning:  ldap_search(): Search: Can't contact LDAP server in /var/www/html/moodle/auth/ldap/auth.php on line 715


I have confirmed I have ldap access as before without any problems and I am able to run the LDAP sync task. without a errors. The bind user has not changed and has access to the context that is configured ( obviously since it is able to connect fine ).   I am using secure ldap to connect to the AD server.   I have double checked settings in my ldap plugin authentication and do not see any issues the may be the cause.   The errors occur every second and have several entries per second.   

I am running moodle 3.5.1 with PHP 7.2.8

Has anyone been able to fix this problem?  Could use your help

Average of ratings: -
In reply to Matthew DiSano

Re: PHP Error log growing to fill root partition- New

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Basic checks: what does Test Settings report? SELinux is off (or has been configured to allow Apache to make outgoing connections)? LDAP authentication is definitely occurring, e.g. if you create a new AD user with a password, then that user can log into Moodle with the password you set for that user.

When you say secure LDAP, do you mean Use TLS is enabled or you're using an LDAPS URL, or both? I think Use TLS is recommended but because AD will provide a self-signed certificate the LDAP library needs to be configured to skip verification by adding TLS_REQCERT allow to /etc/openldap/ldap.conf.

Average of ratings: Useful (1)
In reply to Leon Stringer

Re: PHP Error log growing to fill root partition- New

by Matthew DiSano -

Test setttings works fine and I can also run the ldap sync from the sheduled task and it connects as well.

I have a cert installed.  I have tls set to know.   If I try to use TLS i get and error about paged support unable to determine.   I am using ldaps and that is working.   My ldap.conf files follows:

# LDAP Defaults

#

# See ldap.conf(5) for details

# This file should be world readable but not world writable.

BASE    dc=UEMF,dc=local

#URI    ldap://ldap.example.com ldap://ldap-master.example.com:666

#SIZELIMIT      12

#TIMELIMIT      15

#DEREF          never

TLS_REQCERT allow


TLS_CACERT /etc/openldap/certs/uemfCA.pem

TLS_CACERTDIR   /etc/openldap/certs

# Turning this off breaks GSSAPI used with krb5 when rdns = false

SASL_NOCANON    on


Apache is allowed to make outgoing connections to ldap

httpd_can_connect_ldap --> on

moodle is a valid user in the domain and can login


See something strange also.  Decided to do an upgrade to 3.5.3   I moved my moodle directory to moodle.backup .  Without any code out in my /var/www folders, the error is still generating stating it calling the auth.php program that no longer exists in that location and still stating it can't connect.   How is that possible??

In reply to Matthew DiSano

Re: PHP Error log growing to fill root partition- New

by Matthew DiSano -

Sorry TLS set to NO

In reply to Matthew DiSano

Re: PHP Error log growing to fill root partition- New

by Matthew DiSano -

shutdown apache, shutdown database, shutdown cron.   Errors still coming in php log file

In reply to Matthew DiSano

Re: PHP Error log growing to fill root partition- New

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Is the same PID being logged in the error log each time (hopefully this is being logged)?

Even if not, try seeing if the process is running using the PID from the most recent entry. E.g. ps -eaf | grep pid where pid is the numeric PID from the log entry, or you could use top and filter by PID (o then PID=pid on my version).

I'm wondering if there's some looping process stuck in RAM, e.g. a cron script that's been running for a long time.

In reply to Matthew DiSano

Re: PHP Error log growing to fill root partition- New

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Is it possible that you have a second moodle install on the same server - dev server perhaps??