Bug 1015585 - Adding a new role mapping and then restarting the server via mgmt interface fails
Summary: Adding a new role mapping and then restarting the server via mgmt interface f...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Domain Management
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER6
: EAP 6.2.0
Assignee: Darran Lofthouse
QA Contact: Ladislav Thon
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks: 999622
TreeView+ depends on / blocked
 
Reported: 2013-10-04 14:29 UTC by Ladislav Thon
Modified: 2013-12-15 16:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:23:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-2220 0 Critical Resolved Unable to reload server after adding role and executing :reload 2016-04-06 17:29:49 UTC

Description Ladislav Thon 2013-10-04 14:29:03 UTC
Description of problem:

When you add a new role mapping and then request a server restart via the management interface, your server will crash.

Version-Release number of selected component (if applicable):

EAP 6.2.0.ER4

How reproducible:

Always

Steps to Reproduce:
1. start a new server
   ./bin/standalone.sh
2. run CLI
   ./bin/jboss-cli.sh -c
3. add a new role mapping
   /core-service=management/access=authorization/role-mapping=Operator:add()
4. restart the server
   :reload

Actual results:

The server restarts fine with no error message.

Expected results:

The server "crashes" with an error message:

16:24:48,601 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([
    ("core-service" => "management"),
    ("access" => "authorization"),
    ("role-mapping" => "SuperUser")
]): java.lang.UnsupportedOperationException
	at java.util.Collections$UnmodifiableMap.put(Collections.java:1283) [rt.jar:1.6.0_45]
	at org.jboss.as.controller.access.management.WritableAuthorizerConfiguration.addRoleMappingImmediate(WritableAuthorizerConfiguration.java:163) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.domain.management.access.RoleMappingAdd$1.execute(RoleMappingAdd.java:76) [jboss-as-domain-management-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:624) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:502) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:285) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:280) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:277) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:288) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.server.ServerService.boot(ServerService.java:349) [jboss-as-server-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.server.ServerService.boot(ServerService.java:324) [jboss-as-server-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:250) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

16:24:48,609 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.remoting.endpoint.management (missing) dependents: [service jboss.remoting.management.channel.registry] 

16:24:48,611 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
16:24:48,617 INFO  [org.jboss.as.controller] (MSC service thread 1-6) JBAS014774: Service status report
JBAS014776:    Newly corrected services:
      service jboss.remoting.endpoint.management (no longer required)

16:24:48,619 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015950: JBoss EAP 6.2.0.Beta1 (AS 7.3.0.Final-redhat-7) stopped in 4ms

Additional info:

Note that it's not even necessary to enable the "rbac" provider. Also note that after the server crashes, it can be started just fine, suggesting that there's probably something wrong in the runtime model.

Comment 1 Ladislav Thon 2013-10-04 14:30:11 UTC
Meh, once again I swapped the "actual" and "expected" results :-(

Comment 6 Ladislav Thon 2013-10-21 10:35:10 UTC
Verified with EAP 6.2.0.ER6.


Note You need to log in before you can comment on or make changes to this bug.