arush-sal / cka-practice-environment

A sample lab test environment to help in preparation of CKA certification.
MIT License
861 stars 472 forks source link

gateone container exited upon creation `SyntaxError: invalid syntax` #8

Closed nodeselector closed 5 years ago

nodeselector commented 5 years ago

Reprod this on Windows and Ubuntu:

jemartin@ubuntu-ws:~/tmp/cka-practice-environment$ docker-compose up -d
Creating network "cka-practice-environment_frontend" with the default driver
Creating volume "cka-practice-environment_ssh_key" with default driver
Pulling gateone (arush/gateone:http)...
http: Pulling from arush/gateone
d3938036b19c: Pull complete
a9b30c108bda: Pull complete
67de21feec18: Pull complete
817da545be2b: Pull complete
d967c497ce23: Pull complete
3aa3377ea114: Pull complete
1ad592e6026c: Pull complete
c340f76fffe4: Pull complete
103ed747abbe: Pull complete
4313ab0f9d2f: Pull complete
a2750501d449: Pull complete
9f43e7c05a26: Pull complete
d42de587a1b6: Pull complete
Pulling lab (arush/cka_lab:)...
latest: Pulling from arush/cka_lab
ff3a5c916c92: Pull complete
b430473be128: Pull complete
7d4e05a01906: Pull complete
8aeac9a3205f: Pull complete
449a71c3265d: Pull complete
Creating cka-practice-environment_gateone_1 ... done
Creating cka-practice-environment_lab_1     ... done
emartin@ubuntu-ws:~/tmp/cka-practice-environment$ docker ps -a
CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS                     PORTS                NAMES
ffb9eac43067        arush/cka_lab        "nginx -g 'daemon of…"   20 seconds ago      Up 15 seconds              0.0.0.0:80->80/tcp   cka-practice-environment_lab_1
4a414891e5fe        arush/gateone:http   "/usr/local/bin/upda…"   20 seconds ago      Exited (1) 5 seconds ago                        cka-practice-environment_gateone_1
jemartin@ubuntu-ws:~/tmp/cka-practice-environment$ docker logs 4a4
Traceback (most recent call last):
  File "/usr/local/bin/gateone", line 9, in <module>
    load_entry_point('gateone==1.2.0', 'console_scripts', 'gateone')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python2.7/dist-packages/gateone-1.2.0-py2.7.egg/gateone/core/server.py", line 361, in <module>
    import tornado.httpserver
  File "/usr/local/lib/python2.7/dist-packages/tornado/httpserver.py", line 144
    def __init__(self, *args: Any, **kwargs: Any) -> None:
                            ^
SyntaxError: invalid syntax
manojbadam commented 5 years ago

@jeffmartinxyz running into same issue, did you find any fix ?

Jeskz0rd commented 5 years ago

Same issue here!

ryysud commented 5 years ago

I faced the same issue.

It looks like a problem with GateOne, so it works by changing docker image to kmlucy/docker-gateone as follows:

$ git diff docker-compose.yml
diff --git a/docker-compose.yml b/docker-compose.yml
index cc7ddff..f6056d5 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,7 +1,7 @@
 version: '3.6'
 services:
   gateone:
-    image: arush/gateone:http
+    image: kmlucy/docker-gateone
     ports:
     - "8080:8000"
     hostname: kubectl

cf. https://github.com/liftoff/GateOne/issues/703#issuecomment-405022654

arush-sal commented 5 years ago

I have updated the docker image and this should be fixed now. Kindly check and confirm.

arush-sal commented 5 years ago

@jeffmartinxyz @manojbadam @Jeskz0rd @ryysud Please confirm or I'll close this ticket in next 2-3 days.

nodeselector commented 5 years ago

@arush-sal sorry for the delay. i tested the fix and it works. having another issue though i do not think it is related: image

manojbadam commented 5 years ago

@arush-sal its working fine now. Thanks 👍

ryysud commented 5 years ago

@arush-sal I confirmed that it works, Thanks!

arush-sal commented 5 years ago

@arush-sal sorry for the delay. i tested the fix and it works. having another issue though i do not think it is related: image

@jeffmartinxyz are you using the docker-compose-builder file or the docker-compose file?

Jeskz0rd commented 5 years ago

Sorry for the late response @arush-sal. Apparently, it is all working ok now! Any news I get in touch again!

Cheers!