Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scanning Organization Folder now for bitbucket team project Fails to recompute children #644

Open
touseefspeaks opened this issue Sep 21, 2022 · 3 comments
Assignees
Labels

Comments

@touseefspeaks
Copy link

touseefspeaks commented Sep 21, 2022

Jenkins and plugins versions report

Environment
Jenkins version : v2.332.3
Branch source Plugin: [773.v4b_9b_005b_562b_](https://plugins.jenkins.io/cloudbees-bitbucket-branch-source)
Atlassian Bitbucket v8.1.3

What Operating System are you using (both controller, and any agents involved in the problem)?

Jenkins version : v2.332.3
Branch source Plugin: 773.v4b_9b_005b_562b_
The setup is run on EKS : v1.22.6-eks-7d68063
OS-IMAGE: Amazon Linux 2
CONTAINER-RUNTIME: docker://20.10.13

While performing the Scan Organization Folder now for bitbucket team project , scan fails with following

ERROR: [Wed Sep 21 05:11:26 MST 2022] Could not fetch branches from source com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator::https://bitbucket.xxxx.com::projectid::repo/
[Wed Sep 21 05:11:26 MST 2022] Finished branch indexing. Indexing took 3 min 26 sec
FATAL: Failed to recompute children of projectid» repo
java.net.SocketTimeoutException: Read timed out
at java.base/java.net.SocketInputStream.socketRead0(Native Method)
at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.base/java.net.SocketInputStream.read(SocketInputStream.java:140)
at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:478)
at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:472)
at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:70)
at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1454)
at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:1065)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.executeMethodNoRetry(BitbucketServerAPIClient.java:1230)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.executeMethod(BitbucketServerAPIClient.java:1203)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequestStatus(BitbucketServerAPIClient.java:1013)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.checkPathExists(BitbucketServerAPIClient.java:533)
at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource$BitbucketProbeFactory$1.exists(BitbucketSCMSource.java:1414)
at jenkins.scm.api.SCMSourceCriteria$Probe.stat(SCMSourceCriteria.java:99)
at org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory$1.isHead(WorkflowBranchProjectFactory.java:75)
at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:342)
at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveTags(BitbucketSCMSource.java:805)
at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:613)
at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:641)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:166)
at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)

Reproduction steps

1.Create a bitbucket teams project, having multiple repos.
2.Project is configured to look for jenkinsfile
3. Click on Scan Organization Folder now.
4. Scan doesn't complete

Expected Results

FATAL: Failed to recompute children of projectid» repo
java.net.SocketTimeoutException: Read timed out
at java.base/java.net.SocketInputStream.socketRead0(Native Method)
at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)

Actual Results

Scan should complete and compute all childrens

Anything else?

No response

@ArtourTetraPak
Copy link

ArtourTetraPak commented Dec 9, 2022

Hello!

After we did update from very old versions of Jenkins and plugins the same kind of issue is happening.

Looking up team details of SYS...
Connecting to https://bitbucket.***.com/ using ad password for user
Team: [DevOps Team]
[Fri Dec 09 11:43:06 CET 2022] Consulting Bitbucket Team/Project
Connecting to https://bitbucket.***.com/ using ad password for user
ERROR: [Fri Dec 09 11:43:06 CET 2022] Could not fetch sources from navigator com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator@16815971
[Fri Dec 09 11:43:06 CET 2022] Finished organization scan. Scan took 0.12 sec
FATAL: Failed to recompute children of DevOps Team
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at java.base/sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:526)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:504)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:437)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.executeMethodNoRetry(BitbucketServerAPIClient.java:1230)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.executeMethod(BitbucketServerAPIClient.java:1203)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:860)
Caused: java.io.IOException: Communication error for url: /rest/api/1.0/projects/SYS
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:890)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getTeam(BitbucketServerAPIClient.java:756)
Caused: java.io.IOException: I/O error when accessing URL: /rest/api/1.0/projects/SYS
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getTeam(BitbucketServerAPIClient.java:761)
at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator.visitSources(BitbucketSCMNavigator.java:490)
at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:536)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:166)
at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:918)
at hudson.model.ResourceController.execute(ResourceController.java:107)
at hudson.model.Executor.run(Executor.java:449)
Finished: FAILURE

Is there a way to downgrade to a working version?

BR,
Artour

@matdtr
Copy link

matdtr commented Jul 31, 2024

Hi,

Got the same issue with Jenkins 2.452.3, and plugin version 888.v8e6d479a_1730.

Any hint on how to solve?
BR

@nfalco79
Copy link
Member

nfalco79 commented Jan 2, 2025

Is this bug still present in latest plugin version?

@nfalco79 nfalco79 self-assigned this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants