Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on Openshift #469

Closed
amalic opened this issue Apr 9, 2019 · 12 comments
Closed

Does not work on Openshift #469

amalic opened this issue Apr 9, 2019 · 12 comments
Labels
bug Something isn't working

Comments

@amalic
Copy link

amalic commented Apr 9, 2019

Here's the log


INFO  code-server development
--
  | INFO  Additional documentation: https://github.com/codercom/code-server
  | INFO  Initializing {"data-dir":"/root/.local/share/code-server","extensions-dir":"/root/.local/share/code-server/extensions","working-dir":"/root/project","log-dir":"/root/.cache/code-server/logs/20190409084844096"}
  | INFO  Starting shared process [1/5]...
  | INFO  Starting webserver... {"host":"0.0.0.0","port":8443}
  | WARN  No certificate specified. This could be insecure.
  | WARN  Documentation on securing your setup: https://github.com/codercom/code-server/blob/master/doc/security/ssl.md
  | INFO
  | INFO  Password: 81f48f2a6e2b68ad4b1b5767
  | INFO
  | INFO  Started (click the link below to open):
  | INFO  http://localhost:8443/
  | INFO
  | INFO  Connected to shared process
  | WARN  Uncaught Exception:  Error: Unexpected end of JSON input
  |  
  | SyntaxError: Unexpected end of JSON input
  | at JSON.parse (<anonymous>)
  | at pfs_1.readFile.then.contents (/src/packages/server/build/bootstrap-fork.js.gz:95779:45)
  | at <anonymous>
  | at Timeout.setTimeout [as _onTimeout] (/src/packages/server/build/bootstrap-fork.js.gz:71026:31)
  | at ontimeout (timers.js:498:11)
  | at tryOnTimeout (timers.js:323:5)
  | at Timer.listOnTimeout (timers.js:290:5)


@amalic amalic added the bug Something isn't working label Apr 9, 2019
@boardfish
Copy link

boardfish commented Apr 9, 2019

Getting this too when running in Docker on Ubuntu 18.04:

$ docker run -t -p 127.0.0.1:5000:8443 -v "${PWD}:/root/project" codercom/code-server:1.621 code-serve
r --allow-http --no-auth
Unable to find image 'codercom/code-server:1.621' locally
1.621: Pulling from codercom/code-server
898c46f3b1a1: Pull complete
63366dfa0a50: Pull complete
041d4cd74a92: Pull complete
6e1bee0f8701: Pull complete
bded34074f32: Pull complete
156845bb53a2: Pull complete
3f6111b92a78: Pull complete
605216ff0bff: Pull complete
0f0611023061: Pull complete
50412cf69c67: Pull complete
Digest: sha256:a591ca010a45af44f6f0a3807698e4c4e82e97e457e2949795ae006bdad02126
Status: Downloaded newer image for codercom/code-server:1.621
INFO  code-server development
INFO  Additional documentation: https://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/home/coder/.local/share/code-server","extensions-dir":"/home/coder/.local/share/code-server/extensions","working-dir":"/home/coder/project/code-server","log-dir":"/home/coder/.cache/code-server/logs/20190409121823231"}
INFO  Starting shared process [1/5]...
INFO  Starting webserver... {"host":"0.0.0.0","port":8443}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://github.com/codercom/code-server/blob/master/doc/security/ssl.md
WARN  Launched without authentication.
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO
INFO  Connected to shared process
WARN  Uncaught Exception:  Error: Unexpected end of JSON input

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at pfs_1.readFile.then.contents (/src/packages/server/build/bootstrap-fork.js.gz:91619:45)
    at <anonymous>
    at Timeout.setTimeout [as _onTimeout] (/src/packages/server/build/bootstrap-fork.js.gz:66934:31)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)

This works fine on macOS Mojave, though:

docker run -it -p 127.0.0.1:5000:8443 -v "${PWD}:/home/coder/project" codercom/code-server:1.621 --allow-http --no-auth

@sr229
Copy link
Contributor

sr229 commented Apr 9, 2019

Please be noted I made a OpenShift-compatible image. You can check it out here @amalic

@smalike
Copy link

smalike commented Apr 10, 2019

docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/code-server:1.621 --allow-http --no-auth

Getting this too when running in Docker on CentOS:

INFO  code-server development
INFO  Additional documentation: https://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/home/coder/.local/share/code-server","extensions-dir":"/home/coder/.local/share/code-server/extensions","working-dir":"/home/coder/project","log-dir":"/home/coder/.cache/code-server/logs/20190410001328997"}
INFO  Starting shared process [1/5]...
INFO  Starting webserver... {"host":"0.0.0.0","port":8443}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://github.com/codercom/code-server/blob/master/doc/security/ssl.md
WARN  Launched without authentication.
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO
INFO  Connected to shared process
WARN  Uncaught Exception:  Error: Unexpected end of JSON input

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at pfs_1.readFile.then.contents (/src/packages/server/build/bootstrap-fork.js.gz:91619:45)
    at <anonymous>
    at Timeout.setTimeout [as _onTimeout] (/src/packages/server/build/bootstrap-fork.js.gz:66934:31)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)

@sr229
Copy link
Contributor

sr229 commented Apr 10, 2019

@smalike I don't think that should be of your concern - that's minor and its unrelated to this issue.

@MichaelDesantis
Copy link
Contributor

We have another issue for this specific error. And @code-asher already has a PR for this.

Relevant thread is here #453

@sr229
Copy link
Contributor

sr229 commented Apr 12, 2019

See #223 as well for a progress check for OpenShift compatibility

@sr229
Copy link
Contributor

sr229 commented May 24, 2019

Recommending closure. We can't really do this upstream but feel free to use my images if you want to use Coder in OpenShift.

@amalic
Copy link
Author

amalic commented May 27, 2019

Please be noted I made a OpenShift-compatible image. You can check it out here @amalic

works out of the box! well done. would make sense if this could make it into the main project ;)

I couldn't save anything. I guess i need to mount some storage into the pod.

@sr229
Copy link
Contributor

sr229 commented May 28, 2019

@amalic yes you need to mount a PVC first since the image is only making emptydirs for the volume mounts.

@amalic
Copy link
Author

amalic commented Jun 24, 2019

@sr229 still working on PVC's. I already got PV's working. Think will be able to let you know soon.

@amalic
Copy link
Author

amalic commented Aug 21, 2019

@sr229 Fixed the issue with saving files. It was actually a MTU issue on the router node that prevented uploads larter than 284 Byte.

Container works totally fine. Thanks

@sr229
Copy link
Contributor

sr229 commented Oct 30, 2019

Alrighty! Closing since I think we fixrd this a long time ago

@sr229 sr229 closed this as completed Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants