Having Trouble with CommandBox on LinuxMint

81 views
Skip to first unread message

Ian Burns

unread,
May 31, 2018, 2:41:19 PM5/31/18
to CommandBox
Hello,

I'm maintaining a legacy CF application and I'm having trouble getting certain parts of the application to work properly (or at all) when using CommandBox (but I have no issue when I run it on my locally installed CF instance).

I believe the issue may be related to older CFUI items that the application is using, but that's only because (when using CommandBox) the server crashes when I hit pages that have lots of CFUI items in them, but if I avoid those pages the application works as intended.

I've run `box start --debug --console` and this is the error that I get whenever I navigate to one of the pages that causes a crash:

The program 'java' received an X Window System error.
This probably reflects a bug in the program.
The error was 'RenderBadPicture (invalid Picture parameter)'.
  (Details: serial 3662 error_code 143 request_code 139 minor_code 7)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Server's output stream closed. It's been stopped elsewhere.

Stopping server...

Is this a known issue?  Does anyone know of a work-around?

System Info:
Linux Mint 18.2 Cinnamon
CommandBox 4.0.0+01015
cfengine: ad...@10.0.23+302580
Java version: 1.8.0_171

Thanks in advance,
-Ian

Brad Wood

unread,
May 31, 2018, 2:46:20 PM5/31/18
to comma...@ortussolutions.com
That's certainly not a known issue.  Sounds like some buginess in some Java library.  Can you try that --sync parameter and see if it gives you a different/better errors.  Also, check for JVM panic dump files.  Not sure where they would go, possibly in the working directory the binary was ran from.

server set jvm.args=--sync

Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 


--
You received this message because you are subscribed to the Google Groups "CommandBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandbox+unsubscribe@ortussolutions.com.
To post to this group, send email to comma...@ortussolutions.com.
Visit this group at https://groups.google.com/a/ortussolutions.com/group/commandbox/.
To view this discussion on the web visit https://groups.google.com/a/ortussolutions.com/d/msgid/commandbox/35cec015-9c38-4e06-bf46-a42ab7ac8c47%40ortussolutions.com.
For more options, visit https://groups.google.com/a/ortussolutions.com/d/optout.

iwbu...@gmail.com

unread,
May 31, 2018, 2:47:34 PM5/31/18
to CommandBox
I should also add: all of the developers in our office who are on Linux Mint are also having this issue, but anyone who is on either a Windows or Mac machine are not having this issue.

iwbu...@gmail.com

unread,
May 31, 2018, 2:48:57 PM5/31/18
to CommandBox
Thanks for the quick reply!

I'll try this and report back.

-Ian
To unsubscribe from this group and stop receiving emails from it, send an email to commandbox+...@ortussolutions.com.

Brad Wood

unread,
May 31, 2018, 2:52:29 PM5/31/18
to comma...@ortussolutions.com
Also, check out this ticket:


it doesn't have a resolution, but it's the same error and has some troubleshooting information on it.

Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 


To unsubscribe from this group and stop receiving emails from it, send an email to commandbox+unsubscribe@ortussolutions.com.

To post to this group, send email to comma...@ortussolutions.com.
Visit this group at https://groups.google.com/a/ortussolutions.com/group/commandbox/.

Jon Clausen

unread,
May 31, 2018, 2:52:33 PM5/31/18
to comma...@ortussolutions.com

If you add the arg “-Djava.awt.headless=true” to the jvm.args key of your server.json file, does the error still exist?  It sounds like Mint may have either an incompatible version of a window server running, or none at all – but for some reason Java/CommandBox thinks it does.

--

You received this message because you are subscribed to the Google Groups "CommandBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandbox+...@ortussolutions.com.
To post to this group, send email to comma...@ortussolutions.com.
Visit this group at https://groups.google.com/a/ortussolutions.com/group/commandbox/.

iwbu...@gmail.com

unread,
May 31, 2018, 3:23:09 PM5/31/18
to CommandBox
That did it!

I cannot thank you enough for this.  I've been trying to get this fixed off and on for months in my free time at work and finally broke down and decided to ask the right people for help.  I guess next time I'll ask for help sooner, haha!

Thanks,
Ian

To post to this group, send email to comm...@ortussolutions.com.

iwbu...@gmail.com

unread,
May 31, 2018, 3:27:29 PM5/31/18
to CommandBox
Thanks so much for you help here Brad.  This has been solved with Jon's suggestions, but I did want to give you a bit of info from your initial suggestion:

When I tried to `server set jvm.args=--sync`, I got no error, but subsequent runs of `start --debug --console` would fail and give me:

Unrecognized option: --sync
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Server's output stream closed. It's been stopped elsewhere.

Stopping server...

Again, just FYI, not sure if this is info you want or need, but I figured I'd provide it anyway.

Thanks again,
Ian

Brad Wood

unread,
May 31, 2018, 3:29:23 PM5/31/18
to CommandBox
Hmm, that must just mean that --sync isn't a valid JVM arg.  If that's the case, I don't know what the heck that error message was telling us to do.  Oh, well, it probably doesn't matter and it's not worth the 30 black hole of Googling to try and figure out if you have a working solution :)

Thanks!

~Brad

Brad Wood

unread,
May 31, 2018, 3:33:14 PM5/31/18
to CommandBox
Oh, and thanks for suggesting the fix Jon.  I am curious if the system tray icon still works for you when you go in headless mode.  I think the Dorkbox library that handles the tray icons and menus might use some of the AWT stuff.

If it has no side effect at all, we may want to automatically add it to all servers, but if it also disables stuff that people might want, we may want to just put a note in the docs about this.  I'd love to know the try source of the error and why it seems to only affect people on Linux Mint, but that rabbit hole may have no end....

iwbu...@gmail.com

unread,
May 31, 2018, 3:37:46 PM5/31/18
to CommandBox
Totally agree.

I'm perfectly fine with just sticking with headless=true as long as it works for the Mint guys in our office.

Brad Wood

unread,
May 31, 2018, 3:45:19 PM5/31/18
to comma...@ortussolutions.com
Can you please confirm for me if the tray icons still work when you use that flag?  

Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 


--
You received this message because you are subscribed to the Google Groups "CommandBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandbox+unsubscribe@ortussolutions.com.

To post to this group, send email to comma...@ortussolutions.com.
Visit this group at https://groups.google.com/a/ortussolutions.com/group/commandbox/.

iwbu...@gmail.com

unread,
May 31, 2018, 3:47:31 PM5/31/18
to CommandBox
The little tray popup window no longer comes up for me (which is fine) and there is no longer a tray icon at all (which again is fine).

The only other different behavior I'm seeing now is that the application auto-opens in Firefox now when it used to open in Chrome (even if Chrome is open but FF is not).  Not really a big deal to me or anyone else on our team, but it might be to others.  I could have some default browser set somewhere in Mint, but I'm not sure if that's related (nor do I even know what my default is b/c I normally just open up my applications by name anyway).

Thanks,
Ian

Brad Wood

unread,
May 31, 2018, 3:56:21 PM5/31/18
to comma...@ortussolutions.com
Ok, thanks for confirming.  So I definitely don't want to turn off AWT in general.  I might consider defaulting it to off for LInux Mint users if there's a reliable way to detect just since this causing such an issue.  but either way, this deserves a page in the docs that people can Google and find (hopefully).  

Regarding the default browser, that is certainly related to AWT.  You can see the code here that opens a browser.  A very similiar version of this same code exists in Java in runwar for when servers first start.


You can see it attempts to use AWT if it's enabled, but if not it falls back to a more brute force method that just loops through a handful of known browsers and tries to call them.  I'm sure that logic could be tweaked or make more dynamic if it became an issue.l


Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 


--
You received this message because you are subscribed to the Google Groups "CommandBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandbox+unsubscribe@ortussolutions.com.

To post to this group, send email to comma...@ortussolutions.com.
Visit this group at https://groups.google.com/a/ortussolutions.com/group/commandbox/.

iwbu...@gmail.com

unread,
May 31, 2018, 4:07:40 PM5/31/18
to CommandBox
Ah, yep, that would do it!  That's very interesting!

Thanks for all your help here (both Brad and Jon).  I'm so glad I can finally use CommandBox, haha!

Have a good one,
Ian

On Thursday, May 31, 2018 at 2:56:21 PM UTC-5, Brad Wood wrote:
Ok, thanks for confirming.  So I definitely don't want to turn off AWT in general.  I might consider defaulting it to off for LInux Mint users if there's a reliable way to detect just since this causing such an issue.  but either way, this deserves a page in the docs that people can Google and find (hopefully).  

Regarding the default browser, that is certainly related to AWT.  You can see the code here that opens a browser.  A very similiar version of this same code exists in Java in runwar for when servers first start.


You can see it attempts to use AWT if it's enabled, but if not it falls back to a more brute force method that just loops through a handful of known browsers and tries to call them.  I'm sure that logic could be tweaked or make more dynamic if it became an issue.l


Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 


On Thu, May 31, 2018 at 2:47 PM, <iwbu...@gmail.com> wrote:
The little tray popup window no longer comes up for me (which is fine) and there is no longer a tray icon at all (which again is fine).

The only other different behavior I'm seeing now is that the application auto-opens in Firefox now when it used to open in Chrome (even if Chrome is open but FF is not).  Not really a big deal to me or anyone else on our team, but it might be to others.  I could have some default browser set somewhere in Mint, but I'm not sure if that's related (nor do I even know what my default is b/c I normally just open up my applications by name anyway).

Thanks,
Ian

On Thursday, May 31, 2018 at 2:33:14 PM UTC-5, Brad Wood wrote:
Oh, and thanks for suggesting the fix Jon.  I am curious if the system tray icon still works for you when you go in headless mode.  I think the Dorkbox library that handles the tray icons and menus might use some of the AWT stuff.

If it has no side effect at all, we may want to automatically add it to all servers, but if it also disables stuff that people might want, we may want to just put a note in the docs about this.  I'd love to know the try source of the error and why it seems to only affect people on Linux Mint, but that rabbit hole may have no end....

--
You received this message because you are subscribed to the Google Groups "CommandBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandbox+...@ortussolutions.com.

To post to this group, send email to comma...@ortussolutions.com.
Visit this group at https://groups.google.com/a/ortussolutions.com/group/commandbox/.

Dominic Watson

unread,
Jun 5, 2018, 3:57:11 AM6/5/18
to comma...@ortussolutions.com, CommandBox
Hey guys, I experienced this issue too on Pop!_OS (another Ubuntu based distro). What fixed it for me was to disable the tray icon for my server. So I guess the JVM args fix had the side effect of knocking out the tray icon which is the actual problem.

I've been considering creating a separate tray icon application that is a gui to box server list, start, stop, etc. So one tray icon to manage all your servers - good to know there are a bunch of other Linux users out there!


Dominic Watson
Technical Lead

Pixl8 Interactive, 3 Tun Yard, 
Peardon Street, London, SW8 3HT

         

Brad Wood

unread,
Jun 5, 2018, 2:31:54 PM6/5/18
to comma...@ortussolutions.com
We've discussed the option of having some "master" icon for all your servers.   DorkBox allows for nested menus which would work for this, but there would need to be some sort of separate process running all the time which would register and unregister servers as they came online.  Possibly, but a lot of work for sure.  The other problem I've always had the tray icons is they run directly in the server's JVM process and don't funnel through the CLI to stop servers so things like `onServerStop` interceptors never fire.  

Thanks!

~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 


Dominic Watson

unread,
Jun 6, 2018, 4:55:20 AM6/6/18
to comma...@ortussolutions.com, comma...@ortussolutions.com
Oh yeah definitely would be a bunch of work. I would see this as an application completely separate from CommandBox. Just a GUI front-end to the command line commands. Would definitely be a mistake to build into commandbox/runwar itself I think.



Dominic Watson
Technical Lead

Pixl8 Interactive, 3 Tun Yard, 
Peardon Street, London, SW8 3HT

         

Dominic Watson

unread,
Jun 8, 2018, 7:21:00 AM6/8/18
to comma...@ortussolutions.com, comma...@ortussolutions.com
For reference, here's what I'm running on my local dev machine to make the tray icon not show by default on any local server:

box config set server.defaults={trayEnable=false} --append

HTH


Dominic Watson
Technical Lead

Pixl8 Interactive, 3 Tun Yard, 
Peardon Street, London, SW8 3HT

         
Reply all
Reply to author
Forward
0 new messages