Menu

Controller shuts down immediately after startup

Help
7 days ago
3 days ago
  • John Baltimore

    John Baltimore - 7 days ago

    Hello

    I am trying to install the JS7 controller on Linux. To do this, I downloaded the latest version 2.8.1 and installed it using this script.

    ./js7_install_controller.sh \
    --tarball=/home/js7/install/js7_controller_unix.2.8.1.tar.gz \
    --home=/opt/sos-berlin.com/js7/controller \
    --data=/var/sos-berlin.com/js7/controller \
    --user=js7 \
    --exec-start="sudo systemctl start controller.service" \
    --home-owner=js7:js7 \
    --data-owner=js7:js7 \
    --show-logs \
    --log-dir=/tmp/js7 \
    --logs=/var/sos-berlin.com/js7/controller/logs \
    --controller-id=ubuntu_controller \
    --http-port=4444 \
    --service-name=controller.service \
    --make-dirs \
    --make-service \
    --force-sudo
    

    The controller starts briefly and then shuts down again immediately.

    2025-10-27T07:39:50,832 Begin JS7 Controller · 2.8.1 · Java 17.0.16 · OpenJDK 64-Bit Server VM 17.0.16+8-Ubuntu-0ubuntu124.04.1 (500MiB) · Linux (Linux Mint 22.2) · Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 threads) 7.6GiB · pid=29643 host=ur-Aspire-V5-573G  · started at 2025-10-27T12:39:49.726Z
    2025-10-27T07:39:50,989 info  js7.base.system.startup.StartUp - Controller 2.8.1 · Java 17.0.16 · OpenJDK 64-Bit Server VM 17.0.16+8-Ubuntu-0ubuntu124.04.1 (500MiB) · Linux (Linux Mint 22.2) · Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 threads) 7.6GiB · pid=29643 host=john linux machine  · started at 2025-10-27T06:39:49.726Z
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    2025-10-27T07:39:51,617 info  js7.base.configutils.Configs - Reading configuration file /var/sos-berlin.com/js7/controller/config/controller.conf
    2025-10-27T07:39:51,899 info  js7.common.system.startup.ServiceMain - config=/var/sos-berlin.com/js7/controller/config data=/var/sos-berlin.com/js7/controller
    2025-10-27T07:39:53,241 info  js7.base.log.Log4j - Shutdown
    2025-10-27T07:39:53,246 End of logging
    

    This is the conf file

    # Controller Cluster configuration for the standby node
    # js7.journal.cluster.node.is-backup = yes
    
    # allow http connections
    js7.web.server.auth.public = true
    

    I was able to install agent and agent is running.

    What could be the reason for this?

     
  • Andreas

    Andreas - 7 days ago

    Hi John,

    no immediate error is apparent from use of the script and log output.

    Please check the Controller's ./logs/watchdog.log file that includes output written to stdout/stderr.

     
  • John Baltimore

    John Baltimore - 7 days ago

    There is no error in the watchdog.log file.

    "/usr/bin/java" -DJS7.Controller="ubuntu_controller"  -Xmx500m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+ExitOnOutOfMemoryError -classpath "/opt/sos-berlin.com/js7/controller/lib:/var/sos-berlin.com/js7/controller/config/patches/*:/var/sos-berlin.com/js7/controller/config/lib/*:/opt/sos-berlin.com/js7/controller/lib/patches/*:/opt/sos-berlin.com/js7/controller/lib/user_lib/*:/opt/sos-berlin.com/js7/controller/lib/sos/*:/opt/sos-berlin.com/js7/controller/lib/3rd-party/*" js7.controller.ControllerMain --id="ubuntu_controller" --http-port="4444"  --config-directory="/var/sos-berlin.com/js7/controller/config" --data-directory="/var/sos-berlin.com/js7/controller"
    ...JS7 Controller(ubuntu_controller) is starting with pid=30720!
    ...see log file /var/sos-berlin.com/js7/controller/logs/controller.log
    ...watchdog for pid 30720 is started
    Hit ENTER to return to command prompt.
    2025-10-27 08:26:34.467+0100 JS7 Controller 2.8.1
    
     
    • brian johnson

      brian johnson - 7 days ago

      Hi John,
      If I remember correctly when I was using Job Scheduler, if you are using a clustered configuration, you need the cluster licence. The free version only provides a single controller not clustered.

      Regards
      Brian

      Name Brian Johnson – Planned Leave NONE.
      Cloud Engineer
      UK - Digital, Data and Cloud

      [group-logo] [cid:image002.png@01DC4746.32A3A320] [cid:image003.png@01DC4746.32A3A320]

      From: discussion@jobscheduler.p.re.sourceforge.net discussion@jobscheduler.p.re.sourceforge.net On Behalf Of John Baltimore
      Sent: Monday, October 27, 2025 1:29 PM
      To: [jobscheduler:discussion] 486122@discussion.jobscheduler.p.re.sourceforge.net
      Subject: [jobscheduler:discussion] Controller shuts down immediately after startup

      There is no error in the watchdog.log file.

      "/usr/bin/java" -DJS7.Controller="ubuntu_controller" -Xmx500m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+ExitOnOutOfMemoryError -classpath "/opt/sos-berlin.com/js7/controller/lib:/var/sos-berlin.com/js7/controller/config/patches/:/var/sos-berlin.com/js7/controller/config/lib/:/opt/sos-berlin.com/js7/controller/lib/patches/:/opt/sos-berlin.com/js7/controller/lib/user_lib/:/opt/sos-berlin.com/js7/controller/lib/sos/:/opt/sos-berlin.com/js7/controller/lib/3rd-party/" js7.controller.ControllerMain --id="ubuntu_controller" --http-port="4444" --config-directory="/var/sos-berlin.com/js7/controller/config" --data-directory="/var/sos-berlin.com/js7/controller"

      ...JS7 Controller(ubuntu_controller) is starting with pid=30720!

      ...see log file /var/sos-berlin.com/js7/controller/logs/controller.log

      ...watchdog for pid 30720 is started

      Hit ENTER to return to command prompt.

      2025-10-27 08:26:34.467+0100 JS7 Controller 2.8.1


      Controller shuts down immediately after startuphttps://sourceforge.net/p/jobscheduler/discussion/486122/thread/603e9a0b51/?limit=25#6f7d


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/jobscheduler/discussion/486122/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

      Unless otherwise stated, this email has been sent from Fujitsu Services Limited (registered in England No 96056); Fujitsu EMEA PLC (registered in England No 2216100) both with registered offices at: Lovelace Road, Bracknell, Berkshire RG12 8SN; PFU (EMEA) Limited, (registered in England No 1578652) registered offices at: Belmont, Belmont Road, Uxbridge, England, UB8 1HE and Fujitsu Research of Europe Ltd (registered in England No. 4153469) 4th Floor, Building 3, Hyde Park Hayes, 11 Millington Road, Hayes, UB3 4AZ.

      This email is only for the use of its intended recipient. Its contents are subject to a duty of confidence and may be privileged. Fujitsu does not guarantee that this email has not been intercepted and amended or that it is virus-free.

       
  • Andreas

    Andreas - 7 days ago

    Hi John,

    Brian's hint is correct. However, I cannot identify a line of log output in your watchdog.log file that indicates a license check. It looks to me that you are operating a standalone Controller.

    Prominent root causes you can address from the following actions:

    • In the /var/sos-berlin.com/js7/controller directory, can you identify any Java Fatal Error Logs, available from hs_err<PID>.log files?
    • Delete the /var/sos-berlin.com/js7/controller/state directory and restart the Controller.



    If the problem persists, enable debug log level from the ./config/log4j2.xml file, Find instructions how to enable debug log level from the JS7 - Log Levels and Debug Options article.

     
  • John Baltimore

    John Baltimore - 7 days ago

    The controller is installed as a standalone instance. There are no other log files. The folder ../state only contains a lock file.

     
  • Andreas

    Andreas - 7 days ago

    Ok, next let's check systemd.

    • What is reported when you execute: sudo systemctl status controller.service ?
    • Start the Controller manually using: ./bin/controller_instance.sh start
      Does is work when manually started?
     
  • John Baltimore

    John Baltimore - 7 days ago

    This is the debug log

    2025-10-27T10:03:33,307 Begin JS7 Controller · 2.8.1 · Java 17.0.16 · OpenJDK 64-Bit Server VM 17.0.16+8-Ubuntu-0ubuntu124.04.1 (500MiB) · Linux (Linux Mint 22.2) · Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 threads) 7.6GiB · pid=34451 host=john linux machine  · started at 2025-10-27T09:03:28.331Z
    2025-10-27T10:03:40,035 End of logging
    

    I have started manually and with systemctl

    js7@john_linux_machine:~$ sudo systemctl status controller.service 
    × controller.service - SOS JS7 Controller -id=ubuntu_controller
         Loaded: loaded (/usr/lib/systemd/system/controller.service; enabled; preset: enabled)
         Active: failed (Result: exit-code) since Mon 2025-10-27 10:08:31 CET; 1min 58s ago
       Duration: 4.313s
        Process: 35072 ExecStart=/opt/sos-berlin.com/js7/controller/bin/controller_instance.sh start (code=exited, status=0/SUCCESS)
        Process: 35132 ExecStartPost=/bin/sleep 1 (code=exited, status=0/SUCCESS)
        Process: 35177 ExecStop=/opt/sos-berlin.com/js7/controller/bin/controller_instance.sh stop (code=exited, status=3)
       Main PID: 35133
            CPU: 13.940s
    
    Okt 27 10:08:25 john_linux_machine systemd[1]: Starting controller.service - SOS JS7 Controller -id=ubuntu_controller...
    Okt 27 10:08:26 john_linux_machine systemd[1]: controller.service: Supervising process 35133 which is not our child. We'll most likely not notice when it exits.
    Okt 27 10:08:26 john_linux_machine systemd[1]: Started controller.service - SOS JS7 Controller -id=ubuntu_controller.
    Okt 27 10:08:31 john_linux_machine controller_instance.sh[35177]: ...not started!
    Okt 27 10:08:31 john_linux_machine controller_instance.sh[35177]: ...could not terminate the JS7 Controller(ubuntu_controller) with pid=!
    Okt 27 10:08:31 john_linux_machine systemd[1]: controller.service: Control process exited, code=exited, status=3/NOTIMPLEMENTED
    Okt 27 10:08:31 john_linux_machine systemd[1]: controller.service: Killing process 35133 (n/a) with signal SIGKILL.
    Okt 27 10:08:31 john_linux_machine systemd[1]: controller.service: Killing process 35133 (n/a) with signal SIGKILL.
    Okt 27 10:08:31 john_linux_machine systemd[1]: controller.service: Failed with result 'exit-code'.
    Okt 27 10:08:31 john_linux_machine systemd[1]: controller.service: Consumed 13.940s CPU time, 163.2M memory peak, 0B memory swap peak.
    jobscheduler@john_linux_machine:~$ 
    
     
  • John Baltimore

    John Baltimore - 7 days ago
    Post awaiting moderation.
  • Andreas

    Andreas - 7 days ago

    This translates to the fact that systemd is killing the Controller after successful start. Prominent reasons includes that systemd does not find the Controller's pid file that on your machine might take more time to be created.

    Modify the controller.service file. You will find it in one of /etc/systemd/system or /usr/lib/systemd/system directories.

    Change the following entry from "sleep 1" to "sleep 3"

    ExecStartPost=/bin/sleep 3

    Then execute
    sudo systemctl daemon-reload
    and start the Controller from
    sudo systemctl start controller.service.

     
  • John Baltimore

    John Baltimore - 7 days ago

    same result....

     
  • Andreas

    Andreas - 7 days ago

    From your response, I didn't find a clear indication what you get in case of manual start of the Controller.

    Start the Controller manually using: ./bin/sh -x ./controller_instance.sh start

    Does is work when manually started? If no, then please forward the log output created from the above command.

     
  • John Baltimore

    John Baltimore - 6 days ago

    When I start manually, the behavior is the same. The log then looks like this.

    2025-10-28T06:26:22,022 Begin JS7 Controller · 2.8.1 · Java 17.0.16 · OpenJDK 64-Bit Server VM 17.0.16+8-Ubuntu-0ubuntu124.04.1 (500MiB) · Linux (Linux Mint 22.2) · Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 threads) 7.6GiB · pid=3256 host=john linux machine  · started at 2025-10-28T05:21.018Z
    2025-10-28T06:26:22,167 info  js7.base.system.startup.StartUp - Controller 2.8.1 · Java 17.0.16 · OpenJDK 64-Bit Server VM 17.0.16+8-Ubuntu-0ubuntu124.04.1 (500MiB) · Linux (Linux Mint 22.2) · Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 threads) 7.6GiB · pid=3256 host=john linux machine  · started at 2025-10-28T05:26:21.018Z
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    2025-10-28T06:26:22,830 info  js7.base.configutils.Configs - Reading configuration file /var/sos-berlin.com/js7/controller/config/controller.conf
    2025-10-28T06:26:23,088 info  js7.common.system.startup.ServiceMain - config=/var/sos-berlin.com/js7/controller/config data=/var/sos-berlin.com/js7/controller
    2025-10-28T06:26:24,329 info  js7.base.log.Log4j - Shutdown
    2025-10-28T06:26:24,332 End of logging
    
     
  • Andreas

    Andreas - 4 days ago

    Please, perform a few checks:

    • Are directories and files in /var/sos-berlin.com/js7/controller owned by the js7 user account?
    • Does the ./config/private.conf file exist?




    A debug log should provide more evidence.

    • Copy ./config/log4j2.xml-example to ./config/log4j2.xml
    • Change both the <property name="RootLogLevel">INFO</property> and <property name="LogLevelOfDebugLog">OFF</property> to DEBUG in log4j2.xml




    For details see JS7 - Log Levels and Debug Options

     

    Last edit: Andreas 4 days ago
  • John Baltimore

    John Baltimore - 4 days ago

    The 'private.conf' file could not be found in the 'config' folder. I copied the example file from the private folder there. However, the controller still does not start. Having reviewed the debug log, I suspect that the file belongs in the config/private directory. I moved it there:

    2025-10-29T18:28:07,504 debug js7.base.configutils.Configs - No configuration file /var/sos-berlin.com/js7/controller/config/private/private.conf
    

    After that, the controller started.
    Thank you very much for your support.

     
  • Andreas

    Andreas - 4 days ago

    Sorry for indicating the wrong location. However, it's great that you found it.

    The issue boils down to the fact that the js7_install_controller.sh script should take care of providing the ./config/private/private.conf file which is required. This seems not to apply to all situations.

    Can you please forward the log output that you received when installing the Controller from the script? Should be located in /tmp/js7 as indicated by your initial post.

     
  • John Baltimore

    John Baltimore - 3 days ago

    Here is the installation log. Incidentally, I noticed that the installation fails for the same reason when using the method described here:

    https://kb.sos-berlin.com/display/JS7/JS7+-+Controller+-+Headless+Installation+on+Linux+and+Windows.

    In my opinion, the tar.gz file is missing a working default 'private.conf' file. I also think that this line should be output to the 'controller.log' file.

    2025-10-29T18:28:07,504 debug js7.base.configutils.Configs - No configuration file /var/sos-berlin.com/js7/controller/config/private/private.conf
    

    A file essential for the operation of js7 controller is missing here. Users should be able to access this information immediately without having to go through the debug log.

    -- begin of log --------------
    ./js7_install_controller.sh --tarball=/home/js7/install/js7_controller_unix.2.8.1.tar.gz --home=/opt/sos-berlin.com/js7/controller --data=/var/sos-berlin.com/js7/controller --user=js7 --exec-start=sudo systemctl start controller.service --home-owner=js7:js7 --data-owner=js7:js7 --show-logs --log-dir=/tmp/js7 --logs=/var/sos-berlin.com/js7/controller/logs --controller-id=ubuntu_controller --http-port=4444 --service-name=controller.service --make-dirs --make-service --force-sudo
    -- begin of output -----------
    .. using tarball: /home/js7/install/js7_controller_unix.2.8.1.tar.gz
    .. extracting tarball to temporary directory: /tmp/js7_install_controller_7316.tmp
    .. copying files to extracted tarball directory: /tmp/js7_install_controller_7316.tmp/controller/ from Controller home: /opt/sos-berlin.com/js7/controller/lib/user_lib
    .. removing patches from Controller patch directory: /opt/sos-berlin.com/js7/controller/lib/patches
    .. changing ownership to js7:js7 for: /tmp/js7_install_controller_7316.tmp/controller/.
    .. copying files from extracted tarball directory: /tmp/js7_install_controller_7316.tmp/controller to Controller home: /opt/sos-berlin.com/js7/controller
    .. copying /opt/sos-berlin.com/js7/controller/bin/controller.service-example to /opt/sos-berlin.com/js7/controller/bin/controller.service
    .. updating Controller Intance Start Script: /opt/sos-berlin.com/js7/controller/bin/controller_instance.sh
    .. updating Controller systemd service file: /opt/sos-berlin.com/js7/controller/bin/controller.service
    .... updating systemd service: controller.service
    .... copying systemd service file /opt/sos-berlin.com/js7/controller/bin/controller.service to /usr/lib/systemd/system/controller.service
    .... systemd service command: sudo systemctl enable controller.service
    .... systemd service enabled: controller.service
    .... systemd service command: sudo systemctl daemon-reload
    .... systemd service configuration reloaded: controller.service
    .. changing ownership to js7:js7 for: /opt/sos-berlin.com/js7/controller
    .. changing ownership to js7:js7 for: /var/sos-berlin.com/js7/controller
    .. changing ownership to js7 for: /var/sos-berlin.com/js7/controller/logs
    .. changing ownership to js7 for: /var/sos-berlin.com/js7/controller/state
    .. starting Controller: sudo systemctl start controller.service
    -- end of log ----------------
    
     
  • Andreas

    Andreas - 3 days ago

    Hi John,

    thank you, this is helpful. In fact things are little bit more complex: we do not ship the ./config/private/private.conf file from the tarball as we know that users tend to simply extract the tarball to an existing installation directory and would inadvertedly overwrite existing configuration.

    This is why the installation script takes care of this - which it usually does, however, not in your situation. You are certainly right about missing log output at error level should the private.conf file not be available.

    We will take care of this.

     
  • John Baltimore

    John Baltimore - 3 days ago

    Thank you very much. I'm glad that I can now use JS7 on Linux.

    The thread can be closed with this summary.

    The tar installation file does not contain a private.conf file so that any existing configurations are not overwritten.

    The documentation at https://kb.sos-berlin.com/display/JS7/JS7+-+Controller+-+Headless+Installation+on+Linux+and+Windows
    will be supplemented with a note that the file private/private.conf must be created manually. A working default sample file is private/private-example.conf.

    The log output

    2025-10-29T18:28:07,504 debug js7.base.configutils.Configs - No configuration file /var/sos-berlin.com/js7/controller/config/private/private.conf
    

    will be moved to controller.log.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.