"Wrapper: Not Found" error in Bamboo remote agent during startup
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
The steps outlined on this article are provided AS-IS. This means we've had reports of them working for some customers — under certain circumstances — yet are not officially supported, nor can we guarantee they'll work for your specific scenario.
You may follow through and validate them on your own non-prod environments prior to production or fall back to supported alternatives if they don't work out.
We also invite you to reach out to our Community for matters that fall beyond Atlassian's scope of support!
Summary
When trying to run a Bamboo remote agent on Alpine Linux 3.19.1, the following error message shows up:
<remote-agent-home>/bin/bamboo-agent.sh: eval: line 1801: <remote-agent-home>/bin/./wrapper: not found
Environment
Applicable for any supported Bamboo Remote Agent version running on Docker image Alpine Linux 3.19.1.
Diagnosis
The wrapper binary looks for specific symbols (functions or variables) that are part of glibc
, but these symbols are not found because the system uses musl libc
.
One of the ways to check any related error is by running the ldd
command against the wrapper binary, located inside the <remote-agent-home>/bin
directory, and checking its output, which should print the shared libraries required by each program. Here is an example of the problem observed:
# ldd
musl libc (x86_64)
Version 1.2.4_git20230717
Dynamic Program Loader
Usage: /lib/ld-musl-x86_64.so.1 [options] [--] pathname
/mnt # ldd /mnt/remote-agent-home/bin/wrapper
/lib64/ld-linux-x86-64.so.2 (0x7f9543712000)
libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f9543712000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f9543712000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f9543712000)
Error relocating /mnt/remote-agent-home/bin/wrapper: __snprintf_chk: symbol not found
Error relocating /mnt/remote-agent-home/bin/wrapper: __mbstowcs_chk: symbol not found
Error relocating /mnt/remote-agent-home/bin/wrapper: __vwprintf_chk: symbol not found
Error relocating /mnt/remote-agent-home/bin/wrapper: __vfwprintf_chk: symbol not found
Error relocating /mnt/remote-agent-home/bin/wrapper: __realpath_chk: symbol not found
Error relocating /mnt/remote-agent-home/bin/wrapper: __vswprintf_chk: symbol not found
Error relocating /mnt/remote-agent-home/bin/wrapper: __memcpy_chk: symbol not found
Error relocating /mnt/remote-agent-home/bin/wrapper: __wcsncpy_chk: symbol not found
Error relocating /mnt/remote-agent-home/bin/wrapper: gnu_get_libc_version: symbol not found
Error relocating /mnt/remote-agent-home/bin/wrapper: __syslog_chk: symbol not found
Error relocating /mnt/remote-agent-home/bin/wrapper: __wcsncat_chk: symbol not found
Cause
The Bamboo remote agent uses Tanuki Java Service Wrapper, built against the GNU C library (glibc
), while the Alpine Linux 3.19.1 instead uses musl libc
, a considerably smaller alternative to glibc
.
Solution
The recommended solution is to use the Official Atlassian Bamboo agent image.
If you still want to make it work through Alpine Linux 3.19.1, please feel free to install the GNU C library and try to rerun the remote agent; however, several challenges may arise:
- Path Conflicts and Linker Behavior: Even after installing glibc, the system's dynamic linker (
ld.so
) may still default to using musl libc for dynamic linking, unless explicitly directed to use glibc. This requires configuring environment variables or modifying application scripts to use the glibc linker (ld-linux.so
), which can be error-prone and complex. - Library Dependencies: Applications expecting glibc might require specific versions of libraries or modules that are part of or compatible with glibc. Installing glibc doesn't guarantee that all these dependencies are met, potentially leading to runtime errors or unexpected behavior.
- Symbol Differences and ABI Incompatibilities: There might be subtle differences in implementation and supported functionalities between musl libc and glibc. Certain symbols or features expected by applications or libraries compiled against glibc might not be fully compatible or available when using glibc on a musl-based system, leading to runtime issues.
- Maintenance and Support Challenges: Running a mixed libc environment can lead to maintenance difficulties, with increased complexity in troubleshooting and ensuring application stability.
In summary, while installing glibc on Alpine Linux 3.19.1 can be a workaround for running software built against glibc, it introduces a layer of complexity and potential issues that may not guarantee a smooth operation. It's often more reliable to use software and containers designed and compiled against the native libc of the operating system.
Atlassian doesn't provide support for customized images. Bamboo provides flexibility to use customized machine images, but it's impossible for us to support all individual configurations. Please visit our Atlassian Support Offerings page for more details.