title: serverspec test fails for listening port
body: <p>I got a kitchen-ansible test that runs serverspec as a verifier. The test runs on two containers. One running with Amazon Linux 1 and the other Amazon Linux 2. The Ansible code installs a Keycloak server which listens on the ports 8080 and 8443. </p>
  
  <p>In the Amazon Linux 1 container, everything's fine and the serverspec reports the ports to be listening. </p>
  
  <p>In the Amazon Linux 2 container, the installation also ends without any errors but serverspec fails to report the ports not be listening. As I found out Serverspec is wrong.
  After logging into the container running <code>netstat -tulpen |grep LISTEN</code> it shows the ports to be listening. Serverspec is checking with ss command: <code>/bin/sh -c ss\ -tunl\ \|\ grep\ -E\ --\ :8443\\\</code>
  So I logged in to the Amazon Linux 1 container for checking the output of the ss command there and it showed no listening on both ports.</p>
  
  <p>So has anyone a clue why the serverspec succeeds on Amazon Linux 1 and fails on Amazon Linux 2 despite in both containers the ss command is reporting no ports to be listened on?</p>