Has anyone had problems with fusionreactor install...
# fusion-reactor
j
Has anyone had problems with fusionreactor installed by commandbox? We used to use it all the time, I just went back to turn it on in our dockerfile, and now instances won't startup because of the error:
Copy code
Error occurred during initialization of VM
Could not find agent library /app/server//fusionreactor/libfrjvmti_x64.so in absolute path, with error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /app/server//fusionreactor/libfrjvmti_x64.so)
This is ontop of ortussolutions/commandbox:jdk11-alpine-3.6.2
b
@Jordan Clark Did you check to see if that file is there?
Seems like a reasonable first step
Also, are you using a different version of Fusionreactor now than the last time it worked?
j
it is a newer version of commandbox-fusionreactor, fusionreactor itself, and the docker image
b
Ok, so go back and see if the previous version works
But I'd still check if the file exists first
Or what, if anything, is in that folder at all
That should help determine what's going on
Also, if you have the verbose output of the server start, that should have debugging information as well
j
Is there an box env var I can set to trigger verbose output
b
It's on by default in the ortus images
j
Odd its not output anything, maybe "Error occurred during initialization of VM" indicates the error is before commandbox can output anything. So the file does exist:
Copy code
/app/server/fusionreactor/libfrjvmti_x64.so
I wonder if the double "//" in the error is the issue:
Copy code
/app/server//fusionreactor/libfrjvmti_x64.so
b
That's possible. Not sure why it wouldn't have caused an issue before
Windows (and CFML) is pretty lenient about double slashes. Not sure about Iinux
Let me see if I can get rid of that extra slash
j
When I examine the startup-final.sh file I see:
Copy code
exec /opt/java/openjdk/bin/java \
        '-Duser.timezone=UTC' \
        '-XX:ReservedCodeCacheSize=256m' \
        '-Xmx6144m' \
        '-XX:+UseG1GC' \
        '-javaagent:/app/server//fusionreactor/fusionreactor.jar=name=Admin-Portal-Bang,address=0.0.0.0:8088,external=false' \
b
Well yes, that's what I would expect to see
Here's the logic that builds that path
Copy code
serverInfo.FRHomeDirectory = ( serverInfo.serverHomeDirectory ?: serverInfo.serverHome ?: serverInfo.webConfigDir & '/' & replace( serverInfo.cfengine, '@', '-' ) ) & '/fusionreactor/';
serverhomedirectory prolly has a trailing slash
j
In my docker file:
Copy code
ENV BOX_SERVER_APP_SERVERHOMEDIRECTORY=/app/server
b
But this code has run fine for years so I'm not sure what would have changed overnight
One things Java does better than CFML is it has tools for building file paths that takes care of slashes
That's one nice thing about a proper
File
class and not making everything a string
j
Weird. I manually updated startup-final.sh to fix the "//" now the error is:
Copy code
Error occurred during initialization of VM
Could not find agent library /app/server/fusionreactor/libfrjvmti_x64.so in absolute path, with error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /app/server/fusionreactor/libfrjvmti_x64.so)
and at the same time I can verify the file is there:
Copy code
less /app/server/fusionreactor/libfrjvmti_x64.so
b
wait a minute, I think this is a red herring
you're having a dynamic linking failure
which presents as a file not found, but it's misleading
Can you run the following inside the container
Copy code
ld /app/server/fusionreactor/libfrjvmti_x64.so
It will load the so file and show any linking errors
j
its alpine
Copy code
ld: command not found
b
stupid alpine
are you on the latest commandbox image?
I want to say the last time this happened, it was due to bad detection of the OS or CPU arch
j
Yeah I just updated to see if that would resolve it, alpine-3.7.6
b
I'm actually trying to recall if FR supports alpine in their debugger libs
The big issue with Alpine linux is it doesn't have the typical gcc libs, it uses musl
which is part of how it's so small
This causes a lot of linux libs to not link unless they were compiled for MUSL linux
I feel like I've had this convo before, but it's prolly lost to slack's history
Either way, I don't think this is a CommandBox question any longer--this is really something FusionReactor's support should be able to address
Can you try that command again, but do
ldd
?
j
Its been about a year, but we used to use FR on alpine in the past
b
I think that's what it's called
j
That looks like the root cause
b
☝️ Yep, there you go
So the missing file is not the FR lib, it's the one a couple lines down which was required by the FR lib
You can prolly install some massive GCC package of libc libraries to make it work
j
Are any fusionreactor people active in this slack?
b
sometimes
but not always
the fastest way to reach them is usually via E-mail
Let me know what they say
j
Thanks for your help pin pointing this
b
I've prolly asked them about this before and they said not enough people used alpine to support it, lol
So it's best if you ask so it's not just me asking them all the time
Let me know what they say
j
I tried adding dependencies
Copy code
apk add gcompat
and/or
Copy code
apk add libc6-compat
it gets passed the missing library, but every time the JDK crashes hard
Copy code
A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000000004f026, pid=331, tid=332
#
# JRE version:  (11.0.16.1+1) (build )
# Java VM: OpenJDK 64-Bit Server VM (11.0.16.1+1, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  0x000000000004f026
b
Interesting
Well, I can't support FR's closed source compiled linux modules, lol
This is all good information you can tell them when you E-mail their support
j
Yup
support email sent fingers crossed
👍 1
e
The error is the path " /app/server//fusionreactor/libfrjvmti_x64.so" this is the wrong path.. as // is a literal path set. So try modifying your config so its just references/app/server/fusionreactor/...
b
Read above, he did that.
Java will generally ignore double slashes
The issue was the so file is linked to the gcc libc so's, not the MUSL ones
So the file not found was misleading as it was the linked lib now found
It's all in the thread above
e
he said he modified the file, he needs to check the permissions on the file as well
b
Read the thread 🙂
When a linked library is not found, that will present as a "file not found" error in Java, but it's a dynamically linked library that's missing, not the top level file
e
the real error is LD is a kernal module used to handle aliases at the io level, so he doesnt have 'ld", which is kind of a big deal. Tells me, without even bothering to look it up, the installer is looking for POSIX standard install which java is geared for and what ever distro he is using, is not.
as above, he should really be using one of your sanctioned images, a RHEL clone or Debian would all have worked. Its a Linux from scratch project, which -- meeh.
b
No, he's running it on MUSL linux and the gcc libs aren't present which is what the debugger lib is linked to, like I said
It's common to find Linux libraries that aren't compiled for MUSL when using Alpine
e
like i said, POSIX compliant vs some kind of weird halted style throw back
b
You are correct RHEL or Debian would have worked, but people like Alpine because it's small
e
debian and rhel are small enough to run entire countries on. People need to get over storage sizes as storage is ultra cheap
😆 1
j
ortussolutions/commandbox:jdk11-alpine is an official ortus image, its not a linux from scratch project
b
Yeah, we offer Debian and Alpine containers based on what people want
Did you hear back from support @Jordan Clark?
I know I talked to them about this before, but I don't recall if they put in a ticket for it or not.
j
@bdw429s yeah, first reply was simply to disable debugging library: https://commandbox.ortusbooks.com/embedded-server/fusionreactor#debugger-libs Alpine is missing the Glibc libraries required for the debugger. If you disable the libs with the instructions I sent earlier, you will still have monitoring and some system metrics. Alpine is stripped back from an architecture perspective so getting it to have full monitoring capabilities is difficult, if you want full capabilities I would recommend switching to something like Debian or CentOS.
b
lol, well obviously that would make the error go away, lol
But it doesn't fix the issue
So they basically told you want you already know
Tell them they should support Alpine since it's popular for Docker containers.
j
Yup thats what I did
👍 1
e
alpine is all but a halted kernel image. Better off from a security and a size prospective using FreeBSD, as its performance is legendary, or at least "good enough" to run major streaming companies on.