[
https://issues.jboss.org/browse/WFCORE-48?page=com.atlassian.jira.plugin....
]
Brian Stansberry commented on WFCORE-48:
----------------------------------------
Sounds then like there's a problem in the protocol or in the client, such that the
failure isn't being properly handled client side. Emanuel Muckenhuber may be able to
provide some tips or feedback on proposed fixes this week. After that we're on our
own. ;)
Your initial comment yesterday mentioned
ModelControllerClientOperationHandler.sendPreparedResponse failing. Once the problem
communicating failures is fixed, that method should be made robust, to catch any exception
thrown while it's analyzing the op and just return false. That behavior satisfies the
intent of that method, which is to detect valid reload calls.
I assume it will just fail later on though, in ModelControllerImpl (probably L356), and
there MCI can probably be improved to validate the op and return an OperationResponse with
a nice error message.
EOFException when address of a mgmt operation is of a bad data type
-------------------------------------------------------------------
Key: WFCORE-48
URL:
https://issues.jboss.org/browse/WFCORE-48
Project: WildFly Core
Issue Type: Bug
Components: Domain Management
Reporter: Ladislav Thon
Assignee: Emmanuel Hugonnet
(Hopefully this belongs to WildFly Core. If not, please move to WildFly.)
I'm doing a programmatic invocation of a simple mgmt operation on the root mgmt
resource, say e.g. {{:whoami}}. I'm doing this against a freshly built WildFly from
master branch (commit {{e2b9ecfb}}) and on the client side, I'm depending on
{{org.wildfly.core:wildfly-controller-client:1.0.0.Alpha4}}.
The code looks like this:
{code:java}
ModelControllerClient client =
ModelControllerClient.Factory.create("localhost", 9990);
try {
ModelNode op = new ModelNode();
op.get(ClientConstants.OP).set("whoami");
op.get(ClientConstants.OP_ADDR).set("");
ModelNode result = client.execute(op);
System.out.println(result);
} finally {
client.close();
}
{code}
This fails with an exception like this:
{code}
Exception in thread "main" java.io.IOException:
java.util.concurrent.ExecutionException: Operation failed
at
org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
at
org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
at cz.ladicek.wildfly.ErrorReproducer.main(ErrorReproducer.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.util.concurrent.ExecutionException: Operation failed
at org.jboss.threads.AsyncFutureTask.operationFailed(AsyncFutureTask.java:74)
at org.jboss.threads.AsyncFutureTask.get(AsyncFutureTask.java:268)
at
org.jboss.as.controller.client.impl.AbstractDelegatingAsyncFuture.get(AbstractDelegatingAsyncFuture.java:100)
at
org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)
... 7 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at org.jboss.as.protocol.mgmt.ProtocolUtils.expectHeader(ProtocolUtils.java:83)
at
org.jboss.as.controller.client.impl.AbstractModelControllerClient$1.handleRequest(AbstractModelControllerClient.java:167)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:270)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleRequest(AbstractMessageHandler.java:235)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:113)
at
org.jboss.as.protocol.mgmt.ManagementChannelReceiver$1.handleMessage(ManagementChannelReceiver.java:56)
at
org.jboss.as.protocol.mgmt.ManagementChannelReceiver.handleMessage(ManagementChannelReceiver.java:84)
at
org.jboss.remoting3.remote.RemoteConnectionChannel$5.run(RemoteConnectionChannel.java:452)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
{code}
However, when I remove the line that sets {{address}}
({{op.get(ClientConstants.OP_ADDR).set("");}}), it works just fine.
Fine, I made a mistake, but getting an {{EOFException}}? That's hardly an appropriate
response. I should get a proper failure ({{"outcome" => "failed"}}
etc.).
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)