trying to connect client io.netty.bootstrap.Bootstrap
:
ChannelFuture cf = null;
cf = m_bootstrap.connect(new InetSocketAddress(InetAddress
.getByName("127.0.0.1"), 8084));
in cf, result
: java.net.ConnectException: Connection refused: /127.0.0.1:8084
detailed message:
[sun.nio.ch.SocketChannelImpl.checkConnect(Native Method), sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599), io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:208), io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:287), io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528), io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468), io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382), io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354), io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116), java.lang.Thread.run(Thread.java:695)]
my /etc/hosts file looks like this:
127.0.0.1>--localhost
255.255.255.255>broadcasthost
::1 localhost-
****::1%lo*>localhost
127.0.0.1>--********
Not sure what to do? literally assumed I can pass localhost and port and it should work.