cdk8s-team / cdk8s-cli

Apache License 2.0
38 stars 23 forks source link

Error: connect ECONNREFUSED 0.0.0.0:443 #38

Closed zzxwill closed 3 years ago

zzxwill commented 4 years ago

Description of the bug:

➜  /Users/zhouzhengxi/Downloads/cdk8s/hello cdk8s init python-app
Initializing a project from the python-app template
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (a65489)!
Installing dependencies from Pipfile.lock (a65489)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Installing cdk8s~=0.24.0…
Adding cdk8s to Pipfile's [packages]…
✔ Installation Succeeded
Pipfile.lock (a65489) out of date, updating to (5b361b)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Building requirements...
Resolving dependencies...
✔ Success!
Updated Pipfile.lock (5b361b)!
Installing dependencies from Pipfile.lock (5b361b)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
k8s
Error: connect ECONNREFUSED 0.0.0.0:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '0.0.0.0',
  port: 443
}
cdk8s init TYPE

Create a new cdk8s project from a template.

Positionals:
  TYPE  Project type                                                                                      [required] [choices: "python-app", "typescript-app"]

Options:
  --version        Show version number                                                                                                               [boolean]
  --help           Show help                                                                                                                         [boolean]
  --dist           Install dependencies from a "dist" directory (for development)                                                                     [string]
  --cdk8s-version  The cdk8s version to use when creating the new project                                                         [string] [default: "0.24.0"]

Error: Command failed: /usr/local/Cellar/cdk8s/0.24.0/libexec/lib/node_modules/cdk8s-cli/bin/cdk8s import k8s -l python
k8s
Error: connect ECONNREFUSED 0.0.0.0:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '0.0.0.0',
  port: 443
}

    at checkExecSyncError (child_process.js:630:11)
    at execSync (child_process.js:666:15)
    at Object.exports.post (/usr/local/Cellar/cdk8s/0.24.0/libexec/lib/node_modules/cdk8s-cli/templates/python-app/.hooks.sscaff.js:26:3)
    at executePostHook (/usr/local/Cellar/cdk8s/0.24.0/libexec/lib/node_modules/cdk8s-cli/node_modules/sscaff/lib/sscaff.js:61:37)
    at Object.sscaff (/usr/local/Cellar/cdk8s/0.24.0/libexec/lib/node_modules/cdk8s-cli/node_modules/sscaff/lib/sscaff.js:28:15)
    at async Object.handler (/usr/local/Cellar/cdk8s/0.24.0/libexec/lib/node_modules/cdk8s-cli/bin/cmds/init.js:29:9) {
  status: 1,
  signal: null,
  output: [
    null,
    <Buffer >,
    <Buffer 6b 38 73 0a 45 72 72 6f 72 3a 20 63 6f 6e 6e 65 63 74 20 45 43 4f 4e 4e 52 45 46 55 53 45 44 20 30 2e 30 2e 30 2e 30 3a 34 34 33 0a 20 20 20 20 61 74 ... 171 more bytes>
  ],
  pid: 33942,
  stdout: <Buffer >,
  stderr: <Buffer 6b 38 73 0a 45 72 72 6f 72 3a 20 63 6f 6e 6e 65 63 74 20 45 43 4f 4e 4e 52 45 46 55 53 45 44 20 30 2e 30 2e 30 2e 30 3a 34 34 33 0a 20 20 20 20 61 74 ... 171 more bytes>
}

Reproduction Steps:

Run the New Project creation.

Error Log:

Environment:

➜ /Users/zhouzhengxi/Downloads/cdk8s/hello python3 -V Python 3.8.0 ➜ /Users/zhouzhengxi/Downloads/cdk8s/hello cdk8s --version 0.24.0 ➜ /Users/zhouzhengxi/Downloads/cdk8s/hello node --version v12.16.2 ➜ /Users/zhouzhengxi/Downloads/cdk8s/hello pipenv --version pipenv, version 2020.5.28



### Other:
<!-- e.g. detailed explanation, stacktraces, related issues, suggestions on how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc -->

--- 

This is :bug: Bug Report
paguos commented 4 years ago

I have the same issue

eladb commented 4 years ago

@zzxwill does this persist (i.e. happens every time you run cdk8s init) or sporadically?

zzxwill commented 4 years ago

@zzxwill does this persist (i.e. happens every time you run cdk8s init) or sporadically?

Yes, it persists. It failed after I gave it another try.

zzxwill commented 4 years ago

Any update, thanks.

Today, I upgrade cdk8s version to 0.26 and Python version to 3.8.5. Nothing changes.

zzxwill commented 4 years ago

I have the same issue

Hi @paguos Have you find any solution? Thanks.

paguos commented 4 years ago

I have the same issue

Hi @paguos Have you find any solution? Thanks.

No, I was using an old Mac Book Air (2014) ... With more recent models I don't experience this issue.

The JS version worked fine though 😉

iliapolo commented 4 years ago

@zzxwill Does this also happen when you cdk8s init typescript-app?

zzxwill commented 4 years ago

@paguos Thanks for the confirmation. @iliapolo Yes.

cdk8s init typescript-app
Initializing a project from the typescript-app template
npm notice created a lockfile as package-lock.json. You should commit this file.
+ constructs@2.0.2
+ cdk8s@0.26.0
added 8 packages from 10 contributors and audited 8 packages in 4.72s
found 0 vulnerabilities

npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
+ @types/node@14.0.26
+ cdk8s-cli@0.26.0
+ jest@26.1.0
+ @types/jest@26.0.7
+ ts-jest@26.1.3
+ typescript@3.9.7
added 727 packages from 437 contributors and audited 736 packages in 481.395s

45 packages are looking for funding
  run `npm fund` for details

found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

> hello@1.0.0 import /Users/zhouzhengxi/Programming/golang/src/github.com/zzxwill/homework/k8s/cdk8s/hello
> cdk8s import

k8s
Error: connect ECONNREFUSED 0.0.0.0:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
  errno: -61,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '0.0.0.0',
  port: 443
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hello@1.0.0 import: `cdk8s import`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hello@1.0.0 import script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/zhouzhengxi/.npm/_logs/2020-07-27T08_19_37_227Z-debug.log
cdk8s init TYPE

Create a new cdk8s project from a template.

Positionals:
  TYPE  Project type                                                                                                                        [required] [choices: "java-app", "python-app", "typescript-app"]

Options:
  --version        Show version number                                                                                                                                                             [boolean]
  --help           Show help                                                                                                                                                                       [boolean]
  --dist           Install dependencies from a "dist" directory (for development)                                                                                                                   [string]
  --cdk8s-version  The cdk8s version to use when creating the new project                                                                                                       [string] [default: "0.26.0"]

Error: Command failed: npm run import
    at checkExecSyncError (child_process.js:616:11)
    at execSync (child_process.js:652:15)
    at Object.exports.post (/usr/local/Cellar/node/14.5.0/lib/node_modules/cdk8s-cli/templates/typescript-app/.hooks.sscaff.js:24:3)
    at executePostHook (/usr/local/Cellar/node/14.5.0/lib/node_modules/cdk8s-cli/node_modules/sscaff/lib/sscaff.js:61:37)
    at Object.sscaff (/usr/local/Cellar/node/14.5.0/lib/node_modules/cdk8s-cli/node_modules/sscaff/lib/sscaff.js:28:15)
    at async Object.handler (/usr/local/Cellar/node/14.5.0/lib/node_modules/cdk8s-cli/bin/cmds/init.js:30:9) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 8493,
  stdout: null,
  stderr: null
}
iliapolo commented 4 years ago

@zzxwill Thanks, i'm looking into it.

liangyuanpeng commented 3 years ago

Same problem :( , any update?

HenryC-3 commented 3 years ago

@liangyuanpeng I found Error: connect ECONNREFUSED 0.0.0.0:443 when I was using vscode pulling something from github. I solved this problem by adding some proxy settings in the vscode, which is "http.proxy": "http://HOST:PORT".

those problem above may related to network problem too.

hope my case can provide some useful information

github-actions[bot] commented 3 years ago

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.

github-actions[bot] commented 3 years ago

Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen.

github-actions[bot] commented 3 years ago

Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen.