Always Java Application Ends with "Exit 143" Ubuntu
I have an application in java that is constantly being pulled. Run it as follows:
nohup ant> log.txt & The problem is that the last unspecified time, the application terminates and receives the message "Exit 143".
Exit code 143 corresponds to SIGTERM , which is the default signal sent when kill <pid> run. Is it possible that another process or user is killing the application? Without additional information, it is difficult to suggest anything else.
I ran into a similar problem when using nodejs, and it turned out that actually my application and my code were killing it.
I had code like this (well, I don't have function names like this, but you understand):
kill_anything_that_is_still_running_from_previous_execution() start_a_lot_of_stuff() The problem was that kill_anything_that_is_still_running_from_previous_execution was asynchronous and returned immediately (and due to bad "luck") the actual part of the killing always ended only after start_a_lot_of_stuff completed, which is clearly not very large. #spawncamping
Oh, and in Java Runtime.getRuntime().exec("bash -c \"killall whatever\"") is "asynchronous" if you did not wait for it to exit.