OpenShift Java Client
  1. OpenShift Java Client
  2. OSJC-88

Cannot log into user account, invalid json being reported

    Details

    • Type: Bug Bug
    • Status: Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.0.1
    • Component/s: None
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      in a mail from Nam Duong on the 27th of March:

      Hi,

      I am getting the following errors when trying to login to my openshift account in Eclipse, talked to Nam Duong and it was suggested to email you the error I got.

      Could not check user credentials: Could not unmarshall response 
      { "api" : "1.1.3",
        "api_c" : [ "placeholder" ],
        "broker_c" : [ "namespace",
            "rhlogin",
            "ssh",
            "app_uuid",
            "debug",
            "alter",
            "cartridge",
            "cart_type",
            "action",
            "app_name",
            "api"
          ],
        "data" : { "app_info" : { "test1" : { "aliases" : null,
                    "creation_time" : "2012-03-26T11:11:29-04:00",
                    "embedded" : { "mysql-5.1" : { "info" : "Connection URL: mysql://127.12.203.1:3306/\n" },
                        "phpmyadmin-3.4" : { "info" : "URL: https://test1-cpc.rhcloud.com/phpmyadmin/\n" }
                      },
                    "framework" : "php-5.3",
                    "uuid" : "f86f404f81d94838a05816fd7fbabf30"
                  } },
            "user_info" : { "consumed_gears" : 1,
                "env_vars" : null,
                "max_gears" : 5,
                "namespace" : "cpc",
                "rhc_domain" : "rhcloud.com",
                "rhlogin" : "USER@COMPANY",
                "ssh_key" : null,
                "ssh_keys" : { "uk" : { "key" : "KEYVALUE",
                        "type" : "ssh-rsa"
                      } },
                "ssh_type" : null,
                "system_ssh_keys" : null,
                "uuid" : "eb6b8d6d25ab4961926215908a3fd474",
                "vip" : false
              }
          },
        "debug" : "",
        "exit_code" : 0,
        "messages" : "",
        "result" : ""
      }.
      

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Andre Dietisheim added a comment -

            The current client with the patch from JBIDE-11418 is able to unmarshall but it extracts an empty key. With the patch in place, I'd bet that at least logging in would work.

            Show
            Andre Dietisheim added a comment - The current client with the patch from JBIDE-11418 is able to unmarshall but it extracts an empty key. With the patch in place, I'd bet that at least logging in would work.
            Hide
            Andre Dietisheim added a comment - - edited

            In this response there's no key reported in the response properties that were used before:

            "ssh_type": null,
            "ssh_key":null
            

            Interesting enough, in this response null is used whereas in JBIDE-11418 "" was reported:

            "ssh_key":""
            

            In this response, the key is reported in

            "ssh_keys": {
               "uk": {
                  "type":"ssh rsa",
                  "key":"KEYVALUE"
               }
            

            Show
            Andre Dietisheim added a comment - - edited In this response there's no key reported in the response properties that were used before: "ssh_type": null, "ssh_key":null Interesting enough, in this response null is used whereas in JBIDE-11418 "" was reported: "ssh_key":"" In this response, the key is reported in "ssh_keys": { "uk": { "type":"ssh rsa", "key":"KEYVALUE" }
            Hide
            Andre Dietisheim added a comment - - edited

            back in issue JBIDE-11354 that we could not reproduce, there was a very similar reponse that could not be unmarshalled:

            	"data":{
            		"user_info":{
            			"rhlogin":"spousty+mongo@redhat.com",
            			"uuid":"8e863f72f2f743b58003257077d700dd",
            			"rhc_domain":"rhcloud.com",
            			"vip":false,
            			"ssh_type":"",
            			"max_gears":5,
            			"ssh_keys":{},
            			"ssh_key":"",
            			"consumed_gears":0,
            			"namespace":"spousty0mongo"
            		},
            		"app_info":{
            		}
            	}
            
            

            ssh_type and ssh_key are both "":

            "ssh_type":"",
            "ssh_key":""
            

            I suspect inconsistency in the service since we're not seeing these messages. Pretty much these same applies IMHO to JBIDE-11418 where the usual workflow is that the PaaS usually responds with a 404 and sometimes obviously with a 200 so that we unmarshall the response and get into the very same unmarshalling error.

            Show
            Andre Dietisheim added a comment - - edited back in issue JBIDE-11354 that we could not reproduce, there was a very similar reponse that could not be unmarshalled: "data":{ "user_info":{ "rhlogin":"spousty+mongo@redhat.com", "uuid":"8e863f72f2f743b58003257077d700dd", "rhc_domain":"rhcloud.com", "vip":false, "ssh_type":"", "max_gears":5, "ssh_keys":{}, "ssh_key":"", "consumed_gears":0, "namespace":"spousty0mongo" }, "app_info":{ } } ssh_type and ssh_key are both "" : "ssh_type":"", "ssh_key":"" I suspect inconsistency in the service since we're not seeing these messages. Pretty much these same applies IMHO to JBIDE-11418 where the usual workflow is that the PaaS usually responds with a 404 and sometimes obviously with a 200 so that we unmarshall the response and get into the very same unmarshalling error.
            Hide
            Andre Dietisheim added a comment -

            I cannot reproduce this since there are no known steps to reproduce this.
            I fixed the unmarshalling error I found, that's the best I can do for now.

            Show
            Andre Dietisheim added a comment - I cannot reproduce this since there are no known steps to reproduce this. I fixed the unmarshalling error I found, that's the best I can do for now.
            Hide
            Andre Dietisheim added a comment -

            Talking to OpenShift server team we were suspecting some bugs when trying to kill a domain when you still have an app to cause this. When trying to reproduce I was not able. The response from the server had ssh-keys reported in both properties (ssh_key and ssh_keys):

              "data" : { "app_info" : {  },
                  "user_info" : { "consumed_gears" : 0,
                      "max_gears" : 5,
                      "namespace" : "mydom",
                      "rhc_domain" : "rhcloud.com",
                      "rhlogin" : "SOMEUSER",
                      "ssh_key" : "AAAAB3NzaC1yc2EAAAADAQABAAABAQCAiWmP7Jq5ZQLR3OXfRi2zEfbdbsZWtVxboqnqiXbsy9Z3+xynl/cu5kg2JnKebxS3vWiPRtmrF8NS8g/b2V1I4dIXw3v+yIMt2KfM00UTd3UwK+XBbJrRHN2IXM+F7LUYGWxJ6tOzith7tAn9kfdjs3FS3g8JTySN+eNrYvmSGA8N1N9Mww7rkDf+PpLXgE65Kh5PFElKIW7U4jMME6jCPDsgJKuJeNSKi+VhmVbOycOhTdX/sRbaidiYsXcZM1ZRQu9ImlpsLND8U82upCzgfRTJW1nHyhmCr3xvb0UUI+AfZXw08mThwBivO5y2R1GfuF7xmR5ms1KkMYxVGiGL",
                      "ssh_keys" : { "default" : { "key" : "AAAAB3NzaC1yc2EAAAADAQABAAABAQCAiWmP7Jq5ZQLR3OXfRi2zEfbdbsZWtVxboqnqiXbsy9Z3+xynl/cu5kg2JnKebxS3vWiPRtmrF8NS8g/b2V1I4dIXw3v+yIMt2KfM00UTd3UwK+XBbJrRHN2IXM+F7LUYGWxJ6tOzith7tAn9kfdjs3FS3g8JTySN+eNrYvmSGA8N1N9Mww7rkDf+PpLXgE65Kh5PFElKIW7U4jMME6jCPDsgJKuJeNSKi+VhmVbOycOhTdX/sRbaidiYsXcZM1ZRQu9ImlpsLND8U82upCzgfRTJW1nHyhmCr3xvb0UUI+AfZXw08mThwBivO5y2R1GfuF7xmR5ms1KkMYxVGiGL",
                              "type" : "ssh-rsa"
                            } },
                      "ssh_type" : "ssh-rsa",
                      "uuid" : "5eaa53a134874f2b82b9633877032893",
                      "vip" : false
                    }
                },
              "debug" : "",
              "exit_code" : 0,
              "messages" : "",
              "result" : ""
            }
            

            So we still dont know when this can occur.

            Show
            Andre Dietisheim added a comment - Talking to OpenShift server team we were suspecting some bugs when trying to kill a domain when you still have an app to cause this. When trying to reproduce I was not able. The response from the server had ssh-keys reported in both properties ( ssh_key and ssh_keys ): "data" : { "app_info" : { }, "user_info" : { "consumed_gears" : 0, "max_gears" : 5, "namespace" : "mydom", "rhc_domain" : "rhcloud.com", "rhlogin" : "SOMEUSER", "ssh_key" : "AAAAB3NzaC1yc2EAAAADAQABAAABAQCAiWmP7Jq5ZQLR3OXfRi2zEfbdbsZWtVxboqnqiXbsy9Z3+xynl/cu5kg2JnKebxS3vWiPRtmrF8NS8g/b2V1I4dIXw3v+yIMt2KfM00UTd3UwK+XBbJrRHN2IXM+F7LUYGWxJ6tOzith7tAn9kfdjs3FS3g8JTySN+eNrYvmSGA8N1N9Mww7rkDf+PpLXgE65Kh5PFElKIW7U4jMME6jCPDsgJKuJeNSKi+VhmVbOycOhTdX/sRbaidiYsXcZM1ZRQu9ImlpsLND8U82upCzgfRTJW1nHyhmCr3xvb0UUI+AfZXw08mThwBivO5y2R1GfuF7xmR5ms1KkMYxVGiGL", "ssh_keys" : { "default" : { "key" : "AAAAB3NzaC1yc2EAAAADAQABAAABAQCAiWmP7Jq5ZQLR3OXfRi2zEfbdbsZWtVxboqnqiXbsy9Z3+xynl/cu5kg2JnKebxS3vWiPRtmrF8NS8g/b2V1I4dIXw3v+yIMt2KfM00UTd3UwK+XBbJrRHN2IXM+F7LUYGWxJ6tOzith7tAn9kfdjs3FS3g8JTySN+eNrYvmSGA8N1N9Mww7rkDf+PpLXgE65Kh5PFElKIW7U4jMME6jCPDsgJKuJeNSKi+VhmVbOycOhTdX/sRbaidiYsXcZM1ZRQu9ImlpsLND8U82upCzgfRTJW1nHyhmCr3xvb0UUI+AfZXw08mThwBivO5y2R1GfuF7xmR5ms1KkMYxVGiGL", "type" : "ssh-rsa" } }, "ssh_type" : "ssh-rsa", "uuid" : "5eaa53a134874f2b82b9633877032893", "vip" : false } }, "debug" : "", "exit_code" : 0, "messages" : "", "result" : "" } So we still dont know when this can occur.
            Hide
            Andre Dietisheim added a comment - - edited

            I committed a change in the unmarshalling code that would handle this when it happens:

            https://github.com/adietish/openshift-java-client/commit/f5fbf6043bc0f4aa1e5665b681b762f50ceb608d

            I can't do much more about it for now.

            Show
            Andre Dietisheim added a comment - - edited I committed a change in the unmarshalling code that would handle this when it happens: https://github.com/adietish/openshift-java-client/commit/f5fbf6043bc0f4aa1e5665b681b762f50ceb608d I can't do much more about it for now.
            Hide
            Andre Dietisheim added a comment -

            committed new client build to TRUNK

            Show
            Andre Dietisheim added a comment - committed new client build to TRUNK
            Hide
            Andre Dietisheim added a comment -

            It looks like as if what we experience in this issue is related to the following bug on the PaaS: https://bugzilla.redhat.com/show_bug.cgi?id=807268

            Show
            Andre Dietisheim added a comment - It looks like as if what we experience in this issue is related to the following bug on the PaaS: https://bugzilla.redhat.com/show_bug.cgi?id=807268
            Hide
            Stefan Bunciak added a comment -

            Not happening anymore. I'm able to log in succesfully.
            Verified in JBoss Developer Studio

            Version: 5.0.0.Beta3
            Build id: v20120430-1703-H125-Beta3
            Build date: 20120430-1703

            Show
            Stefan Bunciak added a comment - Not happening anymore. I'm able to log in succesfully. Verified in JBoss Developer Studio Version: 5.0.0.Beta3 Build id: v20120430-1703-H125-Beta3 Build date: 20120430-1703

              People

              • Assignee:
                Andre Dietisheim
                Reporter:
                Andre Dietisheim
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development