ryansb / ofCourse

Python courseware leveraging Flask and OpenShift
Apache License 2.0
12 stars 14 forks source link

error deploying to openshift #70

Open deejoe opened 8 years ago

deejoe commented 8 years ago
(hfoss-F15)deejoe@salix240:~/foss-courses/hfoss-F15/hfoss-S16$ ofcourse openshift --app hfoss --domain ritjoe
/home/deejoe/foss-courses/hfoss-F15/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:768: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
Openshift username: openshift2015@etrumeus.com
Openshift password: 
Traceback (most recent call last):
  File "/home/deejoe/foss-courses/hfoss-F15/bin/ofcourse", line 10, in 
    sys.exit(cli())
  File "/home/deejoe/foss-courses/hfoss-F15/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/home/deejoe/foss-courses/hfoss-F15/local/lib/python2.7/site-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/home/deejoe/foss-courses/hfoss-F15/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/deejoe/foss-courses/hfoss-F15/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/deejoe/foss-courses/hfoss-F15/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/home/deejoe/foss-courses/hfoss-F15/local/lib/python2.7/site-packages/ofcourse/cli/__init__.py", line 176, in openshift
    token = generate_token(user, password)
  File "/home/deejoe/foss-courses/hfoss-F15/local/lib/python2.7/site-packages/ofcourse/cli/openshift_utils.py", line 147, in generate_token
    session.text))
Exception: Uhoh 406 response

That is with an older version of ofcourse, but I see similar results with a fresh virtualenv and new ofcourse 0.2.1 install with a new course.

I've confirmed I'm using the right openshift credentials, which I can use successfully to log in at their web console.

deejoe commented 8 years ago

As requested, with the latest ofcourse:

(ofcourse_environment)joe@artemisia:~/ofcourse-20160329dja1$ ofcourse openshift --app testocourse --domain ritjoe
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/bin/ofcourse", line 11, in ))
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 696, in main
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 1060, in invokeb_ctx))
 SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
Openshift username: openshift2015@etrumeus.com
Openshift password: 
/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Traceback (most recent call last):
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/bin/ofcourse", line 11, in 
    sys.exit(cli())
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/ofcourse/cli/__init__.py", line 176, in openshift
    token = generate_token(user, password)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/ofcourse/cli/openshift_utils.py", line 147, in generate_token
    session.text))
Exception: Uhoh 406 response= 
ghost commented 8 years ago

It's still cranky about it:

$ ofcourse openshift --app testocourse --domain ritjoe
/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
Openshift username: openshift2015@etrumeus.com
Openshift password: 
/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
Traceback (most recent call last):
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/bin/ofcourse", line 10, in 
    sys.exit(cli())
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/ofcourse/cli/__init__.py", line 183, in openshift
    api = get_api(token)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/ofcourse/cli/openshift_utils.py", line 136, in get_api
    return oshift.Openshift("openshift.redhat.com", token=token)
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/oshift/__init__.py", line 226, in __init__
    api_version, api_version_list = self.api_version()
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/oshift/__init__.py", line 475, in api_version
    status, res = self.api()
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/oshift/__init__.py", line 470, in api
    (status, raw_response) = self.rest.request(method='GET', url='/api')
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/oshift/__init__.py", line 199, in request
    self.data = self.response.json()
  File "/home/joe/ofcourse-20160329dja1/ofcourse_environment/local/lib/python2.7/site-packages/requests/models.py", line 808, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
(ofcourse_environment)joe@artemisia:~/ofcourse-20160329dja1/testocourse-content