{"action":"created","issue":{"url":"https://api.github.com/repos/fabric8io/fabric8/issues/4962","labels_url":"https://api.github.com/repos/fabric8io/fabric8/issues/4962/labels{/name}","comments_url":"https://api.github.com/repos/fabric8io/fabric8/issues/4962/comments","events_url":"https://api.github.com/repos/fabric8io/fabric8/issues/4962/events","html_url":"https://github.com/fabric8io/fabric8/issues/4962","id":111340606,"number":4962,"title":"fabric8:json needs access to OpenShift ?","user":{"login":"rhuss","id":99080,"avatar_url":"https://avatars.githubusercontent.com/u/99080?v=3","gravatar_id":"","url":"https://api.github.com/users/rhuss","html_url":"https://github.com/rhuss","followers_url":"https://api.github.com/users/rhuss/followers","following_url":"https://api.github.com/users/rhuss/following{/other_user}","gists_url":"https://api.github.com/users/rhuss/gists{/gist_id}","starred_url":"https://api.github.com/users/rhuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhuss/subscriptions","organizations_url":"https://api.github.com/users/rhuss/orgs","repos_url":"https://api.github.com/users/rhuss/repos","events_url":"https://api.github.com/users/rhuss/events{/privacy}","received_events_url":"https://api.github.com/users/rhuss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-14T07:29:00Z","updated_at":"2015-10-23T09:34:22Z","closed_at":null,"body":"While doing an s2i test, for a build which has `fabric8:json` attached to its `package` phase, I see the following error in the log:\r\n\r\n```\r\nDownloaded: http://repo.maven.apache.org/maven2/org/eclipse/jgit/org.eclipse.jgit/4.1.0.201509280440-r/org.eclipse.jgit-4.1.0.201509280440-r.jar (2113 KB at 477.6 KB/sec)\r\nI1014 09:23:45.160599 02700 sti.go:406] [INFO] Configured with file: /tmp/src/target/classes/kubernetes.json\r\nI1014 09:23:45.247936 02700 sti.go:406] 2015-10-14 07:23:45 INFO  Version:17 - HV000001: Hibernate Validator 5.2.2.Final\r\nI1014 09:23:45.484530 02700 sti.go:406] [INFO] No environment schemas found for file: io/fabric8/environment/schema.json\r\nI1014 09:23:45.485614 02700 sti.go:406] [INFO] Generated env mappings: {}\r\nI1014 09:23:45.540989 02700 sti.go:406] [INFO] Generated port mappings: {jolokia=ContainerPort(containerPort=8778, hostIP=null, hostPort=null, name=jolokia, protocol=null, additionalProperties={})}\r\nI1014 09:23:46.302590 02700 sti.go:406] [INFO] Removed 'version' label from service selector for service `camel-cdi`\r\nI1014 09:23:46.328639 02700 sti.go:406] Generated ports: []\r\nI1014 09:23:46.390566 02700 sti.go:406] [INFO] Icon URL: https://cdn.rawgit.com/fabric8io/fabric8/master/fabric8-maven-plugin/src/main/resources/icons/camel.svg\r\nI1014 09:23:46.753580 02700 sti.go:406] [WARNING] Could not find .git folder based on the current basedir of /tmp/src\r\nI1014 09:23:46.753599 02700 sti.go:406] [WARNING] Could not find .git folder based on the current basedir of /tmp/src\r\nI1014 09:23:46.753603 02700 sti.go:406] [WARNING] Cannot default GIT_COMMIT as no git repository could be found\r\nI1014 09:23:46.753606 02700 sti.go:406] [WARNING] Cannot auto-default GIT_URL as there is no environment variable `JENKINS_GOGS_USER` defined so we can't guess the Gogs build URL\r\nI1014 09:23:46.753609 02700 sti.go:406] [WARNING] Cannot auto-default BUILD_URL as there is no environment variable `JENKINS_GOGS_USER` defined so we can't guess the Jenkins build URL\r\nI1014 09:23:47.935521 02700 sti.go:406] [WARNING] Cannot find jenkins service URL: io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.\r\nI1014 09:23:47.935545 02700 sti.go:406] io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.\r\nI1014 09:23:47.935550 02700 sti.go:406] \tat io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:53)\r\nI1014 09:23:47.935555 02700 sti.go:406] \tat io.fabric8.kubernetes.client.dsl.internal.BaseOperation.get(BaseOperation.java:121)\r\nI1014 09:23:47.935559 02700 sti.go:406] \tat io.fabric8.kubernetes.api.KubernetesHelper.getServiceURLInCurrentNamespace(KubernetesHelper.java:1303)\r\nI1014 09:23:47.935563 02700 sti.go:406] \tat io.fabric8.maven.AbstractFabric8Mojo.tryDefaultAnnotationEnvVar(AbstractFabric8Mojo.java:417)\r\nI1014 09:23:47.935566 02700 sti.go:406] \tat io.fabric8.maven.AbstractFabric8Mojo.addEnvironmentAnnotations(AbstractFabric8Mojo.java:363)\r\nI1014 09:23:47.935570 02700 sti.go:406] \tat io.fabric8.maven.AbstractFabric8Mojo.addEnvironmentAnnotations(AbstractFabric8Mojo.java:336)\r\nI1014 09:23:47.935649 02700 sti.go:406] \tat io.fabric8.maven.AbstractFabric8Mojo.addEnvironmentAnnotations(AbstractFabric8Mojo.java:313)\r\nI1014 09:23:47.935663 02700 sti.go:406] \tat io.fabric8.maven.JsonMojo.execute(JsonMojo.java:511)\r\nI1014 09:23:47.935668 02700 sti.go:406] \tat org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)\r\nI1014 09:23:47.935672 02700 sti.go:406] \tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)\r\nI1014 09:23:47.935676 02700 sti.go:406] \tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)\r\nI1014 09:23:47.935680 02700 sti.go:406] \tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)\r\nI1014 09:23:47.935683 02700 sti.go:406] \tat org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)\r\nI1014 09:23:47.935687 02700 sti.go:406] \tat org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)\r\nI1014 09:23:47.935879 02700 sti.go:406] \tat org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)\r\nI1014 09:23:47.935889 02700 sti.go:406] \tat org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)\r\nI1014 09:23:47.935894 02700 sti.go:406] \tat org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)\r\nI1014 09:23:47.935898 02700 sti.go:406] \tat org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)\r\nI1014 09:23:47.935902 02700 sti.go:406] \tat org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)\r\nI1014 09:23:47.935906 02700 sti.go:406] \tat org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)\r\nI1014 09:23:47.935910 02700 sti.go:406] \tat org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)\r\nI1014 09:23:47.935914 02700 sti.go:406] \tat org.apache.maven.cli.MavenCli.main(MavenCli.java:197)\r\nI1014 09:23:47.936034 02700 sti.go:406] \tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\nI1014 09:23:47.936048 02700 sti.go:406] \tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\nI1014 09:23:47.936053 02700 sti.go:406] \tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\nI1014 09:23:47.936057 02700 sti.go:406] \tat java.lang.reflect.Method.invoke(Method.java:497)\r\nI1014 09:23:47.936061 02700 sti.go:406] \tat org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)\r\nI1014 09:23:47.936065 02700 sti.go:406] \tat org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)\r\nI1014 09:23:47.936069 02700 sti.go:406] \tat org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)\r\nI1014 09:23:47.936072 02700 sti.go:406] \tat org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)\r\nI1014 09:23:47.936076 02700 sti.go:406] Caused by: java.util.concurrent.ExecutionException: java.net.UnknownHostException: kubernetes.default.svc: unknown error\r\nI1014 09:23:47.936187 02700 sti.go:406] \tat com.ning.http.client.providers.netty.future.NettyResponseFuture.abort(NettyResponseFuture.java:231)\r\nI1014 09:23:47.936200 02700 sti.go:406] \tat com.ning.http.client.providers.netty.request.NettyRequestSender.abort(NettyRequestSender.java:420)\r\nI1014 09:23:47.936204 02700 sti.go:406] \tat com.ning.http.client.providers.netty.request.NettyRequestSender.sendRequestWithNewChannel(NettyRequestSender.java:288)\r\nI1014 09:23:47.936210 02700 sti.go:406] \tat com.ning.http.client.providers.netty.request.NettyRequestSender.sendRequestWithCertainForceConnect(NettyRequestSender.java:140)\r\nI1014 09:23:47.936216 02700 sti.go:406] \tat com.ning.http.client.providers.netty.request.NettyRequestSender.sendRequest(NettyRequestSender.java:115)\r\nI1014 09:23:47.936222 02700 sti.go:406] \tat com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:87)\r\nI1014 09:23:47.937532 02700 sti.go:406] \tat com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:506)\r\nI1014 09:23:47.937543 02700 sti.go:406] \tat com.ning.http.client.AsyncHttpClient$BoundRequestBuilder.execute(AsyncHttpClient.java:229)\r\nI1014 09:23:47.937547 02700 sti.go:406] \tat io.fabric8.kubernetes.client.dsl.internal.BaseOperation.handleResponse(BaseOperation.java:565)\r\nI1014 09:23:47.937551 02700 sti.go:406] \tat io.fabric8.kubernetes.client.dsl.internal.BaseOperation.handleGet(BaseOperation.java:596)\r\nI1014 09:23:47.937554 02700 sti.go:406] \tat io.fabric8.kubernetes.client.dsl.internal.BaseOperation.get(BaseOperation.java:114)\r\nI1014 09:23:47.937558 02700 sti.go:406] \t... 28 more\r\nI1014 09:23:47.937561 02700 sti.go:406] Caused by: java.net.UnknownHostException: kubernetes.default.svc: unknown error\r\nI1014 09:23:47.937567 02700 sti.go:406] \tat java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)\r\nI1014 09:23:47.937571 02700 sti.go:406] \tat java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)\r\nI1014 09:23:47.938710 02700 sti.go:406] \tat java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)\r\nI1014 09:23:47.938721 02700 sti.go:406] \tat java.net.InetAddress.getAllByName0(InetAddress.java:1276)\r\nI1014 09:23:47.938725 02700 sti.go:406] \tat java.net.InetAddress.getAllByName(InetAddress.java:1192)\r\nI1014 09:23:47.938728 02700 sti.go:406] \tat java.net.InetAddress.getAllByName(InetAddress.java:1126)\r\nI1014 09:23:47.938732 02700 sti.go:406] \tat java.net.InetAddress.getByName(InetAddress.java:1076)\r\nI1014 09:23:47.938735 02700 sti.go:406] \tat com.ning.http.client.NameResolver$JdkNameResolver.resolve(NameResolver.java:28)\r\nI1014 09:23:47.938739 02700 sti.go:406] \tat com.ning.http.client.providers.netty.request.NettyRequestSender.remoteAddress(NettyRequestSender.java:356)\r\nI1014 09:23:47.938742 02700 sti.go:406] \tat com.ning.http.client.providers.netty.request.NettyRequestSender.connect(NettyRequestSender.java:367)\r\nI1014 09:23:47.938746 02700 sti.go:406] \tat com.ning.http.client.providers.netty.request.NettyRequestSender.sendRequestWithNewChannel(NettyRequestSender.java:281)\r\nI1014 09:23:47.939929 02700 sti.go:406] \t... 36 more\r\nI1014 09:23:47.939941 02700 sti.go:406] [INFO] Added environment annotations:\r\nI1014 09:23:47.939944 02700 sti.go:406] [INFO]     ReplicationController camel-cdi replicas: 1, image: docker.io/fabric8/camel-cdi:1.0-SNAPSHOT\r\nI1014 09:23:47.939948 02700 sti.go:406] [INFO] Template is now:\r\nI1014 09:23:47.939951 02700 sti.go:406] [INFO]     ReplicationController camel-cdi replicas: 1, image: docker.io/fabric8/camel-cdi:1.0-SNAPSHOT\r\nI1014 09:23:47.965360 02700 sti.go:406] [INFO]\r\nI1014 09:23:47.965380 02700 sti.go:406] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ camel-cdi ---\r\nI1014 09:23:47.965384 02700 sti.go:406] Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom\r\nDownloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom (0 B at 0.0 KB/sec)\r\nI1014 09:23:48.011380 02700 sti.go:406] Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven/2.0.6/maven-2.0.6.pom\r\nDownloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven/2.0.6/maven-2.0.6.pom (0 B at 0.0 KB/sec)\r\n```\r\n\r\nThis is of course correct, since the environment is not set for direct OpenShift API access. I wonder whether `fabric8:json` is supposed to do this (accessing the OS API) or isn't it all about generating a JSON file ? \r\n\r\nBtw, the warning here are still very disturbing, too. There should be another way to connect DevOps to this plugin so that the plugin stays agnostic to DevOps. Otherwise coupling will kill us sooner or later."},"comment":{"url":"https://api.github.com/repos/fabric8io/fabric8/issues/comments/150529363","html_url":"https://github.com/fabric8io/fabric8/issues/4962#issuecomment-150529363","issue_url":"https://api.github.com/repos/fabric8io/fabric8/issues/4962","id":150529363,"user":{"login":"davsclaus","id":477100,"avatar_url":"https://avatars.githubusercontent.com/u/477100?v=3","gravatar_id":"","url":"https://api.github.com/users/davsclaus","html_url":"https://github.com/davsclaus","followers_url":"https://api.github.com/users/davsclaus/followers","following_url":"https://api.github.com/users/davsclaus/following{/other_user}","gists_url":"https://api.github.com/users/davsclaus/gists{/gist_id}","starred_url":"https://api.github.com/users/davsclaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davsclaus/subscriptions","organizations_url":"https://api.github.com/users/davsclaus/orgs","repos_url":"https://api.github.com/users/davsclaus/repos","events_url":"https://api.github.com/users/davsclaus/events{/privacy}","received_events_url":"https://api.github.com/users/davsclaus/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T09:34:22Z","updated_at":"2015-10-23T09:34:22Z","body":"See also #5090 "}}