-
Notifications
You must be signed in to change notification settings - Fork 49
Issues connecting maven repos with fabric8 on OpenShift using Corporate Proxy #569
Comments
try to reach out to ggastalid on #forge irc chat room on freenode, he is a core forge developer and may know how these forge commands works with maven / proxy settings. |
I've just had a quick look and the maven settings.xml that's added to fabric8 forge is under /root/.m2 but forge is running as the jboss user. Can you try to copy https://raw.githubusercontent.com/fabric8io/fabric8-forge/master/fabric8-forge/src/main/fabric8/m2/settings.xml into You can do that using
|
Doesn't this run as an arbitrary uid on OpenShift? If so we might need to run with nss_wrapper as we've had to do with other images (gogs, jenkins) to map arbitrary uid to jboss user in container & we can set up settings.xml consistently in that case. I haven't checked what it's doing so sorry if this isn't relevant. |
Yeah we may well need to do that, also we could mount the existing jenkins maven secret into the forge pod? That's probably better all round? |
If the shared secret is required then yes mount it in both pods. I think you'll still need to mount to correct location & if you see https://github.com/fabric8io/fabric8-forge/blob/ddd88c79e7125507527a9986bbf008d8abfd6817/fabric8-forge/src/main/fabric8/assembly.xml#L42-L50 this will only work for root user. |
Guys, Thanks for your help. I am able to past that issue now. Now I am at a point I can check in the project into gogs.
Do we need to pass the credentials to pull from github? Not necessary right, even I pass the credentials they would be ignored. I was able to get it working on my Vagrant box. Is this something to do with git http.sslVerify? If that is the case how do I update the settings in the fabric8 forge. Please provide your input. Appreciate your input on this. |
|
Yes, I have updated to use 2.2.177 but still I am facing same issue. I think it could be because of some internal proxy issue, if I am using service IP to clone manually on the OpenShift Server it works fine. Do you know how can I update IP instead of address, that is like below. I tried updating on the core source page but it is not getting reflected git clone http://172.30.178.212/gogsadmin/boot20.git instead of http://gogs.cp.cnapps-dev.***.com/gogsadmin/boot20.git [root@******* vpiduri]# git clone http://gogs.cp.cnapps-dev.****.com/gogsadmin/boot20.git |
@vpiduri whats the output of:
just so we can see what the Route is setup as. Can you access any other routes in your openshift install? e.g. the fabric8 console via the same domain |
you are running the openshift router too right? |
@jstrachan yes I am running OpenShift router as well, I can access the routes from browser just fine, just not able to connect from the Openshift nodes. Here is the output, the gogs URL would be configured some where in fabric8 forge right? I just wanted to update that to use it with cluster IP apiVersion: v1
|
@vpiduri sounds like a DNS issue if containers inside openshift cannot access external DNS names from the Routes. You might wanna raise an openshift issue to help them figure out how to get your openshift install working properly with DNS |
@jstrachan Thanks for the inputs - I am excited to say that I am getting closer, Yes recently our F5 team made a change on the load balancer which caused issues to resolve the DNS for *.gbtad.com. They have fixed issue now and I am able to past that issue. I just don't see the pipelines on the main page once I configure the project, I see following log lines please see if you can point me in the right direction. How do I disable username/password for the github pull? I cant figure out where this username getting added. The weird thing is that I dont see any issues running on my local vagrant opensshift. Payload: {"namespace":"cicd","projectName":"boot21","resource":"","inputList":[{"copyPipelineToProject":true}]} |
@vpiduri no user/pwd is required to clone the git repo at https://github.com/fabric8io/jenkins-pipeline-library.git - I wonder if the HTTP proxy is causing the issue? Could you show the rest of that NullPointerException stack trace to figure out whats failing & where? So you can create projects OK on the Team Dashboard via the Note that the first time you ever install fabric8 it can take a little while for that page to populate itself; as the underlying nexus / fabric8-forge often have to download a bunch of stuff. I'm wondering if the HTTP proxy stuff isn't working inside fabric8-forge / nexus to download the necessary stuff for the project. Could you attach the log of the fabric8-forge pod? |
@jstrachan - OK I restarted forge pod and configured a spring boot project on the team dash board using create new app UI. Surprisingly now I dont see any issues and I get the pipelines. I selected one of the pipeline and triggered build. But I am facing issues checkout the project from gogs Would be an issue because the build triggered as anonymous user? Do I need to change some secret to tigger build by a specific user? **Started by user anonymous Cloning the remote Git repository Cloning repository http://gogs.cp.cnapps-dev.gbt.gbtad.com/gogsadmin/boot25.git
Fetching upstream changes from http://gogs.cp.cnapps-dev.gbt.gbtad.com/gogsadmin/boot25.git
Fetching upstream changes from http://gogs.cp.cnapps-dev.gbt.gbtad.com/gogsadmin/boot25.git
Checking out Revision d52fc0c071911bc5b1e25b20ee62ac6a9e3670ee (refs/remotes/origin/master)
First time build. Skipping changelog. [Pipeline] node Still waiting to schedule task Waiting for next available executor** |
@jstrachan Here is the pipeline for the project #!/usr/bin/groovy |
@jstrachan Did you get a chance to look at this? Appreciate your help |
@vpiduri can you check the jenkins logs under http://jenkins.your.domain.io/log/all and see if there's any errors? The last line |
@rawlingsj Thanks for the input. I see a lot of , OpenShift or Kubernetes running on this host, how do I update from default one? Thanks again for your help https://gtwtdlaposhv01.***.com:8443 Caused by: java.net.UnknownHostException: kubernetes.default Sep 24, 2016 2:34:45 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud provision |
@rawlingsj I was able to resolve this issue by adding KUBERNETES_MASTER and KUBERNETES_DOMAIN in the jenkins runtime Config and Deployment config. However I am getting below exception for the following pipelines. I was following this issue fabric8io/fabric8#5930 Thanks for the help |
@rawlingsj Did you get a chance to look into this? Appreciate your inputs on this |
Let me see if I can break it down a little:
Which pipeline are you selecting? We don't use maven tools in this way, we include the build tools in docker images that are run as part of the pipeline. Here's an example, CanaryReleaseAndStage pipeline which you can select from the new project wizard.
The maven settings.xml is mounted as a secret so you should be able to copy this maven settings.xml and add in your proxy details then
The last two errors, I'm wondering, is elasticsearch running in the namespace? It's not needed BTW, if it's found then it will post these events. Also worth checking if you have an old elasticsearch kubernetes service but no running pods.
If you have delete the elasticsearch service or deploy the logging app so that elasticsearch runs. |
BTW this error looks pretty serious:
that sounds like DNS can't find the kubernetes service in the default namespace; which should always work really. Are you sure you've setup OpenShift DNS OK? |
@jstrachan That has been fixed by adding the KUBERNETES_MASTER and KUBERNETES_DOMAIN in the jenkins runtime Config and Deployment config. |
@vpiduri out of interest what value did you change KUBERNETES_MASTER to? We originally had |
@rawlingsj I changed this value to https://gtwtdlaposhv01.***.com:8443 on this server the OpenShift/Kubernetes master has been running. I tried kubernetes.default as well that does not work, do we need to import a certificate or something if we are calling https URL |
Really appreciate the effort and great job you are doing to help people. |
we are running fabric8 on OpenShift with access to internet URLs using Corporate Proxy. As per the suggestion given by one of the fabric8 developers, we did updated jenkins-maven-settings secret to add corporate proxy settings. Then restarted the RC/PODs, still it does not work. So i went ahead and made a change to maven settings xml to make it invalid xml to see if that breaks the mvn stuff, apparently fabric8 does not use that XML at all because still fabric8-forge tries to connect to maven repo or I need to restart something else after I update the jenkins-maven-settings secret. Also I have added HTTP_PROXY, HTTPS_PROXY and NO_PROXY to fabric8-forge deployment configuration file. Still no luck
if anyone come across this kind of issue or you have inputs that would be great. Really appreciate your help
org.jboss.forge.furnace.manager.maven.MavenOperationException: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact io.fabric8.archetypes:spring-boot-webmvc-archetype:jar:2.2.164 from/to central (http://repo1.maven.org/maven2): Error transferring file: Connection refused from http://repo1.maven.org/maven2/io/fabric8/archetypes/spring-boot-webmvc-archetype/2.2.164/spring-boot-webmvc-archetype-2.2.164.jar
The text was updated successfully, but these errors were encountered: