NickW
NickW

Reputation: 1334

wildfly - accessing the admin console

I'm new to wildfly and am following the documentation on how to get everything set up. I've added a user by running the add-user.bat script, but the administration console page is still telling me I haven't - even though trying to re-add the same user results in the cmd line telling me that the user already exists.

enter image description here

The wildfly documentation, and other guides, make it out to be simple : I'm not sure what I could possibly have missed. I set up the user as a management user, didn't make them belong to any groups, didn't change the realm and answered no to the last question I don't understand.

I also restarted Wildfly and my PC.

Is there any file I should look in to see if the user is correctly set up?

I assume it's mgmt-users.properties - but the user doesn't exist in that file.

Any help would be appreciated!

Upvotes: 4

Views: 15578

Answers (4)

pbuchheit
pbuchheit

Reputation: 1607

Something else to be aware of if anyone runs into this. By default, the script assumes your deployment folder is named 'standalone'. If you have renamed this folder, the user will get created but the changes will not actually get applied to the server.

To fix this, simply open up the add-user script in a text editor and look for a commented out line that looks like

#JAVA_OPTS="$JAVA_OPTS -Djboss.server.config.user.dir=../standalone/configuration -Djboss.domain.config.user.dir=../domain/configuration"

Uncomment that line and change the path to match your directory name.

Upvotes: 2

Martin Choma
Martin Choma

Reputation: 124

Yes, mgmt-users.properties should be edited. If it is empty, why does it tell you user already exists? Can you check permissions of file?

Upvotes: 1

NickW
NickW

Reputation: 1334

If anyone suffers from a similar problem I've discovered that this is a bug in WildFly 11.

I'm sure this is probably a pretty narrow problem, but swapping the directory for WildFly 10 fixes the issues of not being able to connect to the admin console and not being able to add users.

Upvotes: 1

J. Param
J. Param

Reputation: 11

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

You can use the following netstat command also to check all the ports opened by wildfly process ID:

netstat -tnlpa | grep

It might be possible that some other process is already using this port 9990.

-Param

Upvotes: 1

Related Questions