Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

[Che] Codewind not downloading Cwctl or Appsody binaries after startup #3213

Closed
johnmcollier opened this issue Jul 23, 2020 · 11 comments
Closed
Labels
area/vscode-ide Issue associated with the Codewind VS Code/Theia extension kind/bug priority/stopship

Comments

@johnmcollier
Copy link
Contributor

Codewind version: latest

Che version: 7.16.1
IDE extension version: latest
Kubernetes cluster: OCP 4.5

Description:
Codewind fails to setup the cwctl and appsody binaries after a Codewind workspace starts in Che. The Theia logs have the following error:

 17:52:25.858 ]: Auto-expanding the Codewind view 
2020-07-23 17:52:25.859 root INFO [hosted-plugin: 41] [DBUG: 17:52:25.859 ]: Created /home/theia/.codewind/latest 
2020-07-23 17:52:26.194 root INFO [hosted-plugin: 41] [DBUG: 17:52:26.194 ]: Finished determining if binaries are installed, took 338ms 
2020-07-23 17:52:26.194 root INFO [hosted-plugin: 41] [INFO: 17:52:26.194 ]: Downloading cwctl 
2020-07-23 17:52:26.195 root INFO [hosted-plugin: 41] [INFO: 17:52:26.195 ]: Downloading https://download.eclipse.org/codewind/codewind-installer/master/latest/zips/cwctl-linux.tar.gz to /home/theia/.codewind/latest/cwctl-linux.tar.gz 
2020-07-23 17:52:26.200 root INFO [hosted-plugin: 41] [INFO: 17:52:26.200 ]: Downloading Appsody 
2020-07-23 17:52:26.200 root INFO [hosted-plugin: 41] [INFO: 17:52:26.200 ]: Downloading https://github.com/appsody/appsody/releases/download/0.6.4/appsody-0.6.4-linux-amd64.tar.gz to /home/theia/.codewind/latest/appsody-0.6.4-linux-amd64.tar.gz 
2020-07-23 17:52:26.211 root ERROR [hosted-plugin: 41] [ERRO: 17:52:26.210 ]: Unhandled promise rejection: { GotError: connect ECONNREFUSED 127.0.0.1:443
    at onError (/tmp/vscode-unpacked/eclipse.codewind-theia.latest.xsnrvtgick.codewind-che.vsix/extension/node_modules/got/dist/source/request-as-event-emitter.js:140:29)
    at h (/tmp/vscode-unpacked/eclipse.codewind-theia.latest.xsnrvtgick.codewind-che.vsix/extension/node_modules/got/dist/source/request-as-event-emitter.js:173:17)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14) name: 'RequestError', code: 'ECONNREFUSED' } 
2020-07-23 17:52:26.211 root ERROR [hosted-plugin: 41] [ERRO: 17:52:26.211 ]: Unhandled promise rejection: { GotError: connect ECONNREFUSED 127.0.0.1:443
    at onError (/tmp/vscode-unpacked/eclipse.codewind-theia.latest.xsnrvtgick.codewind-che.vsix/extension/node_modules/got/dist/source/request-as-event-emitter.js:140:29)
    at h (/tmp/vscode-unpacked/eclipse.codewind-theia.latest.xsnrvtgick.codewind-che.vsix/extension/node_modules/got/dist/source/request-as-event-emitter.js:173:17)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14) name: 'RequestError', code: 'ECONNREFUSED' } 
2020-07-23 17:52:26.334 root ERROR [hosted-plugin: 41] [ERRO: 17:52:26.334 ]: Failed to initialize cwctl: { GotError: connect ECONNREFUSED 127.0.0.1:443
    at onError (/tmp/vscode-unpacked/eclipse.codewind-theia.latest.xsnrvtgick.codewind-che.vsix/extension/node_modules/got/dist/source/request-as-event-emitter.js:140:29)
    at h (/tmp/vscode-unpacked/eclipse.codewind-theia.latest.xsnrvtgick.codewind-che.vsix/extension/node_modules/got/dist/source/request-as-event-emitter.js:173:17)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14) name: 'RequestError', code: 'ECONNREFUSED' } 
2020-07-23 17:52:26.335 root ERROR [hosted-plugin: 41] [ERRO: 17:52:26.335 ]: Failed to initialize appsody: { GotError: connect ECONNREFUSED 127.0.0.1:443
    at onError (/tmp/vscode-unpacked/eclipse.codewind-theia.latest.xsnrvtgick.codewind-che.vsix/extension/node_modules/got/dist/source/request-as-event-emitter.js:140:29)
    at h (/tmp/vscode-unpacked/eclipse.codewind-theia.latest.xsnrvtgick.codewind-che.vsix/extension/node_modules/got/dist/source/request-as-event-emitter.js:173:17)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14) name: 'RequestError', code: 'ECONNREFUSED' } 
2020-07-23 17:52:26.336 root ERROR [hosted-plugin: 41] [ERRO: 17:52:26.335 ]: At least one binary failed to download; see above 
2020-07-23 17:52:26.336 root INFO [hosted-plugin: 41] [INFO: 17:52:26.336 ]: Finished initializing the CLI binaries, took 480ms 
2020-07-23 17:52:26.337 root INFO [hosted-plugin: 41] [DBUG: 17:52:26.336 ]: Local Codewind state changing from Setting up to Stopped 
2020-07-23 17:52:26.338 root INFO [hosted-plugin: 41] [INFO: 17:52:26.337 ]: Running CLI command: cwctl --json --insecure connections list 
2020-07-23 17:52:26.346 root ERROR [hosted-plugin: 41] [ERRO: 17:52:26.345 ]: Unhandled promise rejection: { Error: spawn /home/theia/.codewind/latest/cwctl ENOENT

If I open a terminal in Theia and run wget https://download.eclipse.org/codewind/codewind-installer/master/latest/zips/cwctl-linux.tar.gz, it downloads fine.

Steps to reproduce:

  1. Create a Codewind workspace on Che 7.16.1
  2. Codewind fails to start with the error message I posted above
@johnmcollier johnmcollier added area/vscode-ide Issue associated with the Codewind VS Code/Theia extension kind/bug priority/stopship labels Jul 23, 2020
@tetchel
Copy link

tetchel commented Jul 23, 2020

does it work on 7.15.x ? this hasn't changed since CW 0.14.0 (or 0.13 either)

@tetchel
Copy link

tetchel commented Jul 23, 2020

Connection refused to localhost:443 is really bizarre. I don't know why it's trying to connect to localhost at all at that point, unless it is some quirk of the container networking.

@johnmcollier
Copy link
Contributor Author

Chectl is blocking install of old Che versions 😢

@tetchel
Copy link

tetchel commented Jul 23, 2020

Can you post the full theia container log?

@johnmcollier
Copy link
Contributor Author

@johnmcollier
Copy link
Contributor Author

Codewind extension logs:
codewind-extension-logs.txt

@jgwest
Copy link
Contributor

jgwest commented Jul 23, 2020

I am able to reproduce this on generic Kubernetes (k3s), so not likely an OpenShift-specific configuration/networking issue.

Same message as above:

/home/theia/.codewind/latest was created
Downloading cwctl from https://download.eclipse.org/codewind/codewind-installer/master/latest/zips/cwctl-linux.tar.gz...
Downloading appsody 0.6.4 from https://github.com/appsody/appsody/releases/download/0.6.4/appsody-0.6.4-linux-amd64.tar.gz...
***** Error initalizing cwctl: connect ECONNREFUSED 127.0.0.1:443
Restart the extension to try again.
If the error persists, download the cwctl binary from https://download.eclipse.org/codewind/codewind-installer/master/latest/zips/cwctl-linux.tar.gz and place it in /home/theia/.codewind/latest/cwctl.
***** Error initalizing appsody: connect ECONNREFUSED 127.0.0.1:443
Restart the extension to try again.
If the error persists, download the appsody binary from https://github.com/appsody/appsody/releases/download/0.6.4/appsody-0.6.4-linux-amd64.tar.gz and place it in /home/theia/.codewind/latest/appsody.
==> Run cwctl --json --insecure connections list  |  19:45:13.936
==> End cwctl --json --insecure connections list  |  19:45:13.944 (Took 8ms)

Also I exec-ed into the theia container and was able to wget one of the above URLs, implying the container networking is fine.

@johnmcollier
Copy link
Contributor Author

sindresorhus/got#951 and TooTallNate/node-agent-base#35 provides some insight on what's happening here.

It looks like a change in node-agent-base is causing the issue here

@tetchel
Copy link

tetchel commented Jul 28, 2020

@tetchel
Copy link

tetchel commented Jul 28, 2020

Worked around by locking theia version to 1.2 eclipse-archived/codewind-che-plugin#190

@johnmcollier
Copy link
Contributor Author

Closing this out, fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/vscode-ide Issue associated with the Codewind VS Code/Theia extension kind/bug priority/stopship
Projects
None yet
Development

No branches or pull requests

3 participants