Answers: <p>I also had this problem show up.  I think it's related to SSH.  I was writing a custom sshd_config.  Vagrant login's were slow after the first converge and verify was taking forever.  Removing the sshd_config stuff from my cookbook fixed the verify and slow logins.</p>
  
  <p>Maybe it's not very helpful, but it's a place to start looking, anyway.  Short term, I hacked it together:</p>
  
  <pre><code>unless ENV['TEST_KITCHEN']
    cookbook_file '/etc/ssh/sshd_config' do
      source 'sshd_config'
      mode '0644'
      notifies :restart, 'service[sshd]', :delayed
    end
  end
  </code></pre>
  
  <p>Jye</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-02-28T11:14:34.537Z
Answers: Yes that does seem to be the problem. The other problem is that I _do_ want to test the SSH stuff. I wonder if there's any way to speed it up? Hm.
Answers: Chaim Eliyah
Answers: CC BY-SA 4.0
Answers: 2019-03-02T02:27:34.393Z
Answers: When I get a moment, I'm going to start commenting my sshd_config until I find what causes it to hang.
Answers: Jye Meier
Answers: CC BY-SA 4.0
Answers: 2019-02-11T13:10:19.120Z
Answers: 2019-02-11T13:10:19.120Z
Answers: Jye Meier
Body: <p><code>.kitchen.yml</code></p>
  
  <pre><code>---
  driver:
    name: vagrant
  
  provisioner:
    name: chef_zero
  
  platforms:
    - name: debian-9
    - name: centos-7
  
  suites:
    - name: default
      run_list:
        - recipe[foo::default]
      verifier:
        inspec_tests:
          - test/integration/default
      attributes: 
        foo: 
          sshd: 
            port: 22
  </code></pre>
  
  <p>cmd: <code>$ kitchen verify</code></p>
  
  <p>debian-9 finishes just fine, no problems.
  centos-7 just hangs and hangs.  </p>
  
  <p>I don't believe it's the tests. They are standard inspec control checks. If I comment out the tests, the same thing happens.</p>
  
  <p>Any idea what could be happening here?</p>
  
  <p><code>format: documentation</code> output: </p>
  
  <pre><code>Finished in 0.75833 seconds (files took 0.90276 seconds to load)
  30 examples, 0 failures, 1 pending
  
         Finished verifying &lt;default-debian-9&gt; (0m1.91s).
  -----&gt; Verifying &lt;default-centos-7&gt;...
  </code></pre>
  
  <p>Nada. The "1 pending" is just a check that has been ignored due to OS detection.</p>
  
  <p>This was working earlier today and stopped working out of the blue. I tried destroying the vagrant box.</p>
  
Comments: CC BY-SA 4.0
Comments: 2019-02-05T17:19:11.503Z
Comments: I left it to run all night and it eventually finished. That won't work for CI.
Comments: Chaim Eliyah
Tags: <chef>
Title: kitchen verify hangs on centOS, but not Debian
UserDisplayName: Chaim Eliyah
ThreadText: # kitchen verify hangs on centOS, but not Debian
  
  (Asked by: username_0 on 2019-02-05)
  
  `.kitchen.yml`
  
  ```
  ---
  driver:
    name: vagrant
  
  provisioner:
    name: chef_zero
  
  platforms:
    - name: debian-9
    - name: centos-7
  
  suites:
    - name: default
      run_list:
        - recipe[foo::default]
      verifier:
        inspec_tests:
          - test/integration/default
      attributes: 
        foo: 
          sshd: 
            port: 22
  
  ```
  
  cmd: `$ kitchen verify`
  
  debian-9 finishes just fine, no problems.
  centos-7 just hangs and hangs.
  
  I don't believe it's the tests. They are standard inspec control checks. If I comment out the tests, the same thing happens.
  
  Any idea what could be happening here?
  
  `format: documentation` output:
  
  ```
  Finished in 0.75833 seconds (files took 0.90276 seconds to load)
  30 examples, 0 failures, 1 pending
  
         Finished verifying <default-debian-9> (0m1.91s).
  -----> Verifying <default-centos-7>...
  
  ```
  
  Nada. The "1 pending" is just a check that has been ignored due to OS detection.
  
  This was working earlier today and stopped working out of the blue. I tried destroying the vagrant box.
  
  **Tags:** chef
  
  > **Comments:**
  > **username_0**: I left it to run all night and it eventually finished. That won't work for CI.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-02-11. Score: 2
  
  I also had this problem show up. I think it's related to SSH. I was writing a custom sshd\_config. Vagrant login's were slow after the first converge and verify was taking forever. Removing the sshd\_config stuff from my cookbook fixed the verify and slow logins.
  
  Maybe it's not very helpful, but it's a place to start looking, anyway. Short term, I hacked it together:
  
  ```
  unless ENV['TEST_KITCHEN']
    cookbook_file '/etc/ssh/sshd_config' do
      source 'sshd_config'
      mode '0644'
      notifies :restart, 'service[sshd]', :delayed
    end
  end
  
  ```
  
  Jye
  
  > **Comments:**
  > **username_0**: Yes that does seem to be the problem. The other problem is that I _do_ want to test the SSH stuff. I wonder if there's any way to speed it up? Hm.  
  > **username_1**: When I get a moment, I'm going to start commenting my sshd_config until I find what causes it to hang.  
  
  ---
  
  