Skip to content

Fixing a 502 Bad Gateway on VMware SDDC Manager by Freeing Up Disk Space (Log Rotation Issue)

Table of Contents

Introduction

A 502 Bad Gateway or 503 Service Unavailable error on an SDDC Manager can often stem from a full disk  most commonly caused by failed log rotation. In this article, we walk through practical steps to identify and fix this issue so you can regain access to the SDDC Manager UI.

Issue

When the root partition of your SDDC Manager VM fills up, critical services — including the web UI — fail to start properly. This often results in browser errors like:

					502 Bad Gateway – nginx
				

Understanding the Cause

Before diving into updates or configuration changes, the first step is to confirm if disk space is the root cause.

1. SSH Into the SDDC Manager
ssh vcf@<SDDC-Manager-IP>
su root

2. Check Disk Usage
Once logged in as root, check if any partitions, especially /, are at or near 100% capacity:

					df -h
				

If the root volume (e.g., /dev/mapper/vg_system_lv_root) is full, you’re likely dealing with a large log or journal file.

Solution

Clear Large Log Files

To identify oversized logs in /var/log, run:

					du -ah /var/log | sort -rh | head -n 20
				

This command shows the largest files for example, messages.1, audit.log, or auth.log. If they are unusually large, log rotation may have failed.

Fix Log Rotation

Now the files have been reset, you need to confirm logrotation configuration is correct, and restart the logrotation service, by using the following command:

					logrotate -f /etc/logrotate.conf
				

Now reboot the SDDC Manager vm with the following command:

					reboot
				

Latest Posts

How to change vSAN service subnet with Zero downtime

Table of Contents Introduction In this blog we go through changing our vSAN service subnet without any downtime.

Fix Cloud Director 10.6 upgrade fails with error Failed dependencies

Table of Contents Introduction In this short blog we will show to how to fix a error when

Commission & Decommission a host with VMware Cloud Foundation

Table of Contents Introduction In this blog we will show how commission and decommission hosts with VMware Cloud