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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content