Unable to clone the repository from Bitbucket Server after upgrade RHEL from version 7 to 8.

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When attempting to execute a repository clone operation utilizing the git clone command on Bitbucket Server, an error is encountered, specifically "Can't locate IO/Socket.pm: /usr/local/lib64/perl5/IO/Socket.pm." This error indicates that the required file IO/Socket.pm can't be found in the specified directory path (/usr/local/lib64/perl5/IO/Socket.pm). Consequently, the repository cloning process fails due to the unavailability of this essential module.

Environment

Bitbucket 7.17.10
It applies to most of the Bitbucket Server versions.

Diagnosis

The following error can be seen: 

remote: Can't locate IO/Socket.pm: /usr/local/lib64/perl5/IO/Socket.pm
remote: BEGIN failed--compilation aborted at /appbin/atlassian/application-data/bitbucket/bin/git-hooks/hook-callback.pl line 15.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: fetch-pack: invalid index-pack output"
 

Cause

This error can be caused by various reasons such as:

  1. The Perl version installed in the Bitbucket server is not Supported;
  2. Corrupted Perl Libraries.

Solution

  • Using a supported version of Perl should resolve the issue.
  • Verify no other "Perl5" directories exist on the server. If they do, the directories will not contain "IO/Socket.pm". Renaming this directory should allow your main installation to be called. Verify with your system admin for any impact outside of Bitbucket.
  • If already using the supported Perl version, reinstalling Perl on Bitbucket server should resolve this issue. This step helps to resolve the corrupted Perl Libraries issue.
Last modified on Mar 7, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.