If you are using stunnel in client mode you may experience connection problems when connecting to your stunnel services.
To avoid these problems make the following changes in your stunnel.conf file:
- Comment out the following line: chroot = /var/lib/stunnel4/
- Update pid file location with this: pid = /var/lib/stunnel4/stunnel4.pid
- Add delay = yes into the service configuration
In this case DNS lookup will be done when the service is needed for the first time.