HTTPS (SSL) connection fails with an application running in a Linux virtual machine
search cancel

HTTPS (SSL) connection fails with an application running in a Linux virtual machine

book

Article ID: 309214

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:

With an application running in a Linux virtual machine:

  • An HTTPS connection cannot be established
  • An HTTPS connection times out or works intermittently
  • Application logs show timeouts on /dev/random
  • Necessary entropy is not available to meet required application needs


Environment

VMware ESXi 4.1.x Embedded
VMware ESXi 4.1.x Installable
VMware ESX 4.1.x

Cause

In Unix and Linux operating systems, /dev/random and /dev/urandom are special files that serve as random number generators. They allow access to environmental noise collected from device drivers and other sources. Inside a virtual machine environment, these devices exhaust their pool of random bits much more quickly than in a physical environment because hardware events are less common in a virtual machine.

Resolution

To resolve this issue, either:

  • Configure your application to use /dev/urandom instead of /dev/random

    OR

  • Replace /dev/random with a symbolic link to /dev/urandom

To replace /dev/random with a symbolic link to /dev/urandom:

  1. Log in to the console of the Linux virtual machine as root.
  2. Back up the current contents of /dev/random with this command:

    mv /dev/random /dev/random.orig

  3. Create the symbolic link from /dev/random to /dev/urandom with this command:

    ln -s /dev/urandom /dev/random