0

我今天将 WildFly 服务器安装到 Eclipse 中,并且能够运行 Web 应用程序。我希望能够登录到管理控制台。我还没有启用它,所以我看到了这个:

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.

好吧,我在 Wildfly 安装的 bin 目录中运行了 add-user.bat 脚本。它似乎运行没有任何问题。我仍然得到同样的错误。

我猜 Eclipse 会复制我的 wildfly 安装并将其放在某个隐藏目录中。不知道那在哪里。有任何想法吗?

4

1 回答 1

1

Wildfly 12 管理指南的第 3.3 节描述了添加用户以便能够访问 Wildfly 管理控制台的过程:

为了操作文件和添加用户,我们提供了实用程序 add-user.sh 和 add-user.bat 来添加用户并生成哈希,要添加用户,您应该执行脚本并遵循引导过程。add-user 实用程序的详细信息将在稍后描述,但为了访问管理界面,您需要输入以下值:-

  • 用户类型 - 这将是选择选项 a 的“管理用户”。

  • 领域 - 这必须与配置中使用的领域名称匹配,因此除非您已更改配置以使用不同的领域名称,否则将此设置保留为“ManagementRealm”。

  • 用户名 - 您要添加的用户的用户名。

  • 密码 - 用户密码。

如果验证通过,您将被要求确认是否要添加用户,并且属性文件将被更新。

For the final question, as this is a user that is going to be accessing the admin console just answer 'n' - this option will be described later for adding slave host controllers that authenticate against a master domain controller but that is a later topic.

Updates to the properties file are picked up in real time so either click 'Try Again' on the error page that was displayed in the browser or navigate to the console again and you should then be prompted to enter the username and password to connect to the server.

There are a couple of potential pitfalls when running the add-user utility:

  • You must select option a) (Management User) for the type of user.
  • You must use realm ManagementRealm, though this should happen automatically if the type of user being added is Management User.

But rather than diagnosing what went wrong, it's easier just to try adding another user, following the directions given in the documentation shown above. For reference, here's a screen shot of what I did, where the yellow horizontal bars are points at which I submitted something from the keyboard:

addUserUtility

After running add-user.bat I was able to login to the Admin Console (http://localhost:9990) using the user I had just created, and no server restart was necessary. My environment was Eclipse Photon on Windows 10.

If you are still having problems, open the file mgmt-users.properties to see whether your user was added successfully. In my case a line was added for the new user that looked like this:

skomisa=82fa5e2f2de46d60adf210bb95d461f3
于 2018-09-02T01:54:34.873 回答