0

Starting up micro services with wso2 msf4j throws error 4022 socket exception on one non-stop machine but works fine on multiple other machines machine including j and l series. We are currently using msf4j 2.1.0, ws02 5.1, and Netty 4.0.3. Most of the settings are left in default and we only provide the configuration value that is required to start the service.

We have tried setting the TCP stack with ipv6 and it still fails, made sure the socket port is available and test the socket port with a test program which shows the port is available to use, and tried to use more bytes then available receive buffer of the system which states a max of about 1mb with java which didn't produce the symptom unless done directly with C code.

We are lost in what to do next. Is it possible to set Netty buffer sizes with a parameter when invoking the service?

Expected output is that the service is able to start up on port.

The stack trace received is :

Exception: java.net.SocketException: Invalid function argument (errno:4022)
    2019-06-11 11:28:02 DEBUG - io.netty.channel.ChannelException: java.net.SocketEx
    ception: Invalid function argument (errno:4022)
               at io.netty.channel.socket.DefaultServerSocketChannelConfig.setReceiv
    eBufferSize(DefaultServerSocketChannelConfig.java:123)
               at io.netty.channel.socket.DefaultServerSocketChannelConfig.setOption
    (DefaultServerSocketChannelConfig.java:78)
               at io.netty.channel.DefaultChannelConfig.setOptions(DefaultChannelCon
    fig.java:113)
               at io.netty.bootstrap.ServerBootstrap.init(ServerBootstrap.java:152)
               at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBoots
    trap.java:308)
               at io.netty.bootstrap.AbstractBootstrap.doBind(AbstractBootstrap.java
    :271)
               at io.netty.bootstrap.AbstractBootstrap.bind(AbstractBootstrap.java:2
    67)
               at org.wso2.carbon.transport.http.netty.listener.NettyListener.startT
    ransport(NettyListener.java:103)
               at org.wso2.carbon.transport.http.netty.listener.NettyListener.start(
    NettyListener.java:69)
               at org.wso2.carbon.kernel.transports.CarbonTransport.startTransport(C
    arbonTransport.java:47)
               at java.util.HashMap$Values.forEach(HashMap.java:980)
               at org.wso2.carbon.kernel.transports.TransportManager.startTransports
    (TransportManager.java:61)
               at org.wso2.msf4j.MicroservicesRunner.start(MicroservicesRunner.java:
    191)
               at com.xypro.nonstop.main.AppInitializer.main(AppInitializer.java:147
    )
    Caused by: java.net.SocketException: Invalid function argument (errno:4022)
               at sun.nio.ch.Net.setIntOption0(Native Method)
               at sun.nio.ch.Net.setSocketOption(Net.java:334)
               at sun.nio.ch.ServerSocketChannelImpl.setOption(ServerSocketChannelIm
    pl.java:151)
               at sun.nio.ch.ServerSocketAdaptor.setReceiveBufferSize(ServerSocketAd
    aptor.java:190)
               at io.netty.channel.socket.DefaultServerSocketChannelConfig.setReceiv
    eBufferSize(DefaultServerSocketChannelConfig.java:121)
               ... 13 more
  • hmm I guess this is an issue coming from netty side. what is the main difference between machineS? – Thusitha Thilina Dayaratne Jul 05 '19 at 06:21
  • Between the bad machine and the test machine, they are nearly identical. They both satisfy the software requirements as far as we can tell when we reviewed the machines. – phillip Jul 08 '19 at 22:10

0 Answers0