1 2 Previous Next 23 Replies Latest reply on Dec 8, 2017 12:21 AM by jaikiran Go to original post
      • 15. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
        nickwoodward

        It seems it's a bug:

        I deleted the WildFly 11 folder structure and extracted 10 to the same place. Everything worked fine - adding users, accessing the admin console.
        Swapping back to WildFly 11 broke everything again.

        Thanks to everyone for helping look into this. Definitely feel more confident about WildFly now!

        Nick

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

          Yes, there's definitely some issue here. I don't have a Windows OS to try and experiment a few things but either way, some of us might be able to look more into this. In the meantime, can you try upgrading the JDK to latest available Java 8 update from Oracle (I see you are on 131 update of Java 8) and try WildFly 11 with it? I don't expect it to make a difference, but given the nature of the issue, I just want to rule out any such oddities?

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

            One other thing, can you please attach the following files please:

             

            'C:\WildFly\standalone\configuration\mgmt-users.properties'

            'C:\WildFly\domain\configuration\mgmt-users.properties'

            'C:\WildFly\standalone\configuration\mgmt-groups.properties'

            'C:\WildFly\domain\configuration\mgmt-groups.properties'

             

            that (supposedly as per the tool) got updated after you ran the add-user.bat tool? If you cleaned up WildFly 11, you will have to reinstall and rerun that tool (and reproduce the issue), before attaching those files please.

             

            The Windows OS user under which you are running this process, is it a admin user/role or is it a regular user?

            • 18. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
              nickwoodward

              I ran the update from the taskbar prompt and checked the version in the cmd line - It might not be enough though as the WildFly log stated I'm still on JDK 131. I'm on a train at the moment so updating is a bit of a pain, let me know if this has updated correctly:

              java 1.8.0_151-b12

              javac 1.8.0_131

               

              Replaced the WildFly directory with 11.0, added a user called 'nickwoodward' (confirmed in the command line) and replicated the problem again RE no users in the properties files and no access to the admin console.

               

              I've included the server log as well incase it helps.

               

              Let me know if you need anything else

               

              Nick

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

                Thank you for attaching these logs. I had an extensive look at the WildFly code, the logs and few other things to try and figure out what can lead to this issue. Unfortunately, I haven't found anything that explains this situation. To summarize:

                 

                - WildFly 11.0.0.Final's add-user.bat isn't functional on your setup. The messages and logs do indicate that it's writing to the correct file(s). Furthermore, a subsequent add-user attempt (in totally new JVM process) does tell you that the (same) user already exists, so it definitely is writing it out, except that you don't see it in the target files.

                 

                - WildFly 10.1.0.Final is working fine for you on the same setup.

                 

                - jboss-cli connection too runs failures (it should have passed with $local auth mechanism) in WildFly 11.0.0.Final.

                 

                The only suspicions I have right now (both of which don't fully make sense and aren't backed by what I see in the code):

                 

                - There's some kind of symlinking going on probably(?) where the add-user writes (and reads) to/from a different file but reports that it's written to the correct location (C:\WildFly\standalone\configuration\mgmt-users.properties). However, I can't think how this would even be possible in a way that only add-user seems to be dealing with this symlink and not the actual WildFly process that you start.

                 

                - Some code or some (other) process updates those files right after the add-user.bat's last step in the user addition process. This however isn't a path to pursue since as you note, a subsequent add-user.bat (in a new process) does end up noticing the previously added user.

                 

                - Some kind of a permission issue on the directory/file(s) which causes even jboss-cli to fail.

                 

                In all this, I do believe there's some bug that's causing this. I don't think this is a issue with the way the user is setting up things, mainly because if that was the case, I would expected a much more clearer explanation of this situation.

                 

                If you are willing to continue helping in debugging this, we could try a few things. The first of which is:

                 

                - Copy the attached logging.properties into your WildFly 11.0.0.Final installations bin folder (C:\WildFly\bin\logging.properties)

                - Edit the add-user.bat file of your WildFly 11 installation to include the following line:

                 

                JAVA_OPTS=-Dlogging.configuration=file:///C:/WildFly/bin/logging.properties

                 

                (add this line just before the line which looks like "%JAVA%" %JAVA_OPTS% ^ ....)

                 

                - Redo the steps of user addition (use a new user if needed) and reproduce this issue.

                 

                This logging.properties is configured to capture logs at DEBUG level and write to a file called add-user.log. Once you have reproduced this issue, please attach the generated add-user.log file (which you will find in the bin folder) to this thread and also attach the output that you see on the console when you followed the interactive steps of add-user.bat (I know you already pasted that once but please do attach it again, just so that we can co-relate it with the newer logs).

                 

                This might just be first of many to and fro attempts we might have to try and narrow this issue down. I don't have access to Windows 10 so can't test it myself. I haven't seen anyone else report this issue on Windows 10 either so I suspect this might be very specific to the system you are on and hence we would need to try and narrow it down to something specific on your system.

                • 20. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                  nickwoodward

                  Sorry Jaikiran, I've had a long day and I lost the will to fight the forum over whether I could quote you multiple times, so I've included my answers in bold. Hope that's ok.

                   

                   

                  jaikiran  wrote:

                   

                  Thank you for attaching these logs. I had an extensive look at the WildFly code, the logs and few other things to try and figure out what can lead to this issue. Unfortunately, I haven't found anything that explains this situation. To summarize:

                   

                  - WildFly 11.0.0.Final's add-user.bat isn't functional on your setup. The messages and logs do indicate that it's writing to the correct file(s). Furthermore, a subsequent add-user attempt (in totally new JVM process) does tell you that the (same) user already exists, so it definitely is writing it out, except that you don't see it in the target files.

                  Yes, that seems to be what is happening.

                   

                  - WildFly 10.1.0.Final is working fine for you on the same setup.

                  Everything seems fine when I start using standalone.bat. But I've just discovered that I never checked if WildFly 10 could connect with jboss-cli --connect --controller=localhost:9990. And it can't:

                  Failed to connect to the controller: The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting://localhost:9990.

                  I only checked today because I was trying to package an mvn project and got this runtime error:

                  java.lang.RuntimeException: java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting://127.0.0.1:9990. The connection failed

                  which seemed similar. not sure if this helps identify a problem.

                   

                  - jboss-cli connection too runs failures (it should have passed with $local auth mechanism) in WildFly 11.0.0.Final.

                   

                  The only suspicions I have right now (both of which don't fully make sense and aren't backed by what I see in the code):

                   

                  - There's some kind of symlinking going on probably(?) where the add-user writes (and reads) to/from a different file but reports that it's written to the correct location (C:\WildFly\standalone\configuration\mgmt-users.properties). However, I can't think how this would even be possible in a way that only add-user seems to be dealing with this symlink and not the actual WildFly process that you start.

                   

                  - Some code or some (other) process updates those files right after the add-user.bat's last step in the user addition process. This however isn't a path to pursue since as you note, a subsequent add-user.bat (in a new process) does end up noticing the previously added user.

                   

                  - Some kind of a permission issue on the directory/file(s) which causes even jboss-cli to fail.

                   

                  In all this, I do believe there's some bug that's causing this. I don't think this is a issue with the way the user is setting up things, mainly because if that was the case, I would expected a much more clearer explanation of this situation.

                  Yes, in WildFly 11 the user is 'there' when you try to add them a second time, but isn't present in the standalone user files and the localhost:8080 doesn't acknowledge that you've added them when you try to navigate to the admin console..

                  In WildFly 10 this isn't a problem, I can access the admin console and it authenticates me with the user I added.

                   

                  As for permissions - I'm not sure - I'm running everything from C:\WildFly in administrator mode : checking my windows account states that I'm a 'local user' and 'administrator'. This isn't an area I'm particularly familiar with though. To make sure, I elevated the 'Users' permission to Full Control in the WildFly folder security section.

                   

                   

                  If you are willing to continue helping in debugging this, we could try a few things. The first of which is:

                  Of course, if you think it would help out more generally - otherwise I'd probably prefer to try and get version 10 running correctly as it seems to be behaving better. However I guess both problems are likely related.

                   

                  - Copy the attached logging.properties into your WildFly 11.0.0.Final installations bin folder (C:\WildFly\bin\logging.properties)

                  - Edit the add-user.bat file of your WildFly 11 installation to include the following line:

                   

                  JAVA_OPTS=-Dlogging.configuration=file:///C:/WildFly/bin/logging.properties

                   

                  (add this line just before the line which looks like "%JAVA%" %JAVA_OPTS% ^ ....)

                   

                  - Redo the steps of user addition (use a new user if needed) and reproduce this issue.

                   

                  This logging.properties is configured to capture logs at DEBUG level and write to a file called add-user.log. Once you have reproduced this issue, please attach the generated add-user.log file (which you will find in the bin folder) to this thread and also attach the output that you see on the console when you followed the interactive steps of add-user.bat (I know you already pasted that once but please do attach it again, just so that we can co-relate it with the newer logs).

                   

                  This might just be first of many to and fro attempts we might have to try and narrow this issue down. I don't have access to Windows 10 so can't test it myself. I haven't seen anyone else report this issue on Windows 10 either so I suspect this might be very specific to the system you are on and hence we would need to try and narrow it down to something specific on your system.

                   

                  I added the logging.properties file to the bin folder, but after I edited the add-user.bat file and ran it I got:

                  "'JAVA_OPTS' is not recognized as an internal or external command, operable program or batch file."


                  I noticed that some of the previous (commented) code used 'set', and then very similar syntax, so I tried that too.
                  'set JAVA_OPTS=-Dlogging.configuration=file:///C:/WildFly/bin/logging.properties'

                  it ran, but no luck as I cannot see any add-user.log file in the bin directory.


                  I've added my add-user.bat file if you can see how it should be rewritten

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

                    nickwoodward  wrote:

                     

                    Sorry Jaikiran, I've had a long day and I lost the will to fight the forum over whether I could quote you multiple times, so I've included my answers in bold. Hope that's ok.

                     

                    Yes, that's fine. The forum editor isn't the best and even I often have trouble having it behave properly.

                     

                    nickwoodward  wrote:

                     

                     

                     

                    If you are willing to continue helping in debugging this, we could try a few things. The first of which is:

                    Of course, if you think it would help out more generally - otherwise I'd probably prefer to try and get version 10 running correctly as it seems to be behaving better.

                     

                    You can stick with WildFly 10 and continue your work since it's allowing you to proceed with your actual work. At this point what we are trying to do is mainly an exercise towards understanding why WildFly 11 is behaving in this manner and if there's some bug that needs to be fixed in it. So whatever help you are providing so far is really appreciated.

                    nickwoodward  wrote:

                     

                    Sorry Jaikiran, I've had a long day and I lost the will to fight the forum over whether I could quote you multiple times, so I've included my answers in bold. Hope that's ok.

                     

                     

                    jaikiran   wrote:

                     

                    atch file."


                    I noticed that some of the previous (commented) code used 'set', and then very similar syntax, so I tried that too.
                    'set JAVA_OPTS=-Dlogging.configuration=file:///C:/WildFly/bin/logging.properties'

                    it ran, but no luck as I cannot see any add-user.log file in the bin directory.


                    I've added my add-user.bat file if you can see how it should be rewritten

                     

                    The changes you did (in the file you attached) look good and I expect it to create that log file. Can you do a Windows "search" of the filesystem to see if the add-user.log file got created in some other place than the bin folder? If you do find it, please attach it. That also reminds me - can you also do a windows search for "mgmt-users.properties" file and see if such a file exists in some other place(s) other than the WildFly 11 installation? (of course, you can ignore the files that you find in WildFly 10 installation, from this search). If you do find them, please attach that too.

                     

                    Thanks again for patiently helping out in this debugging.

                    • 22. Re: Beginning with Wildfly 11 - can't add users & 'controller not available'
                      nickwoodward

                      jaikiran  wrote:

                       

                      The only suspicions I have right now (both of which don't fully make sense and aren't backed by what I see in the code):

                       

                      - There's some kind of symlinking going on probably(?) where the add-user writes (and reads) to/from a different file but reports that it's written to the correct location (C:\WildFly\standalone\configuration\mgmt-users.properties). However, I can't think how this would even be possible in a way that only add-user seems to be dealing with this symlink and not the actual WildFly process that you start.

                       

                      - Some code or some (other) process updates those files right after the add-user.bat's last step in the user addition process. This however isn't a path to pursue since as you note, a subsequent add-user.bat (in a new process) does end up noticing the previously added user.

                       

                      Ugh......

                      I searched for both duplicate folder structures and files previously - because as you've said, that's what it looks like is happening. I have no idea why they hadn't appeared, or why add-user.log did.

                      It was Comodo Internet Security, which I had previously checked, it was sandboxing everything but not reporting or giving any indication that it was doing so. Turning it off didn't seem to make any odds - turning off the feature has. The files and folders for (several) WildFly versions were contained in VTRoot/harddiskvolume3/WildFly, and weren't appearing in any searches. For some reason WildFly 10 took precedence over these shadow versions, but 11 didn't.

                      I'm both incredibly annoyed for not noticing and relieved that it's now working. Apologies for wasting your time - thanks for helping though. Hopefully this will at least help someone else if they come across the same issue.

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

                        nickwoodward  wrote:



                        It was Comodo Internet Security, which I had previously checked, it was sandboxing everything but not reporting or giving any indication that it was doing so. Turning it off didn't seem to make any odds - turning off the feature has. The files and folders for (several) WildFly versions were contained in VTRoot/harddiskvolume3/WildFly, and weren't appearing in any searches. For some reason WildFly 10 took precedence over these shadow versions, but 11 didn't.

                        I'm both incredibly annoyed for not noticing and relieved that it's now working. Apologies for wasting your time - thanks for helping though. Hopefully this will at least help someone else if they come across the same issue.

                         

                        Good to know you finally got it solved. I looked at what Comodo Internet Security is and how it managed to do what it did, in this case. Reading through it's documentation[1] and it does explain how it ended up in this situation. Looks like it considered the add-user.bat in WildFly 11 as untrusted file and sandboxed it.

                         

                        nickwoodward  wrote:



                        I'm both incredibly annoyed for not noticing and relieved that it's now working. Apologies for wasting your time - thanks for helping though. Hopefully this will at least help someone else if they come across the same issue.

                         

                        No problem and I'm sure this will help other Windows users who might run into this. At least, this is one another item that we can ask other users to check when they run into similar issues.

                         

                        [1] Introduction to the 5.x sandbox - Defense+ / Sandbox Help - CIS

                        1 2 Previous Next