Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-2305

add-user utility reports "No java.io.Console available to interact with user." when used silently with su and piped to a file.

    XMLWordPrintable

Details

    • Hide

      [tom@orac bin]$ ./add-user.sh --silent=true foo bar > /tmp/capture.log 2>&1
      [tom@orac bin]$ cat /tmp/capture.log
      Exception in thread "main" java.lang.IllegalStateException: JBAS015232: No java.io.Console available to interact with user.
      at org.jboss.as.domain.management.security.adduser.AddUser.<init>(AddUser.java:101)
      at org.jboss.as.domain.management.security.adduser.AddUser.main(AddUser.java:222)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.jboss.modules.Module.run(Module.java:292)
      at org.jboss.modules.Main.main(Main.java:455)

      Show
      [tom@orac bin] $ ./add-user.sh --silent=true foo bar > /tmp/capture.log 2>&1 [tom@orac bin] $ cat /tmp/capture.log Exception in thread "main" java.lang.IllegalStateException: JBAS015232: No java.io.Console available to interact with user. at org.jboss.as.domain.management.security.adduser.AddUser.<init>(AddUser.java:101) at org.jboss.as.domain.management.security.adduser.AddUser.main(AddUser.java:222) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.modules.Module.run(Module.java:292) at org.jboss.modules.Main.main(Main.java:455)

    Description

      Running add-user.sh in silent mode and redirecting the output to a file results in an exception:

      Exception in thread "main" java.lang.IllegalStateException: JBAS015232: No java.io.Console available to interact with user.

      Attachments

        Issue Links

          Activity

            People

              darran.lofthouse@redhat.com Darran Lofthouse
              tfonteyn Tom Fonteyne (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: