Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when running with ansible shell module #1150

Open
neshtaMedia opened this issue Sep 24, 2024 · 0 comments
Open

Exception when running with ansible shell module #1150

neshtaMedia opened this issue Sep 24, 2024 · 0 comments

Comments

@neshtaMedia
Copy link

Ansible command:

- name: Build project
  local_action:
    module: shell
    cmd: "mvnd --batch-mode --log-file build_log.txt --projects web/{{ artifact_name }} clean verify --also-make"
    args:
      chdir: ../../
  run_once: true

Exception in thread "main" java.lang.RuntimeException: Could not write to build_log.txt\n\tat org.mvndaemon.mvnd.common.logging.TerminalOutput$FileLog.accept(TerminalOutput.java:907)\n\tat org.mvndaemon.mvnd.common.logging.TerminalOutput.doAccept(TerminalOutput.java:333)\n\tat org.mvndaemon.mvnd.common.logging.TerminalOutput.accept(TerminalOutput.java:204)\n\tat org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:399)\n\tat org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:169)\n\tat java.base@22.0.1/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)\nCaused by: java.io.IOException: Stream closed\n\tat java.base@22.0.1/java.io.BufferedWriter.ensureOpen(BufferedWriter.java:132)\n\tat java.base@22.0.1/java.io.BufferedWriter.implWrite(BufferedWriter.java:325)\n\tat java.base@22.0.1/java.io.BufferedWriter.write(BufferedWriter.java:313)\n\tat java.base@22.0.1/java.io.Writer.write(Writer.java:278)\n\tat org.mvndaemon.mvnd.common.logging.TerminalOutput$FileLog.accept(TerminalOutput.java:904)\n\t... 5 more", "stderr_lines": ["Sep 24, 2024 4:46:27 PM org.jline.utils.Log logr", "WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)", "[main] WARNING org.jline - Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)", "[main] WARNING org.mvndaemon.mvnd.client.DaemonParameters - Falling back to finding JAVA_HOME by running java executable available in PATH. You may want to avoid this time consuming task by setting JAVA_HOME environment variable or by passing java.home system property through command line or in one of mvnd configuration files.", "Exception in thread "main" java.lang.RuntimeException: Could not write to build_log.txt", "\tat org.mvndaemon.mvnd.common.logging.TerminalOutput$FileLog.accept(TerminalOutput.java:907)", "\tat org.mvndaemon.mvnd.common.logging.TerminalOutput.doAccept(TerminalOutput.java:333)", "\tat org.mvndaemon.mvnd.common.logging.TerminalOutput.accept(TerminalOutput.java:204)", "\tat org.mvndaemon.mvnd.client.DefaultClient.execute(DefaultClient.java:399)", "\tat org.mvndaemon.mvnd.client.DefaultClient.main(DefaultClient.java:169)", "\tat java.base@22.0.1/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)", "Caused by: java.io.IOException: Stream closed", "\tat java.base@22.0.1/java.io.BufferedWriter.ensureOpen(BufferedWriter.java:132)", "\tat java.base@22.0.1/java.io.BufferedWriter.implWrite(BufferedWriter.java:325)", "\tat java.base@22.0.1/java.io.BufferedWriter.write(BufferedWriter.java:313)", "\tat java.base@22.0.1/java.io.Writer.write(Writer.java:278)", "\tat org.mvndaemon.mvnd.common.logging.TerminalOutput$FileLog.accept(TerminalOutput.java:904)", "\t... 5 more"], "stdout": "", "stdout_lines": []}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant