Error message JBAS015232: No java.io.Console available to interact with user. when add-user.sh script in non-interactive mode in EAP 6

Solution Verified - Updated -

Issue

  • Ran ProcessBuilder pb = new ProcessBuilder("add-user.sh", username, password) and got JBAS015232 error.
  • Ran bin/add-user.sh foo bar > /tmp/capture.log 2>&1 and getting JBAS015232 error.
  • Exception in thread "main" java.lang.IllegalStateException: JBAS015232: No java.io.Console available to interact with user.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.0
  • running add-user.sh script in non-interactive context (e.g. redirecting output or running in another script)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.