1 2 Previous Next 23 Replies Latest reply on Dec 8, 2017 12:21 AM by jaikiran pai

    Beginning with Wildfly 11 - can't add users & 'controller not available'

    nick woodward Newbie

      Hi,

      Please be gentle as I'm new to wildfly!

       

      I'm struggling to access the admin console having followed a few basic guides on how to start wildfly. I've run standalone.bat and connected to localhost:8080 fine - it results in "wildfly 11 is running". Clicking admin console advises me to run add-user.bat - which I do: it tells me that the user has been added to the relevant files (one being mgmt-user.properties for example).

      But clicking 'try again' doesn't prompt for the user - password combo, I'm just advised to add users using add-user.bat.

      I've tried re-adding the user - I'm told that the user already exists.

      I've checked mgmt-user.properties, which a tutorial has suggested should contain the added user - it doesn't.

      Running jboss-cli.bat and then connecting results in the error message 'The Controller is not available at localhost:9990 :java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: Connection refused: no further information'

      So something is definitely wrong. logs/server doesn't seem to give me any indication of what's going wrong. I've checked netstat -ano and couldn't see anything on 9990, and i've disabled my firewall: I can't imagine that would be a problem - but admittedly I'm no expert, so I'm probably doing it wrong.

      I'm at a bit of a loss what to do next? Can anyone point me in the right direction please?

      Thanks


      Nick

      *Full disclosure: I've posted the same question on stackoverflow - I don't know if that's a problem or not, I just thought this forum might be more active. jboss - wildfly - accessing the admin console - Stack Overflow

        • 1. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
          jaikiran pai Master

          nickwoodward  wrote:

           

          Running jboss-cli.bat and then connecting results in the error message 'The Controller is not available at localhost:9990 :java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: Connection refused: no further information'

          This part is odd, since you say WildFly is already serving HTTP requests at 8080. Are you sure no other version/instance of server is up and running? What does the output of the following show:

           

          <location-to-your-java-installation>/bin/jps -l

          1 of 1 people found this helpful
          • 2. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
            Paramvir Jindal Newbie

            Check the $JBOSS_HOME/standalone/log/server.log file for any error message and also see all the ports opened by wildfly this log file.

            Or else just paste the content of this log file here.

            1 of 1 people found this helpful
            • 3. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
              nick woodward Newbie

              Hi jaikiran,

              12976 C:\Users\Nick\Wildfly\jboos-modules.jar

              1700

              7171 sun.tool.jps.Jps

              Thanks for the help - I'm about to try the same thing on my desktop too, just to double check I haven't done anything stupid, but I'm really pretty stuck!

              Just out of interest - are new users recorded anywhere? Should they appear in mgmt-users.properties?

               

              Thanks again,

              Nick

              • 4. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                Darran Lofthouse Master

                FYI unless you have modified the default configuration the CLI should be able to connect to the local server using local authentication instead of requiring a username and password - I would suggest focus on the CLI for now and forget the user in the properties for the moment.

                1 of 1 people found this helpful
                • 5. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                  jaikiran pai Master

                  nickwoodward  wrote:

                   


                  Just out of interest - are new users recorded anywhere? Should they appear in mgmt-users.properties?

                   

                   

                  Yes, if you indeed did add a management user (that's what you selected as an option during add-user interactive prompt, right?), it should appear in the <wildfly-install-location>/standalone/configuration/mgmt-users.properties file.

                   

                  By the way, the output that you posted of jps command, did you edit it while pasting here. If not, that output looks odd. Either way, I'm assuming that's where you installed your WildFly and started it from right (C:\Users\Nick\Wildfly)?

                  1 of 1 people found this helpful
                  • 6. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                    nick woodward Newbie

                    yes, I'm running it from %JBOSS_HOME%/bin which is C:\Users\Nick\Wildfly, and I didn't edit that jps output.

                    <wildfly-install-location>/standalone/configuration/mgmt-users.properties ---- this is what I find particularly odd: there is no mention of any users other than the default commented out admin.

                    but if i run %JBOSS_HOME%/bin/add-user.bat and add a management user called nwoodward it will tell me that the user already exists. if I log into localhost:8080 and click on the adminconsole link it redirects me to http://localhost:9990/error/index_win.html  telling me that wildfly is running but that I need to add a user by running add-user.bat.

                    I'll post my log in the next post dlofthouse - sorry I missed your reply earlier. I have be looking at it, but it's a mixture of not having the knowledge to see what's wrong. or at the very least I'm missing it.

                    *EDIT:

                    I'm happy to focus on connecting to the server:

                    At the moment I can start the server using %JBOSS_HOME%/bin/standalone.bat, but jboss-cli.bat --connect command=:shutdown results in the 'failed to connect to the controller' message.

                    Again, I'm not sure if I'm doing this right!

                    what's the best way to show you guys the log? attach it? it's a wall of text otherwise.




                    • 7. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                      jaikiran pai Master

                      Can you not use JBOSS_HOME environment variable and instead use the exact path to your installation? Furthermore, can you post the output of:

                       

                      echo %JBOSS_HOME%

                       

                      and I didn't edit that jps output.

                      The output of that command that you pasted was:

                       

                      12976 C:\Users\Nick\Wildfly\jboos-modules.jar

                      1700

                      7171 sun.tool.jps.Jps

                      There's no such file called "jboos-modules.jar" (the correct one is jboss-modules.jar) in WildFly distribution. So again, unless this is a typo while pasting here (if that's the case then that's fine), your installation doesn't seem right.

                      1 of 1 people found this helpful
                      • 8. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                        jaikiran pai Master

                        nickwoodward  wrote:

                         



                        what's the best way to show you guys the log? attach it? it's a wall of text otherwise.




                        Attaching is a good way to do that. In your message editor window (the one you see when you hit "Reply"), there's a "Use advanced editor" option link at top right corner. You can use that to use the advanced editor which has a option to let you attach files to the post.

                        • 9. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                          nick woodward Newbie

                          Thanks jaikiran - sorry if I'm not being the easiest!

                          1) I meant I didn't intentionally edit it - yup, that's a typo, here it is run again:

                          8448 C:\Users\Nick\Wildfly\jboss-modules.jar

                          9712 sun.tools.jps.Jps

                          11948

                           

                          2) C:\Program Files\Java\jdk1.8.0_131\bin>echo %JBOSS_HOME%

                          C:\Users\Nick\Wildfly

                           

                          3) See attached log found at: C:\Users\Nick\Wildfly\standalone\log\server.txt



                          Honestly do really appreciate the help

                          Nick

                          • 10. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                            Claudio Miranda Apprentice

                            Can you try to add the user in non interactive mode and paste the output here.

                             

                            add-user.bat -u user1 -p admin123@

                            1 of 1 people found this helpful
                            • 11. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                              nick woodward Newbie

                              Added user 'user1' to file 'C:\Users\Nick\Wildfly\standalone\configuration\mgmt-users.properties'

                              Added user 'user1' to file 'C:\Users\Nick\Wildfly\domain\configuration\mgmt-users.properties'


                              I can't see the user in either file, but running the code again says the user is being updated:

                              C:\Users\Nick\Wildfly>add-user.bat -u user1 -p admin555

                              Updated user 'user1' to file 'C:\Users\Nick\Wildfly\standalone\configuration\mgmt-users.properties'

                              Updated user 'user1' to file 'C:\Users\Nick\Wildfly\domain\configuration\mgmt-users.properties'

                              Press any key to continue . . .


                              also, when trying to access the admin console its still complaining about no users:

                              [quote]"Your Wildfly application server is running. However you have not yet added any users to be able to access the admin console. To add a new user execute the add-user.bat script within the bin folder of your WildFly installation and enter the requested information."[/quote]

                              • 12. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                                jaikiran pai Master

                                This looks very odd. Before we dig in any further, can you try these 2 things and see if it helps:

                                 

                                1) Instead of installing WildFly in C:\Users\Nick\WildFly can you just install it in C:\WildFly. I am not a Windows OS user but I do remember it has some kind UAC (?) checks on certain directories.

                                 

                                2) Can you disable any Windows OS firewall, if it is currently enabled?

                                 

                                If neither of it works, please report it back and we'll see what's up. At this point though, I don't see anything obviously wrong that you might be doing.

                                • 13. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                                  Darran Lofthouse Master

                                  Is there any possibility that there is a parallel installation of WildFly where the only different in the path is the case of the names?

                                   

                                  At this stage I would say follow the recommendation from Jaikiran but also ignore the application server for now, executing add-user.bat you should see your new user being added to the file - if that is not happening there is something really bizarre going on here but moving onto looking at the application server is not likely to be productive.

                                  • 14. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                                    nick woodward Newbie

                                    I did originally have the directory in C:\Dev\Wildfly, but I deleted it and removed the environment variables as the problem still occurred there - So I can't see how there was a duplicate instance prior to that.


                                    As asked, I've now deleted C:\users\nick\wildfly, removed the environment variables,  turned off windows firewall and my personal firewall (and anti virus), and removed the old directory from the recycle bin (on the off chance...). I've also checked the port(9990) using netstat -an|find "9990". (It found nvnetworkservice as usual on restart, which I've stopped again - I've checked it's no longer running)

                                     

                                    I've now got the dir: C:\WildFly, with the system variable %JBOSS_HOME%, and I've added %JBOSS_HOME%\bin to the path.
                                    I've opened cmd prompt with admin rights, navigated to %JBOSS_HOME%, and run add-users.bat. The prompts came as expected, I chose a) Management User, 'nwoodward', my password, no groups, 'yes' for the ManagementRealm, and no for one AS connecting to another. This is the output:

                                    [quote]Added user 'nwoodward' to file 'C:\WildFly\standalone\configuration\mgmt-users.properties'

                                    Added user 'nwoodward' to file 'C:\WildFly\domain\configuration\mgmt-users.properties'

                                    Added user 'nwoodward' with groups  to file 'C:\WildFly\standalone\configuration\mgmt-groups.properties'

                                    Added user 'nwoodward' with groups  to file 'C:\WildFly\domain\configuration\mgmt-groups.properties'[/quote]

                                     

                                    The user does not appear in that file. Only the commented out admin appears.

                                    So I start the server using standalone.bat.

                                    Here are the last few lines mentioning the admin console:

                                    [quote]

                                    13:35:33,284 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server

                                    13:35:33,287 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management

                                    13:35:33,288 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

                                    13:35:33,291 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final) started in 11068ms - Started 292 of 553 services (347 services are lazy, passive or on-demand)

                                    [/quote]

                                     

                                    Netstat now finds this:

                                    C:\WINDOWS\system32>netstat -an|find "9990"

                                      TCP    127.0.0.1:9990        0.0.0.0:0              LISTENING

                                     

                                    Navigating to localhost:8080 give the landing page telling me WildFly is running.
                                    Clicking administration console redirects to http://localhost:9990/error/index_win.html telling me that I need to run add-user.bat

                                    So I click Ctrl -c to shut down. Http access stops.

                                    So I type the following and get the standard error:

                                    [quote]

                                    C:\WildFly>jboss-cli.bat

                                    You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.

                                    [disconnected /] connect

                                    The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: Connection refused: no further information

                                    [disconnected /]

                                    [/quote]

                                     

                                    _____________________________________________



                                    I've included the log file again found at C:\WildFly\standalone\log - it should only include the above.

                                    If it doesn't look like I've done anything wrong I might try going to an older version of WildFly?

                                    Thanks again

                                    Nick

                                    1 2 Previous Next