Announcement

Collapse
No announcement yet.

BC script fails on Linux in non-interactive mode

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BC script fails on Linux in non-interactive mode

    Hi,

    I have a corporate license (Oracle). I installed BC on an OEL 5 Linux machine (as root I believe); created a script to do a file compare; started a VNC server session on this box (I believe this helps satisfy the X-window requirement that BC has for working on Linux); the user I'm logged in as is the one that started the vnc server session, and has read/write privileges to the directory where the BC file compare script is kept and also to the output directory, and has execute privileges on the script.

    Here's the issue I'm facing. The command I'm running is -
    bcompare -silent @<path-to-script> <args-as-needed-in-script>

    When logged as the user into the Linux box in interactive mode using the VNC session, this runs fine and generates the diff report in the output directory specified in the script.

    But, when I'm running this in a non-interactive mode, i.e., through a java application deployed to a Weblogic server running on the same box (started by the same user), it fails, and the only error message I've been able to get is "bcompare: Fatal IO error: client killed". To be precise, it does not happen on all Linux boxes I've tried this on - works on a couple of them, and fails on another couple of boxes. I have tried to diff the env settings/variables on all boxes, but I have not been able to narrow it down to a specific setting I'm missing, although my hunch is that when it fails, it is because it's unable to connect to the X server or has some related authentication issue.

    I've searched extensively online to no avail, although these links seem to allude to something similar -
    https://unix.stackexchange.com/quest...emote-login-to
    https://bugs.launchpad.net/ubuntu/+s...sh/+bug/302791
    https://bugzilla.redhat.com/show_bug.cgi?id=1215962
    https://forums.opensuse.org/showthre...S-launched-app

    Please help as this has come up in an internal production env.

  • #2
    Hello,

    The most likely culprit in your environment is a lack of the X window system. BC4 needs this to launch, even in an scripted or -silent environment.

    Is this problem reproducible/working on specific systems (Computer A always works, while Computer B always fails)? For the Linux boxes where it works, are they set up as user workstations that can easily launch various graphical applications, has a monitor connected already, etc? What might be special about their setup that has installed the extra X windows support needed?
    Aaron P Scooter Software

    Comment


    • #3
      Originally posted by Aaron View Post
      Hello,

      The most likely culprit in your environment is a lack of the X window system. BC4 needs this to launch, even in an scripted or -silent environment.

      Is this problem reproducible/working on specific systems (Computer A always works, while Computer B always fails)? For the Linux boxes where it works, are they set up as user workstations that can easily launch various graphical applications, has a monitor connected already, etc? What might be special about their setup that has installed the extra X windows support needed?
      Hi Aaron,

      As I mentioned in the initial post, it works on 2 machines while it doesn't on 2 others. They are all very similar setups (OS etc.), including the X-window part (which I'm getting via a VNC server session on each); apparently the authentication/authorization when connecting to the X server, while running in a non-interactive mode specifically, is failing (i.e, it works fine on all 4 machines in interactive mode).

      What exactly does BC do with the X server in non-interactive mode? Do any environment variables need to be set or checked for specifically? Do we need any cookies to be set? Does it care about the type of shell etc.? Anything to do with XAUTH or MIT-MAGIC-COOKIE etc.?

      Thanks,
      Pranav

      Comment


      • #4
        Hello,

        If you edit the launcher script (/usr/bin/bcompare) and remove:
        " > /dev/null 2>&1"
        from line 46 it'll write out any error messages.

        Talking with a developer, you may need to use QT to configure it for that specific machine, to make sure it can connect to the X11 server and create invisible windows.
        https://doc.qt.io/archives/4.3/qappl...l#QApplication
        Aaron P Scooter Software

        Comment

        Working...
        X