Git Product home page Git Product logo

Comments (15)

bdw429s avatar bdw429s commented on July 21, 2024 1

@sbleon I have just pushed an updated version of the FR commandbox module to detect ARM CPUs on Linux. It will use the aarch64 debugger lib IF it's present in the fusionreactor download from Forgebox. Mikey has updated the new zip file on S3 for fusionreactor, but I'm having a hard time testing it because S3's cloudfront is caching the file for me.

Can you please give it a test. You should see one of the following messages in your --verbose server start output

Linux ARM detected for debug libs

or

Linux ARM detected, but no lib available.  Disabling FR debugger.

Also note, you can clear any cached artifacts like so

artifacts remove fusionreactor --force

from commandbox-fusionreactor.

bdw429s avatar bdw429s commented on July 21, 2024

If you want to try loading your own debug lib, just

server set fusionreactor.debugEnable=false

in your server.json.

https://commandbox.ortusbooks.com/embedded-server/fusionreactor#debugger-libs

Do a

server start --verbose --console

and you'll be able to easily see what JVM args are being included.

If FR has some arm version of their debugger lib, I don't think they're including it in the Fusionreactor package on ForgeBox, so they'll need to start doing that and then we can change the module to use it.

from commandbox-fusionreactor.

sbleon avatar sbleon commented on July 21, 2024

Thanks, Brad!

I was able to shoehorn the ARM64 build into a test Docker project with the following:

Dockerfile:

FROM ortussolutions/commandbox:lucee5-3.4.4
RUN curl -s --create-dirs https://download.fusionreactor.io/FR/Latest/libfrjvmti_aarch64.so -o /tmp/libfrjvmti_aarch64.so
RUN box install commandbox-fusionreactor

server.json:

{
  "profile": "development",
  "fusionreactor": {
    "debugEnable": false
  },
  "jvm": {
    "args": "-agentpath:/tmp/libfrjvmti_aarch64.so"
  }
}

So, their ARM64 build does work in this context. You're right that they're not including it in the ForgeBox package, which contains:

box.json
frjvmti_x64.dll
fusionreactor.jar
libfrjvmti_x64.dylib
libfrjvmti_x64.so

I'm going to reach our to David Tattersall about getting the ARM64 lib included.


Side note: in my real project, when I set "debugEnable": false, I get this error on startup:

  | INFO: Starting server using generated script: /usr/local/bin/startup.sh
  | Error: Could not find or load main class SUB-ENVIRONMENT
  | Caused by: java.lang.ClassNotFoundException: SUB-ENVIRONMENT
  exited with code 1

This is apparently caused by having "debugEnable": false and having a licenseKey specified.

from commandbox-fusionreactor.

bdw429s avatar bdw429s commented on July 21, 2024

@sbleon Interesting that you found a download that worked. I asked around with Mikey last night and he said they didn't have an M1 build. There must be some confusion about what that means. Yes, as soon as they get that added to the forgebox package, we can detect when to use it instead.

Error: Could not find or load main class SUB-ENVIRONMENT

I have no clue what you've got going on there. The only thing the debugEnable flag controls is the addition of the -agentPath: JVM arg, nothing else./

https://github.com/bdw429s/commandbox-fusionreactor/blob/master/ModuleConfig.cfc#L208

You'd need to post the full JVM args that are being used to start the server to find the issue. I've never heard of the text SUB-ENVIRONMENT so I assume that's related to some custom JVM args you've added.

from commandbox-fusionreactor.

bdw429s avatar bdw429s commented on July 21, 2024

@sbleon Mikey just confirmed their ARM debugger lib was made for ARM Linux and they've never tested it on ARM Mac. It sounds like it's working for you, and we can still go ahead (Mikey is updating the forgebox package right now) but keep in mind you're using it in a manner that's probably not 100% tested so be on the lookout for any issues.

from commandbox-fusionreactor.

bdw429s avatar bdw429s commented on July 21, 2024

@sbleon Also, another quick question-- when you say the debugger lib works, did yo actually log into the FR web UI and use some features that are only enabled with the debugger lib? Or did you simply mean that the server started with no error?

from commandbox-fusionreactor.

sbleon avatar sbleon commented on July 21, 2024

from commandbox-fusionreactor.

sbleon avatar sbleon commented on July 21, 2024

I rebuilt my Docker images, and I do see the following in the server start output:

Linux ARM detected, but no lib available. Disabling FR debugger.

Unfortunately, then it crashes with the aforementioned "Error: Could not find or load main class SUB-ENVIRONMENT". I think this is because when the commandbox-fusionreactor module sets debugEnable to false, I end up with the bad/invalid FR config I mentioned above.

This is apparently caused by having "debugEnable": false and having a licenseKey specified.

Once the FR module has the ARM64 build in it, this should no longer be a problem.

from commandbox-fusionreactor.

bdw429s avatar bdw429s commented on July 21, 2024

it crashes with the aforementioned "Error: Could not find or load main class SUB-ENVIRONMENT".

Again, you'll need to show me your full list of JVM args. CommandBox doesn't have anything by that name, so that's coming from your config somewhere.

from commandbox-fusionreactor.

sbleon avatar sbleon commented on July 21, 2024

from commandbox-fusionreactor.

bdw429s avatar bdw429s commented on July 21, 2024

hmm, that list of JVM args can't be correct because I don't even see the fusionreactor java agent in there.

The docker containers make this a bit more difficult because they do a --dryRun start that generates a shell script and then run that shell script to do the actual start. Without seeing the full console output of your entire container coming up, it's really hard to tell what's going on there.

from commandbox-fusionreactor.

sbleon avatar sbleon commented on July 21, 2024

from commandbox-fusionreactor.

sbleon avatar sbleon commented on July 21, 2024

Since FR published a new package on S3, here's what I'm seeing now:

|    |   |------------------------------------------------------
|    | √ | Loading FusionReactor
|    |   |------------------------------------
|    |   | FusionReactor debug libs added.
|    |   | Linux ARM detected for debug libs.
|    |   | FusionReactor will be available at the URL http://0.0.0.0:8080
|    |   |------------------------------------
|    |   | √ | Installing package [forgebox:fusionreactor@^8.0.0]
|    |   |   | Verifying package 'fusionreactor' in forgebox, please wait...
|    |   |   | Installing version [8.7.7].
|    |   |   | Verified entry in forgebox: 'fusionreactor'
|    |   |   | Deferring to [https] endpoint for forgebox entry [fusionreactor]...
|    |   |   | Downloading [HTTPS://download.fusionreactor.io/ForgeBox/FusionReactor/
|    |   |   | 8.7.7/forgebox.zip]
|    |   |   | Decompressing...
|    |   |   | Storing download in artifact cache...
|    |   |   | Done.
|    |   |   | Installing to: /usr/local/lib/serverHome/fusionreactor/
|    |   |   | -> 6 File(s) Installed
|    |   |   | -> 0 File(s) ignored
|    |   |   | Eureka, 'fusionreactor@^8.0.0' has been installed!
| INFO: Starting server using generated script: /usr/local/bin/startup.sh
| FusionReactor JVMTI Revision: 8.7.7 Build: 1563.4d51258e75d1b7f3fe6eec3ac3ac6789f1b39267.8.7.7 Date: Mar  1 2022 13:17:14
| Error: Could not find or load main class SUB-ENVIRONMENT
| Caused by: java.lang.ClassNotFoundException: SUB-ENVIRONMENT
exited with code 1

So it's the SUB-ENVIRONMENT again. I've emailed FR about it.

from commandbox-fusionreactor.

bdw429s avatar bdw429s commented on July 21, 2024

@sbleon I doubt that error is coming from FR. Can you please DM me on Slack with the full contents of the file /usr/local/bin/startup.sh. The answer is no doubt, in there.

from commandbox-fusionreactor.

sbleon avatar sbleon commented on July 21, 2024

from commandbox-fusionreactor.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.