Re: [Dev] C5 - mention the port in use as part of error message

2016-04-04 Thread Isuru Udana
Hi All,

+1. It should be handled at the transport level. We will see the
possibility of handling this.

Created a jira to track this.
https://wso2.org/jira/browse/CTRANSPORT-5

Thanks.

On Mon, Apr 4, 2016 at 1:09 PM, Sameera Jayasoma  wrote:

> +1 This should be handled at the Carbon-transport layer.
>
> On Mon, Apr 4, 2016 at 12:50 PM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> Yes, the error message needs to be more descriptive. Looks like this is
>> coming all the way from NettyListener (carbon-transports) [1] and we do not
>> have a way to catch this error as the bind call is started using a thread
>> in netty and it is the one which logs this error too.
>>
>> @IsuruR and IsuruU, do we have way to fix this from calling netty api
>> level?
>>
>> [1]
>> https://github.com/wso2/carbon-transports/blob/master/http/netty/components/org.wso2.carbon.transport.http.netty/src/main/java/org/wso2/carbon/transport/http/netty/listener/NettyListener.java#L106
>>
>> On Mon, Apr 4, 2016 at 8:40 AM, Sumedha Rubasinghe 
>> wrote:
>>
>>> It's port 8080 that is being used here. But no way to find that through
>>> the exception through from
>>> Netty HTTP Transport listener.
>>>
>>>
>>> 
>>> [2016-04-04 08:37:03,872]  INFO
>>> {org.wso2.carbon.transport.http.netty.listener.NettyListener} - Starting
>>> Netty Http Transport Listener
>>> [2016-04-04 08:37:03,876]  INFO
>>> {org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
>>> org.wso2.carbon.uuf.UUFService@5f33122c
>>> Exception in thread "Timer-0" java.net.BindException: Address already in
>>> use
>>> at sun.nio.ch.Net.bind0(Native Method)
>>> at sun.nio.ch.Net.bind(Net.java:433)
>>> at sun.nio.ch.Net.bind(Net.java:425)
>>> at
>>> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
>>> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
>>> at
>>> io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
>>> at
>>> io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:485)
>>> at
>>> io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1089)
>>> at
>>> io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:430)
>>> at
>>> io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:415)
>>> at
>>> io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:903)
>>> at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
>>> at
>>> io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348)
>>> at
>>> io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:356)
>>> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
>>> at
>>> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
>>> at
>>> io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
>>> at java.lang.Thread.run(Thread.java:745)
>>> >>>
>>>
>>>
>>> --
>>> /sumedha
>>>
>>>
>>
>>
>> --
>> *Kishanthan Thangarajah*
>> Associate Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> *
>> Twitter - *http://twitter.com/kishanthan *
>>
>
>
>
> --
> Sameera Jayasoma,
> Software Architect,
>
> WSO2, Inc. (http://wso2.com)
> email: same...@wso2.com
> blog: http://blog.sameera.org
> twitter: https://twitter.com/sameerajayasoma
> flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
> Mobile: 0094776364456
>
> Lean . Enterprise . Middleware
>
>


-- 
*Isuru Udana*
Associate Technical Lead
WSO2 Inc.; http://wso2.com
email: isu...@wso2.com cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] C5 - mention the port in use as part of error message

2016-04-04 Thread Sameera Jayasoma
+1 This should be handled at the Carbon-transport layer.

On Mon, Apr 4, 2016 at 12:50 PM, Kishanthan Thangarajah  wrote:

> Yes, the error message needs to be more descriptive. Looks like this is
> coming all the way from NettyListener (carbon-transports) [1] and we do not
> have a way to catch this error as the bind call is started using a thread
> in netty and it is the one which logs this error too.
>
> @IsuruR and IsuruU, do we have way to fix this from calling netty api
> level?
>
> [1]
> https://github.com/wso2/carbon-transports/blob/master/http/netty/components/org.wso2.carbon.transport.http.netty/src/main/java/org/wso2/carbon/transport/http/netty/listener/NettyListener.java#L106
>
> On Mon, Apr 4, 2016 at 8:40 AM, Sumedha Rubasinghe 
> wrote:
>
>> It's port 8080 that is being used here. But no way to find that through
>> the exception through from
>> Netty HTTP Transport listener.
>>
>>
>> 
>> [2016-04-04 08:37:03,872]  INFO
>> {org.wso2.carbon.transport.http.netty.listener.NettyListener} - Starting
>> Netty Http Transport Listener
>> [2016-04-04 08:37:03,876]  INFO
>> {org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
>> org.wso2.carbon.uuf.UUFService@5f33122c
>> Exception in thread "Timer-0" java.net.BindException: Address already in
>> use
>> at sun.nio.ch.Net.bind0(Native Method)
>> at sun.nio.ch.Net.bind(Net.java:433)
>> at sun.nio.ch.Net.bind(Net.java:425)
>> at
>> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
>> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
>> at
>> io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
>> at
>> io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:485)
>> at
>> io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1089)
>> at
>> io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:430)
>> at
>> io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:415)
>> at
>> io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:903)
>> at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
>> at
>> io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348)
>> at
>> io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:356)
>> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
>> at
>> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
>> at
>> io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
>> at java.lang.Thread.run(Thread.java:745)
>> >>>
>>
>>
>> --
>> /sumedha
>>
>>
>
>
> --
> *Kishanthan Thangarajah*
> Associate Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com *
> Twitter - *http://twitter.com/kishanthan *
>



-- 
Sameera Jayasoma,
Software Architect,

WSO2, Inc. (http://wso2.com)
email: same...@wso2.com
blog: http://blog.sameera.org
twitter: https://twitter.com/sameerajayasoma
flickr: http://www.flickr.com/photos/sameera-jayasoma/collections
Mobile: 0094776364456

Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] C5 - mention the port in use as part of error message

2016-04-04 Thread Kishanthan Thangarajah
Yes, the error message needs to be more descriptive. Looks like this is
coming all the way from NettyListener (carbon-transports) [1] and we do not
have a way to catch this error as the bind call is started using a thread
in netty and it is the one which logs this error too.

@IsuruR and IsuruU, do we have way to fix this from calling netty api level?

[1]
https://github.com/wso2/carbon-transports/blob/master/http/netty/components/org.wso2.carbon.transport.http.netty/src/main/java/org/wso2/carbon/transport/http/netty/listener/NettyListener.java#L106

On Mon, Apr 4, 2016 at 8:40 AM, Sumedha Rubasinghe  wrote:

> It's port 8080 that is being used here. But no way to find that through
> the exception through from
> Netty HTTP Transport listener.
>
>
> 
> [2016-04-04 08:37:03,872]  INFO
> {org.wso2.carbon.transport.http.netty.listener.NettyListener} - Starting
> Netty Http Transport Listener
> [2016-04-04 08:37:03,876]  INFO
> {org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
> org.wso2.carbon.uuf.UUFService@5f33122c
> Exception in thread "Timer-0" java.net.BindException: Address already in
> use
> at sun.nio.ch.Net.bind0(Native Method)
> at sun.nio.ch.Net.bind(Net.java:433)
> at sun.nio.ch.Net.bind(Net.java:425)
> at
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
> at
> io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
> at
> io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:485)
> at
> io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1089)
> at
> io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:430)
> at
> io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:415)
> at
> io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:903)
> at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
> at
> io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348)
> at
> io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:356)
> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
> at
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
> at
> io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
> at java.lang.Thread.run(Thread.java:745)
> >>>
>
>
> --
> /sumedha
>
>


-- 
*Kishanthan Thangarajah*
Associate Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com *
Twitter - *http://twitter.com/kishanthan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] C5 - mention the port in use as part of error message

2016-04-03 Thread Sumedha Rubasinghe
It's port 8080 that is being used here. But no way to find that through the
exception through from
Netty HTTP Transport listener.



[2016-04-04 08:37:03,872]  INFO
{org.wso2.carbon.transport.http.netty.listener.NettyListener} - Starting
Netty Http Transport Listener
[2016-04-04 08:37:03,876]  INFO
{org.wso2.msf4j.internal.MicroservicesRegistry} - Added microservice:
org.wso2.carbon.uuf.UUFService@5f33122c
Exception in thread "Timer-0" java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at
io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
at
io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:485)
at
io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1089)
at
io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:430)
at
io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:415)
at
io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:903)
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
at
io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348)
at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:356)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
at
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
at
io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
>>>


-- 
/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev