[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [milo-dev] ClientServerExample.java failed and fix bug ?
|
Hi Kevin,
ClientServerExample.java run successfully with Netty-4.0.36.Final.
But it failed to run with Netty-4.0.37.Final/Netty-4.1.1.Final and
output same stack trace.
I don't know why.
Do you reproduce this error with Netty-4.0.37.Final and Netty-4.1.1.Final ?
Regards,
--Shigeru
<kevinherron@xxxxxxxxx> wrote, Thu, 30 Jun 2016 21:02:15 -0700
> Well I'm not sure what to do with this report. Your patch doesn't actually
> change any behavior, the error your reported is not reproducible by running
> the example, and the security policy URI really can't be greater than 255
> bytes as per the spec, so even if you did encounter that the error is
> correct.
>
> On Thu, Jun 30, 2016 at 7:19 PM, Shigeru Ishida <ishida_shigeru@xxxxxxxxxxx>
> wrote:
>
> > Hi Kevin,
> >
> > Endpoint URLs of UaTcpStackServer is below:
> > -----
> > UaTcpStackServer startup - opc.tcp://localhost:12685/example bound to /
> > 127.0.0.1:12685 [None/None]
> > UaTcpStackServer startup - opc.tcp://localhost:12685/example bound to /
> > 127.0.0.1:12685 [Basic128Rsa15/SignAndEncrypt]
> >
> > I tried to run ClientServerExample.java with Java8/Apache Felix 4.6.1
> > on Windows 7 (64bit) (using Netty 4.1.1.Final).
> >
> > Regards,
> >
> > --Shigeru
> >
> > <kevinherron@xxxxxxxxx> wrote, Thu, 30 Jun 2016 06:08:17 -0700
> >
> > > This error does not happen for me when I run ClientServerExample. What
> > > endpoint URLs did UaTcpStackServer log that it was binding to on startup?
> > >
> > > On Wed, Jun 29, 2016 at 11:08 PM, Shigeru Ishida <
> > ishida_shigeru@xxxxxxxxxxx
> > > > wrote:
> > >
> > > > Hi Kevin,
> > > >
> > > > I tried to run ClientServerExample.java and this stack trace was output
> > > > below.
> > > >
> > > > ClientServerExample.java)
> > > > -----
> > > >
> > > >
> > https://github.com/eclipse/milo/blob/master/opc-ua-stack/stack-examples/src/main/java/org/eclipse/milo/opcua/stack/examples/ClientServerExample.java
> > > >
> > > > stack trace)
> > > > -----
> > > >
> > org.eclipse.milo.opcua.stack.server.handlers.UaTcpServerAsymmetricHandler
> > > > exceptionCaught - [remote=/127.0.0.1:53797] Exception caught; sent
> > > > ErrorMessage{error=StatusCode{name=Bad_UnexpectedError,
> > > > value=0x80010000, quality=bad},
> > reason=java.lang.IllegalArgumentException:
> > > > securityPolicyUri length cannot be greater than 255 bytes}
> > > > io.netty.handler.codec.DecoderException:
> > > > java.lang.IllegalArgumentException: securityPolicyUri length cannot be
> > > > greater than 255 bytes
> > > > at
> > > >
> > io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:442)
> > > > at
> > > >
> > io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
> > > > at
> > > >
> > io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> > > > at
> > > >
> > io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:334)
> > > > at
> > > >
> > io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:326)
> > > > at
> > > >
> > io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1320)
> > > > at
> > > >
> > io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> > > > at
> > > >
> > io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:334)
> > > > at
> > > >
> > io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:905)
> > > > at
> > > >
> > io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
> > > > at
> > > >
> > io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:563)
> > > > at
> > > >
> > io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:504)
> > > > at
> > > >
> > io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:418)
> > > > at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:390)
> > > > at
> > > >
> > io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:742)
> > > > at java.lang.Thread.run(Unknown Source)
> > > > Caused by: java.lang.IllegalArgumentException: securityPolicyUri length
> > > > cannot be greater than 255 bytes
> > > > at
> > > >
> > com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
> > > > at
> > > >
> > org.eclipse.milo.opcua.stack.core.channel.headers.AsymmetricSecurityHeader.<init>(AsymmetricSecurityHeader.java:44)
> > > > at
> > > >
> > org.eclipse.milo.opcua.stack.core.channel.headers.AsymmetricSecurityHeader.decode(AsymmetricSecurityHeader.java:139)
> > > > at
> > > >
> > org.eclipse.milo.opcua.stack.server.handlers.UaTcpServerAsymmetricHandler.onOpenSecureChannel(UaTcpServerAsymmetricHandler.java:134)
> > > > at
> > > >
> > org.eclipse.milo.opcua.stack.server.handlers.UaTcpServerAsymmetricHandler.decode(UaTcpServerAsymmetricHandler.java:103)
> > > > at
> > > >
> > io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)
> > > > ... 15 more
> > > > -----
> > > >
> > > > Therefore I modified decode() method in AsymmetricSecurityHeader.java
> > and
> > > > run it successfully. I will send this patch to you.
> > > >
> > > > Regards,
> > > >
> > > > --Shigeru
> > _______________________________________________
> > milo-dev mailing list
> > milo-dev@xxxxxxxxxxx
> > To change your delivery options, retrieve your password, or unsubscribe
> > from this list, visit
> > https://dev.eclipse.org/mailman/listinfo/milo-dev