Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Undefined method 'dig' for nil:NilClass #2

Closed
AnthonyHerman opened this issue Mar 27, 2020 · 20 comments
Closed

Undefined method 'dig' for nil:NilClass #2

AnthonyHerman opened this issue Mar 27, 2020 · 20 comments
Labels
wontfix This will not be worked on

Comments

@AnthonyHerman
Copy link

AnthonyHerman commented Mar 27, 2020

Get the following stack trace on make run-k8s using the quick start method -

Generating results...Traceback (most recent call last):
        20: from /home/node/.gem/ruby/2.6.0/bin/cinc-auditor:23:in `<main>'
        19: from /home/node/.gem/ruby/2.6.0/bin/cinc-auditor:23:in `load'
        18: from /home/node/.gem/ruby/2.6.0/gems/cinc-auditor-bin-4.18.51/bin/cinc-auditor:12:in `<top (required)>'
        17: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/base_cli.rb:35:in `start'
        16: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
        15: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
        14: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
        13: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
        12: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/cli.rb:284:in `exec'
        11: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/cli.rb:284:in `new'
        10: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/runner.rb:78:in `initialize'
         9: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/runner.rb:86:in `configure_transport'
         8: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/backend.rb:53:in `create'
         7: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/transport.rb:9:in `connection'
         6: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/transport.rb:9:in `new'
         5: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/connection.rb:13:in `initialize'
         4: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/connection.rb:36:in `parse_kubeconfig'
         3: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/client.rb:40:in `config'
         2: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/transport.rb:78:in `config'
         1: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/transport.rb:97:in `token_from_auth_provider'
/home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/transport.rb:97:in ``': No such file or directory -  (Errno::ENOENT)
Traceback (most recent call last):
./inspec-results-parser.rb:92:in `<main>': undefined method `dig' for nil:NilClass (NoMethodError)
@bgeesaman
Copy link
Contributor

bgeesaman commented Mar 27, 2020

Ah, yes. It appears that it's having trouble executing the auth provider you have inside your kubeconfig.

    # @param auth_provider [K8s::Config::UserAuthProvider]
    # @return [String]                                                                
    def self.token_from_auth_provider(auth_provider)       
      auth_data = `#{auth_provider['cmd-path']} #{auth_provider['cmd-args']}`.strip. # <--- this line here
      if auth_provider['token-key']      
        json_path = JsonPath.new(auth_provider['token-key'][1...-1])
        json_path.first(auth_data)
      else                                                      
        auth_data                      
      end                     
    end

Which type of cluster are you targeting, and was does the auth-provider block look like in your kubeconfig (please, no sensitive data).

Example for GKE:

users:
- name: gke_my_project_us-central1-c_darkbit
  user:
    auth-provider:
      config:
        cmd-args: config config-helper --format=json
        cmd-path: /home/node/google-cloud-sdk/bin/gcloud
        expiry-key: '{.credential.token_expiry}'
        token-key: '{.credential.access_token}'
      name: gcp

@bgeesaman
Copy link
Contributor

We'll also look into modifying the helper scripts to surface more helpful error messages should things go sideways.

@dustin-decker
Copy link

dustin-decker commented Mar 28, 2020

Hey Brad,

I've got the same exception for GKE and K8s.

GKE auth provider looks like

auth-provider:
      config:
        access-token: ya29.honk
        cmd-args: config config-helper --format=json
        cmd-path: /usr/lib/google-cloud-sdk/bin/gcloud
        expiry-key: '{.credential.token_expiry}'
        token-key: '{.credential.access_token}'
      name: gcp

K8s exception is preceded by

/home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/config.rb:114:in `read': Permission denied @ rb_sysopen - /home/node/.kube/config (Errno::EACCES)

GKE exception is preceded by

Generating results...Unable to read the default credential file: Permission denied @ rb_sysopen - /home/node/.config/gcloud/application_default_credentials.json

@bgeesaman
Copy link
Contributor

Interesting. What are the permissions outside of docker for those two files and when you run make shell-gke, what are the permissions inside the container for those same files?

@bgeesaman
Copy link
Contributor

Which OS, btw? OSX? or Linux? Anything else I need to reproduce? I run Docker for Mac on OSX FWIW.

@AnthonyHerman
Copy link
Author

Tried from two systems using both run-k8s and run-aks (all attempts are against the same AKS cluster) - same stack trace in every case.

Systems:

:~/tools/mkit$ cat /proc/version
Linux version 5.0.0-1035-azure (buildd@lgw01-amd64-039) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #37-Ubuntu SMP Wed Mar 18 11:21:35 UTC 2020
:~/tools/mkit$ cat /proc/version 
Linux version 5.5.13-arch1-1 (linux@archlinux) (gcc version 9.3.0 (Arch Linux 9.3.0-1)) #1 SMP PREEMPT Wed, 25 Mar 2020 16:04:40 +0000

Have env vars specified for make run-aks ->

:~/tools/mkit$ env | grep AZURE
AZURE_TENANT_ID=<snip>
AZURE_SUBSCRIPTION_ID=<snip>
AZURE_CLIENT_SECRET=<snip>
AZURE_CLIENT_ID=<snip>

Running make run-aks with ->

:~/tools/mkit$ make run-aks resourcegroup=<snip> clustername=<snip>
Running in darkbitio/mkit:latest: /home/node/audit/aks.sh
Generating results...[2020-03-28T02:57:43+00:00] WARN: Overwriting resource azurerm_resource. To reference a specific version of azurerm_resource use the resource() method
[2020-03-28T02:57:43+00:00] WARN: Overwriting resource azurerm_aks_cluster. To reference a specific version of azurerm_aks_cluster use the resource() method
done.
Merged "<snip>" as current context in /home/node/.kube/config
<snip>
/home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/transport.rb:97:in ``': No such file or directory -  (Errno::ENOENT)
Traceback (most recent call last):
./inspec-results-parser.rb:92:in `<main>': undefined method `dig' for nil:NilClass (NoMethodError)

My auth-provider for my make run-k8s attempts ->

- name: clusterUser_<snip>-aks
  user:
    auth-provider:
      config:
        access-token: <snip>
        apiserver-id: <snip>
        client-id: <snip>
        environment: AzurePublicCloud
        expires-in: "3599"
        expires-on: "1585241404"
        refresh-token: AQABAAAAAAAm-06bl

@bgeesaman
Copy link
Contributor

@AnthonyHerman Thanks for all the additional details. It appears you are using the azure auth-provider for AAD integration, and the k8s-ruby gem that handles parsing the kubeconfig doesn't handle it correctly. https://github.com/k8s-ruby/k8s-ruby/blob/8b47745523ca7f106acf1ada500dda3d9e67a614/lib/k8s/transport.rb#L97. That function appears to parse fields specific to gcp and not to azure, unfortunately.

Two things to try (no guarantees):

  1. Can you use az aks get-credentials per (https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough#connect-to-the-cluster) to generate a kube config?
  2. Convert the existing section in your kube config from this:
- name: clusterUser_<snip>-aks
  user:
    auth-provider:
      config:
        access-token: <snip>
        apiserver-id: <snip>
        client-id: <snip>
        environment: AzurePublicCloud
        expires-in: "3599"
        expires-on: "1585241404"
        refresh-token: AQABAAAAAAAm-06bl

to this:

- name: clusterUser_<snip>-aks
  user:
    token: <token from auth-provider.config.access-token>

@mfuxi
Copy link

mfuxi commented Mar 29, 2020

I had managed to get results on AKS, and i'm also trying to run it on my laptop on top of Kind (https://kind.sigs.k8s.io/) cluster, and i'm getting the same error:
Generating results...^[[4~^[[6~E, ERROR -- : Connection refused - connect(2) for 127.0.0.1:32768 (Errno::ECONNREFUSED) Traceback (most recent call last): ./inspec-results-parser.rb:92:in <main>: undefined method dig for nil:NilClass (NoMethodError)

@bgeesaman
Copy link
Contributor

bgeesaman commented Mar 29, 2020

@mfuxi Looks like docker networking needs a tweak. Try editing your Makefile on line 32 from this:

COMMAND=docker run --rm -it -p8000:8000 -v `pwd`/support/input.yaml:$(WORKDIR)/input.yaml

to

COMMAND=docker run --rm -it --net=host -v `pwd`/support/input.yaml:$(WORKDIR)/input.yaml

@mfuxi
Copy link

mfuxi commented Mar 30, 2020

Worked!
Thanks!

@dustin-decker
Copy link

My permissions issue is that it all assumes UID 1000 but that is not my UID. Unfortunately adding

-u `id -u`

to the docker command does not work due to other permission issues.

@bgeesaman
Copy link
Contributor

@dustin-decker Try editing the GID/UID to match on https://github.com/darkbitio/mkit/blob/master/Dockerfile#L64 and 65 and running make build to build the container with that customization locally.

@bgeesaman
Copy link
Contributor

@chiefy Can you give a bit more detail on the relevant portions of your kubeconfig and the error(s) you're seeing?

@chiefy
Copy link

chiefy commented Apr 3, 2020

I have a huge kube config file w/ about 20 clusters, they all use the format:

- name: appbuild1
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - token
      - -i
      - appbuild1
      command: aws-iam-authenticator
      env:
      - name: AWS_PROFILE
        value: appbuild
🚽 make run-k8s
Running in darkbitio/mkit:latest: /home/node/audit/k8s.sh
Generating results...could not get token: NoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors
Traceback (most recent call last):
	21: from /home/node/.gem/ruby/2.6.0/bin/cinc-auditor:23:in `<main>'
	20: from /home/node/.gem/ruby/2.6.0/bin/cinc-auditor:23:in `load'
	19: from /home/node/.gem/ruby/2.6.0/gems/cinc-auditor-bin-4.18.51/bin/cinc-auditor:12:in `<top (required)>'
	18: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/base_cli.rb:35:in `start'
	17: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	16: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	15: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	14: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	13: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/cli.rb:284:in `exec'
	12: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/cli.rb:284:in `new'
	11: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/runner.rb:78:in `initialize'
	10: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/runner.rb:86:in `configure_transport'
	 9: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/backend.rb:53:in `create'
	 8: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/transport.rb:9:in `connection'
	 7: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/transport.rb:9:in `new'
	 6: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/connection.rb:13:in `initialize'
	 5: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/connection.rb:36:in `parse_kubeconfig'
	 4: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/client.rb:40:in `config'
	 3: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/transport.rb:81:in `config'
	 2: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/transport.rb:120:in `token_from_exec'
	 1: from /usr/local/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/usr/local/lib/ruby/2.6.0/json/common.rb:156:in `parse': 767: unexpected token at '' (JSON::ParserError)
Traceback (most recent call last):
./inspec-results-parser.rb:92:in `<main>': undefined method `dig' for nil:NilClass (NoMethodError)

@bgeesaman
Copy link
Contributor

@chiefy Do you have a path forward? Or is this issue still a sticking point for you?

@chiefy
Copy link

chiefy commented Apr 8, 2020

@bgeesaman yeah thanks, I figured it out, mostly due to proxy issues.

@jdyke
Copy link

jdyke commented Apr 21, 2020

I am seeing this error as well. I confirmed I can view the cluster and my permissions are good (via gcloud) but it looks like I am timing out?

Running in darkbitio/mkit:latest: /home/node/audit/gke.sh
Generating results...done.
Fetching cluster endpoint and auth data.
kubeconfig entry generated for kbe-nonprod.
Generating results...Traceback (most recent call last):
	41: from /home/node/.gem/ruby/2.6.0/bin/cinc-auditor:23:in `<main>'
	40: from /home/node/.gem/ruby/2.6.0/bin/cinc-auditor:23:in `load'
	39: from /home/node/.gem/ruby/2.6.0/gems/cinc-auditor-bin-4.18.51/bin/cinc-auditor:12:in `<top (required)>'
	38: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/base_cli.rb:35:in `start'
	37: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	36: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	35: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	34: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	33: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/cli.rb:284:in `exec'
	32: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/cli.rb:284:in `new'
	31: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/runner.rb:78:in `initialize'
	30: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/runner.rb:86:in `configure_transport'
	29: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/backend.rb:53:in `create'
	28: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/transport.rb:9:in `connection'
	27: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/transport.rb:9:in `new'
	26: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/connection.rb:14:in `initialize'
	25: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/connection.rb:20:in `connect'
	24: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/client.rb:156:in `apis'
	23: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/client.rb:148:in `api_groups'
	22: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/client.rb:133:in `api_groups!'
	21: from /usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
	20: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/client.rb:134:in `block in api_groups!'
	19: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/transport.rb:363:in `get'
	18: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/transport.rb:284:in `request'
	17: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/connection.rb:275:in `request'
	16: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/redirect_follower.rb:15:in `request_call'
	15: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/base.rb:22:in `request_call'
	14: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/base.rb:22:in `request_call'
	13: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/idempotent.rb:19:in `request_call'
	12: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/instrumentor.rb:34:in `request_call'
	11: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/mock.rb:57:in `request_call'
	10: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/connection.rb:116:in `request_call'
	 9: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/connection.rb:463:in `socket'
	 8: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/connection.rb:463:in `new'
	 7: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/ssl_socket.rb:10:in `initialize'
	 6: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/socket.rb:47:in `initialize'
	 5: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/ssl_socket.rb:165:in `connect'
	 4: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/socket.rb:121:in `connect'
	 3: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/socket.rb:121:in `each'
	 2: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/socket.rb:144:in `block in connect'
	 1: from /usr/local/lib/ruby/2.6.0/socket.rb:1213:in `connect_nonblock'
/usr/local/lib/ruby/2.6.0/socket.rb:1213:in `__connect_nonblock': Operation in progress - connect(2) would block (IO::EINPROGRESSWaitWritable)
	41: from /home/node/.gem/ruby/2.6.0/bin/cinc-auditor:23:in `<main>'
	40: from /home/node/.gem/ruby/2.6.0/bin/cinc-auditor:23:in `load'
	39: from /home/node/.gem/ruby/2.6.0/gems/cinc-auditor-bin-4.18.51/bin/cinc-auditor:12:in `<top (required)>'
	38: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/base_cli.rb:35:in `start'
	37: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	36: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	35: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	34: from /home/node/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	33: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/cli.rb:284:in `exec'
	32: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/cli.rb:284:in `new'
	31: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/runner.rb:78:in `initialize'
	30: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/runner.rb:86:in `configure_transport'
	29: from /home/node/.gem/ruby/2.6.0/gems/inspec-4.18.51/lib/inspec/backend.rb:53:in `create'
	28: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/transport.rb:9:in `connection'
	27: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/transport.rb:9:in `new'
	26: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/connection.rb:14:in `initialize'
	25: from /home/node/.gem/ruby/2.6.0/gems/train-kubernetes-0.1.5/lib/train-kubernetes/connection.rb:20:in `connect'
	24: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/client.rb:156:in `apis'
	23: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/client.rb:148:in `api_groups'
	22: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/client.rb:133:in `api_groups!'
	21: from /usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
	20: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/client.rb:134:in `block in api_groups!'
	19: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/transport.rb:363:in `get'
	18: from /home/node/.gem/ruby/2.6.0/gems/k8s-ruby-0.10.5/lib/k8s/transport.rb:284:in `request'
	17: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/connection.rb:275:in `request'
	16: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/redirect_follower.rb:15:in `request_call'
	15: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/base.rb:22:in `request_call'
	14: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/base.rb:22:in `request_call'
	13: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/idempotent.rb:19:in `request_call'
	12: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/instrumentor.rb:34:in `request_call'
	11: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/middlewares/mock.rb:57:in `request_call'
	10: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/connection.rb:116:in `request_call'
	 9: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/connection.rb:463:in `socket'
	 8: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/connection.rb:463:in `new'
	 7: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/ssl_socket.rb:10:in `initialize'
	 6: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/socket.rb:47:in `initialize'
	 5: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/ssl_socket.rb:165:in `connect'
	 4: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/socket.rb:121:in `connect'
	 3: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/socket.rb:121:in `each'
	 2: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/socket.rb:131:in `block in connect'
	 1: from /home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/socket.rb:150:in `rescue in block in connect'
/home/node/.gem/ruby/2.6.0/gems/excon-0.73.0/lib/excon/socket.rb:295:in `select_with_timeout': connect_write timeout reached (Excon::Error::Timeout)
Traceback (most recent call last):
./inspec-results-parser.rb:92:in `<main>': undefined method `dig' for nil:NilClass (NoMethodError)

@arunalakmal
Copy link

I'm getting this error too. I can see and have the relevant permissions with cluster. It's strange as it is unable to access 'https://github.com/inspec/inspec-aws.git/'

Here is my error log :

make run-eks awsregion=us-east-1 clustername=EKStest Running in darkbitio/mkit:latest: /home/node/audit/eks.sh Unable to find image 'darkbitio/mkit:latest' locally latest: Pulling from darkbitio/mkit c9b1b535fdd9: Pull complete 68ee169f7fe0: Pull complete c0dce75739cf: Pull complete 8c71c542757d: Pull complete 93d37870039a: Pull complete e40aae1cf846: Pull complete 9ce8352d40da: Pull complete a9f5391672a3: Pull complete b1ecfdea331f: Pull complete 90076071a1dc: Pull complete 99bfacd1acc6: Pull complete a9e8b9c3a09c: Pull complete 89670f4df3d8: Pull complete 2cca34f2219d: Pull complete 36850082951b: Pull complete 991c5d54131f: Pull complete 0a95cfdef27b: Pull complete 0615c30325f3: Pull complete Digest: sha256:f0ef61f727f6f25c90b5a82cb8e5be0ed36ee1f368710021a6acbba3d1f1a37d Status: Downloaded newer image for darkbitio/mkit:latest Generating results...Profile git dependency failed for https://github.com/inspec/inspec-aws.git - error running 'git ls-remote "https://github.com/inspec/inspec-aws.git" "v1.6.8*"': fatal: unable to access 'https://github.com/inspec/inspec-aws.git/': Could not resolve host: github.com Traceback (most recent call last): ./inspec-results-parser.rb:92:in

': undefined method dig' for nil:NilClass (NoMethodError)

@arunalakmal
Copy link

I was able to run this with a custom build, after changing the inspec-aws version to v1.7.0 in my local fork. Not sure what caused the issue with generic clone.

This is what I changed

- name: inspec-aws git: https://github.com/inspec/inspec-aws.git tag: v1.7.0

@stale
Copy link

stale bot commented May 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label May 29, 2020
@stale stale bot closed this as completed Jun 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

7 participants