[
https://issues.redhat.com/browse/WFCORE-5257?page=com.atlassian.jira.plug...
]
Brian Stansberry commented on WFCORE-5257:
------------------------------------------
I believe this is the problem:
https://github.com/wildfly/wildfly-core/blob/14.0.0.Final/server/src/main...
The 'false' param passed to "new OutboundSocketBindingWriteHandler"
should not be a constant; it should come from an instance field kept by
OutboundSocketBindingWriteHandler and passed to its constructor by its subclasses.
RemoteDestinationOutboundSocketBindingResourceDefinition would pass 'true'.
In the reproducer scenario the outbound-socket-binding service is not started before the
write-attribute because it's not required by anything. So
OutboundSocketBindingWriteHandler tries to create a new service. But because
'false' was passed it tries to create the service for a
local-destination-outbound-socket-binding, but using a configuration model for a
remote-destination-outbound-socket-binding.
If the outbound-socket-binding is referenced, e.g. by the mail session, then the
outbound-socket-binding service is already started before the write-attribute, and
OutboundSocketBindingWriteHandler just puts the server in reload-required and the bug
isn't seen.
Service org.wildfly.network.outbound-socket-binding might not get
installed correctly
-------------------------------------------------------------------------------------
Key: WFCORE-5257
URL:
https://issues.redhat.com/browse/WFCORE-5257
Project: WildFly Core
Issue Type: Bug
Components: Management
Affects Versions: 14.0.0.Final
Reporter: Ivan Straka
Assignee: Yeray Borges Santana
Priority: Major
Attachments: standalone-ha.xml
First of all, I am not sure about the component, feel free to change it.
*Issue:*
When remoute outbound socket binding is added:
{code:java}
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=node-3:add(host=localhost,
port=7900)
{code}
I can not change fixed-source-port attribute
{code:java}
[standalone@localhost:9990 /]
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=node-3:write-attribute(name=fixed-source-port,
value=false)
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0155: 'socket-binding-ref'
may not be null",
"rolled-back" => true
}
{code}
next try ends up with different error:
{code:java}
[standalone@localhost:9990 /]
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=node-3:write-attribute(name=fixed-source-port,
value=false)
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0158: Operation handler failed:
org.jboss.msc.service.ServiceNotFoundException: service
org.wildfly.network.outbound-socket-binding.node-3 not found",
"rolled-back" => true
}
16:31:33,000 ERROR [org.jboss.as.controller.management-operation]
(management-handler-thread - 1) WFLYCTL0013: Operation ("write-attribute")
failed - address: ([
("socket-binding-group" => "standard-sockets"),
("remote-destination-outbound-socket-binding" => "node-3")
]): org.jboss.msc.service.ServiceNotFoundException: service
org.wildfly.network.outbound-socket-binding.node-3 not found
at
org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:663)
at
org.jboss.as.controller.OperationContextImpl$OperationContextServiceRegistry.getRequiredService(OperationContextImpl.java:2285)
at
org.jboss.as.server.services.net.OutboundSocketBindingWriteHandler.applyUpdateToRuntime(OutboundSocketBindingWriteHandler.java:75)
at
org.jboss.as.controller.AbstractWriteAttributeHandler$1.execute(AbstractWriteAttributeHandler.java:110)
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:1005)
at
org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:744)
at
org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:468)
at
org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1415)
at
org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:431)
at
org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:248)
at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:304)
at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:270)
at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:248)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:240)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$400(ModelControllerClientOperationHandler.java:138)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:162)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:158)
at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:328)
at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:285)
at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:158)
at
org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
at
org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:513)
{code}
However if the destination is used like the mail-smtp:
{code:java}
<subsystem xmlns="urn:jboss:domain:mail:4.0">
<mail-session name="default"
jndi-name="java:jboss/mail/Default">
<smtp-server outbound-socket-binding-ref="mail-smtp"/>
</mail-session>
</subsystem>
{code}
the attribute can be changed. See the attached xml: node-1 vs node-2.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)