Bug 927189 - [Forge]Failed to create apps with error "Could not request /api" shown
Summary: [Forge]Failed to create apps with error "Could not request /api" shown
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Bill DeCoste
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-25 10:10 UTC by joycezhang
Modified: 2015-05-15 02:17 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-02 13:54:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Log during creating app (9.48 KB, text/x-log)
2013-03-25 10:12 UTC, joycezhang
no flags Details

Description joycezhang 2013-03-25 10:10:30 UTC
Description of problem:
If try to run rhc setup to create app with forge, it would be failed with following error shown:
[forge-final-122] forge-final-122 $ rhc setup
 ? Enter the application name [forgefinal122]  [forgefinal122] forgeap2
*INFO* Using RHLOGIN:jinzhang+1 for https://ec2-50-16-150-232.compute-1.amazonaws.com
 ? Enter your Red Hat Openshift password: ******
java.lang.RuntimeException: com.openshift.client.OpenShiftEndpointException: Could not request /api: javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name


Version-Release number of selected component (if applicable):
devenv_2933
OpenShift Tool forge-openshift-plugin1.0.6.Final installed on Jboss Forge-1.2.2-Final


How reproducible:
always

Steps to Reproduce:
1.Install openshift plugin to forge:forge install-plugin openshift
2.Run rhc setup to create app
3.Input password and continue the app creation wizard

Actual results:
Failed to create any apps.

Expected results:
App should be created successfully with forge.

Additional info:

Comment 1 joycezhang 2013-03-25 10:12:26 UTC
Created attachment 715947 [details]
Log during creating app

Comment 2 Bill DeCoste 2013-03-25 14:45:41 UTC
Unable to recreate on devenv_2993 (ami-5e28b037). Looks like there is a certificate problem between the client and the devenv. Did you run rhc setup prior to forge with express.conf containing the devenv host?

[forge-openshift-demo] forge-openshift-demo $ rhc setup
***INFO*** Loaded OpenShift configuration from /home/bdecoste/.openshift/express.conf
 ? Enter the application name [forgeopenshiftd]  [forgeopenshiftd] forgedemo
***INFO*** Using RHLOGIN:bdecoste95e for https://ec2-50-16-60-10.compute-1.amazonaws.com
 ? Enter your Red Hat Openshift password: ******
***INFO*** Found OpenShift User: bdecoste95e
Choose a JBoss Cartridge:

  1 - [Cartridge [name=jbossews-2.0]]*
  2 - [Cartridge [name=jbossas-7]]
  3 - [Cartridge [name=jbosseap-6.0]]
  4 - [Cartridge [name=jbossews-1.0]]

 ? Choose an option by typing the number of the selection [*-default]  [0] 2
***INFO*** Using JBoss Cartridge: jbossas-7
Initialized empty Git repository in /home/bdecoste/workspaces/OpenShift/forge-openshift-demo/forge-openshift-demo/.git/
***INFO*** Waiting for OpenShift to propagate DNS
***INFO*** Trying to contact http://forgedemo-bdecoste95e.dev.rhcloud.com/ (attempt 1 of 500)
***INFO*** Trying to contact http://forgedemo-bdecoste95e.dev.rhcloud.com/ (attempt 6 of 500)
***INFO*** Trying to contact http://forgedemo-bdecoste95e.dev.rhcloud.com/ (attempt 11 of 500)
Updating openshift
Warning: Permanently added 'forgedemo-bdecoste95e.dev.rhcloud.com,50.16.60.10' (RSA) to the list of known hosts.
From ssh://forgedemo-bdecoste95e.dev.rhcloud.com/~/git/forgedemo
 * [new branch]      master     -> openshift/master
***SUCCESS*** Application deployed to http://forgedemo-bdecoste95e.dev.rhcloud.com/
***SUCCESS*** Installed [forge.openshift] successfully.
***SUCCESS*** OpenShift (rhc) is installed.
Wrote /home/bdecoste/workspaces/OpenShift/forge-openshift-demo/forge-openshift-demo/pom.xml

Comment 3 joycezhang 2013-03-26 03:26:20 UTC
Verified this bug on devenv_2996. Please refer to details as below:

Build:
OpenShift Tool forge-openshift-plugin1.0.6.Final installed on Jboss Forge-1.2.2-Final


Steps:
1. Run rhc setup to add host and sshkey to express.conf
2. Run "forge" and new a project 
3. Run "rhc setup" to create a app
4. Remove rhc sshkey with rhc client
5. Rerun "rhc setup" to create a app without ssh key added

Actual results:
To step3:
The app can be created without error shown.
[forge0326] forge0326 $ rhc setup
***INFO*** Loaded OpenShift configuration from /root/.openshift/express.conf
 ? Enter the application name [forge0326]  [forge0326] app5
***INFO*** Using RHLOGIN:jinzhang+1 for https://ec2-54-234-246-230.compute-1.amazonaws.com
 ? Enter your Red Hat Openshift password: ******
***INFO*** Found OpenShift User: jinzhang+1
Choose a JBoss Cartridge:

  1 - [Cartridge [name=jbossews-2.0]]*
  2 - [Cartridge [name=jbossas-7]]
  3 - [Cartridge [name=jbosseap-6.0]]
  4 - [Cartridge [name=jbossews-1.0]]

 ? Choose an option by typing the number of the selection [*-default]  [0] 1
***INFO*** Using JBoss Cartridge: jbossews-2.0
Initialized empty Git repository in /home/openshift/forge122final/forge-distribution-1.2.2.Final/forge0326/.git/
***INFO*** Waiting for OpenShift to propagate DNS
***INFO*** Trying to contact http://app5-dev2995dmt1.dev.rhcloud.com/ (attempt 1 of 500)
Updating openshift
The authenticity of host 'app5-dev2995dmt1.dev.rhcloud.com (54.234.246.230)' can't be established.
RSA key fingerprint is 2a:80:81:59:02:e2:ee:28:26:85:09:bb:a3:39:c8:1c.
Are you sure you want to continue connecting (yes/no)? 
Please type 'yes' or 'no': 

Warning: Permanently added 'app5-dev2995dmt1.dev.rhcloud.com,54.234.246.230' (RSA) to the list of known hosts.
From ssh://app5-dev2995dmt1.dev.rhcloud.com/~/git/app5
 * [new branch]      master     -> openshift/master
***SUCCESS*** Application deployed to http://app5-dev2995dmt1.dev.rhcloud.com/
***SUCCESS*** Installed [forge.openshift] successfully.
***SUCCESS*** OpenShift (rhc) is installed.
Wrote /home/openshift/forge122final/forge-distribution-1.2.2.Final/forge0326/pom.xml


To step5:
Reasonable error message is shown instead of "Could not request /api:" as below

Warning: Permanently added 'app8-dev2995dmt1.dev.rhcloud.com' (RSA) to the list of known hosts.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: The remote end hung up unexpectedly
error: Could not fetch openshift
***ERROR*** Failed to connect to OpenShift GIT repository, project is in an inconsistent state. Remove the .git directory manually, and delete the application using rhc-ctl-app -c destroy -a app8 -b
org.jboss.forge.project.ProjectModelException: Could not complete installation of facet: [forge.openshift]. Installation was aborted by the Facet during installation.
	at org.jboss.forge.project.BaseProject.performInstallation(BaseProject.java:246)
	at org.jboss.forge.project.BaseProject.installFacet(BaseProject.java:166)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
	at org.jboss.weld.proxies.Project$-1946286523$Proxy$_$$_WeldClientProxy.installFacet(Project$-1946286523$Proxy$_$$_WeldClientProxy.java)
	at org.jboss.forge.shell.project.FacetInstallationHandler.performInstallation(FacetInstallationHandler.java:105)
	at org.jboss.forge.shell.project.FacetInstallationHandler.install(FacetInstallationHandler.java:81)
	at org.jboss.forge.shell.project.FacetInstallationHandler.installRequest(FacetInstallationHandler.java:59)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
	at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:628)
	at org.jboss.weld.event.EventImpl.fire(EventImpl.java:75)
	at com.redhat.openshift.forge.OpenShiftPlugin.setup(OpenShiftPlugin.java:98)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.forge.shell.command.Execution.perform(Execution.java:134)
	at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:109)
	at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:47)
	at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:789)
	at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:812)
	at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:602)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
	at org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
	at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)
	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)
	at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:172)
	at java.lang.Thread.run(Thread.java:722)


Note You need to log in before you can comment on or make changes to this bug.