Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-9863

Business Central tries to use current working directory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 7.58.0.Final
    • Workbench
    • None
    • False
    • False
    • NEW
    • NEW
    • undefined
    • Hide
      1. Starting point is that you are in ubuntu server (I don't know if this applies to other flavours of linux)
      2. Follow instructions https://jbpm.org/learn/gettingStarted.html to download and unzip jbpm.
      3. Move it to /opt directory and call it wildfly. So /opt/wildfly
      4. Create user and group wildfly; make this their home directory
        • sudo groupadd -r wildfly
        • sudo useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
      5. Give ownership of /opt/wildfly to user wildfly
        • sudo chown -RH wildfly: /opt/wildfly
      6. Locate yourself at /opt/wildfly, and start the server
        • cd /opt/wildfly
        • sudo -H -u wildfly ./bin/standalone.sh
      7. Browse to business central, log in as a user who can create projects, in My Space click on Try Samples.  Result: success - the playground is shown.
      8. Back at command prompt, stop the server, go somewhere that wildfly cannot write to, such as root directory, and start the server
        • cd /
        • sudo -H -u wildfly /opt/wildfly/bin/standalone.sh
      9. Browse to business central, log in as a user who can create projects, and in My Space click on Try Samples.  Result: failure - there is no playground, just the error message described earlier.
      10. To see the same failure when it is run as a system service, set up the service using these instructions https://linuxize.com/post/how-to-install-wildfly-on-centos-7/ or any other instructions on setting it up with systemd or a recent version of ubuntu, and the failure occurs.

       

      Show
      Starting point is that you are in ubuntu server (I don't know if this applies to other flavours of linux) Follow instructions https://jbpm.org/learn/gettingStarted.html  to download and unzip jbpm. Move it to /opt directory and call it wildfly. So /opt/wildfly Create user and group wildfly; make this their home directory sudo groupadd -r wildfly sudo useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly Give ownership of /opt/wildfly to user wildfly sudo chown -RH wildfly: /opt/wildfly Locate yourself at /opt/wildfly, and start the server cd /opt/wildfly sudo -H -u wildfly ./bin/standalone.sh Browse to business central, log in as a user who can create projects, in My Space click on Try Samples.  Result: success - the playground is shown. Back at command prompt, stop the server, go somewhere that wildfly cannot write to, such as root directory, and start the server cd / sudo -H -u wildfly /opt/wildfly/bin/standalone.sh Browse to business central, log in as a user who can create projects, and in My Space click on Try Samples.  Result: failure - there is no playground, just the error message described earlier. To see the same failure when it is run as a system service, set up the service using these instructions https://linuxize.com/post/how-to-install-wildfly-on-centos-7/  or any other instructions on setting it up with systemd or a recent version of ubuntu, and the failure occurs.  

      Business Central tries to install and locate file playground.lock of .kie-wb-playground in the current working directory of the user when they run the script "standalone.sh" to start the server.

      If user is not root, (instead is wildfly, for example) the playground will only work if user is currently in $WILDFLY_HOME where they have write permission.

      In ubuntu at least, the service does not run with $WILDFLY_HOME as the current working directory.  The cwd of the service itself seems to be "/" or elsewhere.  Wherever it is, the wildfly user does not have write access to it.  Therefore, playground.lock cannot be placed there, and the playground fails with message:

      java.nio.file.NoSuchFileException:/.kie-wb-playground/playground.lock

      ...

      Instructions on the web for getting jbpm to run as a service do not pick up on this.

      If the new user exploring jbpm, installs it and configures it to run as a service, and only then proceeds with the rest of the "Getting Started" instructions, they cannot get far at all, because the introductory videos depend on the playground working. It is therefore a barrier to adoption of jbpm.

      My workaround:

      At the start of standalone/configuration/standalone.sh script, put this:

      cd /opt/wildfly

      That bypasses the problem, but the code should not be fragile and should not depend on the current working directory of the user.

              kverlaen@redhat.com Kris Verlaenen
              jbeck111 Joshua Beck (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: