DnsPinMiddleware.php error in the log

Nextcloud version (eg, 29.0.5): 29.0.3
Operating system and version (eg, Ubuntu 24.04): Ubuntu 24.04
Apache or nginx version (eg, Apache 2.4.25): nginx 1.24.0
PHP version (eg, 8.3): 8.3.6

The issue you are facing: There’s an error message in the log:

dns_get_record(): A temporary server error occurred. at 'usr/share/nginx/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php#113

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it: It hasn’t happened since Friday July 5.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"VCoBqfoeBUQdKf8AF6VO","level":3,"time":"2024-07-05T18:43:54+00:00","remoteAddr":"192.168.1.1","user":"Ken","app":"PHP","method":"GET","url":"/settings/admin/overview","message":"dns_get_record(): A temporary server error occurred. at /usr/share/nginx/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php#113","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0","version":"29.0.3.4","data":{"app":"PHP"},"id":"668ad1cdc258d"}c

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'oc***REDACTED***',
  'passwordsalt' => '***REDACTED***',
  'secret' => '***REDACTED***',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.koalatyworks.com',
  ),
  'datadirectory' => '/usr/share/nginx/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '29.0.3.4',
  'overwrite.cli.url' => 'https://nextcloud.koalatyworks.com',
  'maintenance_window_start' => 1,
  'default_phone_region' => 'US',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'removed',
  'dbpassword' => 'removed',
  'installed' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'removed',
  'mail_smtphost' => 'removed',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'removed',
  'mail_smtppassword' => 'removed',
  'maintenance' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'theme' => '',
  'loglevel' => 2,
);

The output of your Apache/nginx/system log in /var/log/____:

2024/07/06 14:15:05 [error] 425368#425368: *83482 FastCGI sent in stderr: "PHP message: PHP Warning:  http_response_code(): Cannot set response code - headers already sent (output started at /usr/share/nginx/nextcloud/apps/richdocumentscode/proxy.php:285) in /usr/share/nginx/nextcloud/apps/richdocumentscode/proxy.php on line 292" while reading upstream, client: 127.0.0.1, server: nextcloud.koalatyworks.com, request: "GET /apps/richdocumentscode/proxy.php?status HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.3-fpm.sock:", host: "nextcloud.koalatyworks.com"
2024/07/06 14:15:05 [error] 425367#425367: *83486 FastCGI sent in stderr: "PHP message: PHP Warning:  http_response_code(): Cannot set response code - headers already sent (output started at /usr/share/nginx/nextcloud/apps/richdocumentscode/proxy.php:285) in /usr/share/nginx/nextcloud/apps/richdocumentscode/proxy.php on line 292" while reading upstream, client: 127.0.0.1, server: nextcloud.koalatyworks.com, request: "GET /apps/richdocumentscode/proxy.php?status HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.3-fpm.sock:", host: "nextcloud.koalatyworks.com"
2024/07/06 14:16:18 [error] 425367#425367: *83492 directory index of "/var/www/mx2.koalatyworks.com/" is forbidden, client: 52.13.108.11, server: mx2.koalatyworks.com, request: "GET / HTTP/2.0", host: "mx2.koalatyworks.com"
2024/07/06 15:15:09 [error] 425370#425370: *83648 FastCGI sent in stderr: "PHP message: PHP Warning:  http_response_code(): Cannot set response code - headers already sent (output started at /usr/share/nginx/nextcloud/apps/richdocumentscode/proxy.php:285) in /usr/share/nginx/nextcloud/apps/richdocumentscode/proxy.php on line 292" while reading upstream, client: 127.0.0.1, server: nextcloud.koalatyworks.com, request: "GET /apps/richdocumentscode/proxy.php?status HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.3-fpm.sock:", host: "nextcloud.koalatyworks.com"

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Completely blank

As the message said, it is a temporary server error.

This is a (noisy) php error message, not an error message from the nextcloud server.

There is an issue about this message flooding logs in docker environments:

So far it does not look like something you have to wory about.


Your nginx server log is about richdocumentscode and does not look like it has anything to do with the dns_get_record() error message.


Much and good l,uck,
ernolf