[jira] [Updated] (DIRMINA-1171) DatagramAcceptor and their Sessions
[ https://issues.apache.org/jira/browse/DIRMINA-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander B updated DIRMINA-1171: - Description: Hello, I am using two independently created NioDatagramAcceptors, which are created by the following code : {code:java} AbstractIoService inputSource = new NioDatagramAcceptor(); ((NioDatagramAcceptor) inputSource).getSessionConfig().setReuseAddress(true); DefaultIoFilterChainBuilder filterChainBuilderUDP = ((NioDatagramAcceptor)inputSource).getFilterChain(); filterChainBuilderUDP.addLast("logger", new LoggingFilter()); ((NioDatagramAcceptor) inputSource).getSessionConfig().setIdleTime(IdleStatus.READER_IDLE, getIdleTimeout()); ((NioDatagramAcceptor) inputSource).setHandler(this); try { ((NioDatagramAcceptor)inputSource).bind(new InetSocketAddress(port)); } catch (IOException e) { log.error("Failed to connect {}", e); } {code} One Acceptor is listening on port 9800, the other one on 9801. If I now send UDP packages (from a external application) to both ports (independently). It seems, that the received messages is randomly handled on session1 and session2. Information: The external app is sending: Message "TEST_1" just to port 9800 Message "TEST_2" just to port 9801 The overrided method messageReceived will give the following output: {code:java} public void messageReceived(IoSession session, Object message) throws Exception { String msgStr = message.toString(); log.info("SessionId:" + session.getId() + " " + msgStr); } {code} 2023-04-19_09:34:43.629 [NioDatagramAcceptor-2] INFO - SessionId:1 TEST_1 2023-04-19_09:34:43.629 [NioDatagramAcceptor-3] INFO - SessionId:1 TEST_2 2023-04-19_09:34:47.415 [NioDatagramAcceptor-2] INFO - SessionId:2 TEST_1 2023-04-19_09:34:47.415 [NioDatagramAcceptor-3] INFO - SessionId:2 TEST_2 So either it seems, that this happens randomly or crosswise (each message from each port n-times to all sessions) I can not see this effect while using `NioSocketConnector`. Is there anything I did not mention in the context of UDP/DatagramAcceptor? was: Hello, I am using two independently created NioDatagramAcceptors, which are created by the following code : {code:java} AbstractIoService inputSource = new NioDatagramAcceptor(); ((NioDatagramAcceptor) inputSource).getSessionConfig().setReuseAddress(true); DefaultIoFilterChainBuilder filterChainBuilderUDP = ((NioDatagramAcceptor)inputSource).getFilterChain(); filterChainBuilderUDP.addLast("logger", new LoggingFilter()); ((NioDatagramAcceptor) inputSource).getSessionConfig().setIdleTime(IdleStatus.READER_IDLE, getIdleTimeout()); ((NioDatagramAcceptor) inputSource).setHandler(this); try { ((NioDatagramAcceptor)inputSource).bind(new InetSocketAddress(port)); } catch (IOException e) { log.error("Failed to connect {}", e); } {code} One Acceptor is listening on port 9800, the other one on 9801. If I now send UDP packages (from a external application) to both ports (independently). It seems, that the received messages is randomly handled on session1 and session2. Information: The external app is sending: Message "TEST_1" just to port 9800 Message "TEST_2" just to port 9801 The overrided method messageReceived will give the following output: {code:java} public void messageReceived(IoSession session, Object message) throws Exception { String msgStr = message.toString(); log.info("SessionId:" + session.getId() + " " + msgStr); } {code} 2023-04-19_09:34:43.629 [NioDatagramAcceptor-2] INFO - SessionId:1 TEST_1 2023-04-19_09:34:43.629 [NioDatagramAcceptor-3] INFO - SessionId:1 TEST_2 2023-04-19_09:34:47.415 [NioDatagramAcceptor-2] INFO - SessionId:2 TEST_1 2023-04-19_09:34:47.415 [NioDatagramAcceptor-3] INFO - SessionId:2 TEST_2 So either it seems, that this happens randomly or crosswise (each message from each port n-times to all sessions) I can not see this effect while using `NioSocketConnector`. Is there anything I did not mention in the context of UDP/DatagramAcceptor? > DatagramAcceptor and their Sessions > --- > > Key: DIRMINA-1171 > URL: https://issues.apache.org/jira/browse/DIRMINA-1171 > Project: MINA > Issue Type: Bug > Components: Core >Affects Versions: 2.1.5 > Environment: Win10, Adopt OpenJDK 8 >Reporter: Alexander B >Priority: Major > > Hello, > I am using two independently created NioDatagramAcceptors, which are created > by the following code : > {code:java} > AbstractIoService inputSource = new NioDatagramAcceptor(); > ((NioDatagramAcceptor) inputSource).getSessionConfig().setReuseAddress(true); > DefaultIoFilterChainBuilder filterChainBuilderUDP = > ((NioDatagramAcceptor)inputSource).getFilterChain(); > filterChainBuilderUDP.addLast("logger", new LoggingFilter()); >
[jira] [Closed] (DIRMINA-1171) DatagramAcceptor and their Sessions
[ https://issues.apache.org/jira/browse/DIRMINA-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander B closed DIRMINA-1171. Resolution: Not A Problem > DatagramAcceptor and their Sessions > --- > > Key: DIRMINA-1171 > URL: https://issues.apache.org/jira/browse/DIRMINA-1171 > Project: MINA > Issue Type: Bug > Components: Core >Affects Versions: 2.1.5 > Environment: Win10, Adopt OpenJDK 8 >Reporter: Alexander B >Priority: Major > > Hello, > I am using two independently created NioDatagramAcceptors, which are created > by the following code : > {code:java} > AbstractIoService inputSource = new NioDatagramAcceptor(); > ((NioDatagramAcceptor) inputSource).getSessionConfig().setReuseAddress(true); > DefaultIoFilterChainBuilder filterChainBuilderUDP = > ((NioDatagramAcceptor)inputSource).getFilterChain(); > filterChainBuilderUDP.addLast("logger", new LoggingFilter()); > ((NioDatagramAcceptor) > inputSource).getSessionConfig().setIdleTime(IdleStatus.READER_IDLE, > getIdleTimeout()); > ((NioDatagramAcceptor) inputSource).setHandler(this); > try { > ((NioDatagramAcceptor)inputSource).bind(new InetSocketAddress(port)); > } catch (IOException e) { > log.error("Failed to connect {}", e); > } > {code} > One Acceptor is listening on port 9800, the other one on 9801. If I now send > UDP packages (from a external application) to both ports (independently). It > seems, that the received messages is randomly handled on session1 and > session2. > Information: The external app is sending: > Message "TEST_1" just to port 9800 > Message "TEST_2" just to port 9801 > The overrided method messageReceived will give the following output: > {code:java} > public void messageReceived(IoSession session, Object message) throws > Exception { > String msgStr = message.toString(); > log.info("SessionId:" + session.getId() + " " + msgStr); > } > {code} > 2023-04-19_09:34:43.629 [NioDatagramAcceptor-2] INFO - SessionId:1 TEST_1 > 2023-04-19_09:34:43.629 [NioDatagramAcceptor-3] INFO - SessionId:1 TEST_2 > 2023-04-19_09:34:47.415 [NioDatagramAcceptor-2] INFO - SessionId:2 TEST_1 > 2023-04-19_09:34:47.415 [NioDatagramAcceptor-3] INFO - SessionId:2 TEST_2 > So either it seems, that this happens randomly or crosswise (each message > from each port n-times to all sessions) > I can not see this effect while using `NioSocketConnector`. Is there anything > I did not mention in the context of UDP/DatagramAcceptor? -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[jira] [Commented] (DIRMINA-1171) DatagramAcceptor and their Sessions
[ https://issues.apache.org/jira/browse/DIRMINA-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17714061#comment-17714061 ] Alexander B commented on DIRMINA-1171: -- Sry, there was some kind of deamon process in the background, which duplicated the messages. I will reopen another issue with a more precise description of the error > DatagramAcceptor and their Sessions > --- > > Key: DIRMINA-1171 > URL: https://issues.apache.org/jira/browse/DIRMINA-1171 > Project: MINA > Issue Type: Bug > Components: Core >Affects Versions: 2.1.5 > Environment: Win10, Adopt OpenJDK 8 >Reporter: Alexander B >Priority: Major > > Hello, > I am using two independently created NioDatagramAcceptors, which are created > by the following code : > {code:java} > AbstractIoService inputSource = new NioDatagramAcceptor(); > ((NioDatagramAcceptor) inputSource).getSessionConfig().setReuseAddress(true); > DefaultIoFilterChainBuilder filterChainBuilderUDP = > ((NioDatagramAcceptor)inputSource).getFilterChain(); > filterChainBuilderUDP.addLast("logger", new LoggingFilter()); > ((NioDatagramAcceptor) > inputSource).getSessionConfig().setIdleTime(IdleStatus.READER_IDLE, > getIdleTimeout()); > ((NioDatagramAcceptor) inputSource).setHandler(this); > try { > ((NioDatagramAcceptor)inputSource).bind(new InetSocketAddress(port)); > } catch (IOException e) { > log.error("Failed to connect {}", e); > } > {code} > One Acceptor is listening on port 9800, the other one on 9801. If I now send > UDP packages (from a external application) to both ports (independently). It > seems, that the received messages is randomly handled on session1 and > session2. > Information: The external app is sending: > Message "TEST_1" just to port 9800 > Message "TEST_2" just to port 9801 > The overrided method messageReceived will give the following output: > {code:java} > public void messageReceived(IoSession session, Object message) throws > Exception { > String msgStr = message.toString(); > log.info("SessionId:" + session.getId() + " " + msgStr); > } > {code} > 2023-04-19_09:34:43.629 [NioDatagramAcceptor-2] INFO - SessionId:1 TEST_1 > 2023-04-19_09:34:43.629 [NioDatagramAcceptor-3] INFO - SessionId:1 TEST_2 > 2023-04-19_09:34:47.415 [NioDatagramAcceptor-2] INFO - SessionId:2 TEST_1 > 2023-04-19_09:34:47.415 [NioDatagramAcceptor-3] INFO - SessionId:2 TEST_2 > So either it seems, that this happens randomly or crosswise (each message > from each port n-times to all sessions) > I can not see this effect while using `NioSocketConnector`. Is there anything > I did not mention in the context of UDP/DatagramAcceptor? -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[GitHub] [mina-ftpserver] 07070529 commented on issue #25: Apache FTPServer adapt to Apache MINA 2.2.x
07070529 commented on issue #25: URL: https://github.com/apache/mina-ftpserver/issues/25#issuecomment-1514515071 Thank you for your encouragement. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[jira] [Created] (DIRMINA-1171) DatagramAcceptor and their Sessions
Alexander B created DIRMINA-1171: Summary: DatagramAcceptor and their Sessions Key: DIRMINA-1171 URL: https://issues.apache.org/jira/browse/DIRMINA-1171 Project: MINA Issue Type: Bug Components: Core Affects Versions: 2.1.5 Environment: Win10, Adopt OpenJDK 8 Reporter: Alexander B Hello, I am using two independently created NioDatagramAcceptors, which are created by the following code : {code:java} AbstractIoService inputSource = new NioDatagramAcceptor(); ((NioDatagramAcceptor) inputSource).getSessionConfig().setReuseAddress(true); DefaultIoFilterChainBuilder filterChainBuilderUDP = ((NioDatagramAcceptor)inputSource).getFilterChain(); filterChainBuilderUDP.addLast("logger", new LoggingFilter()); ((NioDatagramAcceptor) inputSource).getSessionConfig().setIdleTime(IdleStatus.READER_IDLE, getIdleTimeout()); ((NioDatagramAcceptor) inputSource).setHandler(this); try { ((NioDatagramAcceptor)inputSource).bind(new InetSocketAddress(port)); } catch (IOException e) { log.error("Failed to connect {}", e); } One Acceptor is listening on port 9800, the other one on 9801. If I now send UDP packages (from a external application) to both ports (independently). It seems, that the received messages is randomly handled on session1 and session2. Information: The external app is sending: Message "TEST_1" just to port 9800 Message "TEST_2" just to port 9801 The overrided method messageReceived will give the following output: {code:java} public void messageReceived(IoSession session, Object message) throws Exception { String msgStr = message.toString(); log.info("SessionId:" + session.getId() + " " + msgStr); } 2023-04-19_09:34:43.629 [NioDatagramAcceptor-2] INFO - SessionId:1 TEST_1 2023-04-19_09:34:43.629 [NioDatagramAcceptor-3] INFO - SessionId:1 TEST_2 2023-04-19_09:34:47.415 [NioDatagramAcceptor-2] INFO - SessionId:2 TEST_1 2023-04-19_09:34:47.415 [NioDatagramAcceptor-3] INFO - SessionId:2 TEST_2 So either it seems, that this happens randomly or crosswise (each message from each port n-times to all sessions) I can not see this effect while using `NioSocketConnector`. Is there anything I did not mention in the context of UDP/DatagramAcceptor? -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[jira] [Updated] (DIRMINA-1171) DatagramAcceptor and their Sessions
[ https://issues.apache.org/jira/browse/DIRMINA-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander B updated DIRMINA-1171: - Description: Hello, I am using two independently created NioDatagramAcceptors, which are created by the following code : {code:java} AbstractIoService inputSource = new NioDatagramAcceptor(); ((NioDatagramAcceptor) inputSource).getSessionConfig().setReuseAddress(true); DefaultIoFilterChainBuilder filterChainBuilderUDP = ((NioDatagramAcceptor)inputSource).getFilterChain(); filterChainBuilderUDP.addLast("logger", new LoggingFilter()); ((NioDatagramAcceptor) inputSource).getSessionConfig().setIdleTime(IdleStatus.READER_IDLE, getIdleTimeout()); ((NioDatagramAcceptor) inputSource).setHandler(this); try { ((NioDatagramAcceptor)inputSource).bind(new InetSocketAddress(port)); } catch (IOException e) { log.error("Failed to connect {}", e); } {code} One Acceptor is listening on port 9800, the other one on 9801. If I now send UDP packages (from a external application) to both ports (independently). It seems, that the received messages is randomly handled on session1 and session2. Information: The external app is sending: Message "TEST_1" just to port 9800 Message "TEST_2" just to port 9801 The overrided method messageReceived will give the following output: {code:java} public void messageReceived(IoSession session, Object message) throws Exception { String msgStr = message.toString(); log.info("SessionId:" + session.getId() + " " + msgStr); } {code} 2023-04-19_09:34:43.629 [NioDatagramAcceptor-2] INFO - SessionId:1 TEST_1 2023-04-19_09:34:43.629 [NioDatagramAcceptor-3] INFO - SessionId:1 TEST_2 2023-04-19_09:34:47.415 [NioDatagramAcceptor-2] INFO - SessionId:2 TEST_1 2023-04-19_09:34:47.415 [NioDatagramAcceptor-3] INFO - SessionId:2 TEST_2 So either it seems, that this happens randomly or crosswise (each message from each port n-times to all sessions) I can not see this effect while using `NioSocketConnector`. Is there anything I did not mention in the context of UDP/DatagramAcceptor? was: Hello, I am using two independently created NioDatagramAcceptors, which are created by the following code : {code:java} AbstractIoService inputSource = new NioDatagramAcceptor(); ((NioDatagramAcceptor) inputSource).getSessionConfig().setReuseAddress(true); DefaultIoFilterChainBuilder filterChainBuilderUDP = ((NioDatagramAcceptor)inputSource).getFilterChain(); filterChainBuilderUDP.addLast("logger", new LoggingFilter()); ((NioDatagramAcceptor) inputSource).getSessionConfig().setIdleTime(IdleStatus.READER_IDLE, getIdleTimeout()); ((NioDatagramAcceptor) inputSource).setHandler(this); try { ((NioDatagramAcceptor)inputSource).bind(new InetSocketAddress(port)); } catch (IOException e) { log.error("Failed to connect {}", e); } One Acceptor is listening on port 9800, the other one on 9801. If I now send UDP packages (from a external application) to both ports (independently). It seems, that the received messages is randomly handled on session1 and session2. Information: The external app is sending: Message "TEST_1" just to port 9800 Message "TEST_2" just to port 9801 The overrided method messageReceived will give the following output: {code:java} public void messageReceived(IoSession session, Object message) throws Exception { String msgStr = message.toString(); log.info("SessionId:" + session.getId() + " " + msgStr); } 2023-04-19_09:34:43.629 [NioDatagramAcceptor-2] INFO - SessionId:1 TEST_1 2023-04-19_09:34:43.629 [NioDatagramAcceptor-3] INFO - SessionId:1 TEST_2 2023-04-19_09:34:47.415 [NioDatagramAcceptor-2] INFO - SessionId:2 TEST_1 2023-04-19_09:34:47.415 [NioDatagramAcceptor-3] INFO - SessionId:2 TEST_2 So either it seems, that this happens randomly or crosswise (each message from each port n-times to all sessions) I can not see this effect while using `NioSocketConnector`. Is there anything I did not mention in the context of UDP/DatagramAcceptor? > DatagramAcceptor and their Sessions > --- > > Key: DIRMINA-1171 > URL: https://issues.apache.org/jira/browse/DIRMINA-1171 > Project: MINA > Issue Type: Bug > Components: Core >Affects Versions: 2.1.5 > Environment: Win10, Adopt OpenJDK 8 >Reporter: Alexander B >Priority: Major > > Hello, > I am using two independently created NioDatagramAcceptors, which are created > by the following code : > {code:java} > AbstractIoService inputSource = new NioDatagramAcceptor(); > ((NioDatagramAcceptor) inputSource).getSessionConfig().setReuseAddress(true); > DefaultIoFilterChainBuilder filterChainBuilderUDP = > ((NioDatagramAcceptor)inputSource).getFilterChain(); > filterChainBuilderUDP.addLast("logger", new LoggingFilter()); >
[jira] [Created] (DIRMINA-1172) Multiple DatagramAcceptors and the creation of a session object
Alexander B created DIRMINA-1172: Summary: Multiple DatagramAcceptors and the creation of a session object Key: DIRMINA-1172 URL: https://issues.apache.org/jira/browse/DIRMINA-1172 Project: MINA Issue Type: Bug Components: Core Affects Versions: 2.1.5 Reporter: Alexander B Hello, I am using two independently created NioDatagramAcceptors, which are created by the following code : {code:java} AbstractIoService inputSource = new NioDatagramAcceptor(); ((NioDatagramAcceptor) inputSource).getSessionConfig().setReuseAddress(true); DefaultIoFilterChainBuilder filterChainBuilderUDP = ((NioDatagramAcceptor)inputSource).getFilterChain(); filterChainBuilderUDP.addLast("logger", new LoggingFilter()); ((NioDatagramAcceptor) inputSource).getSessionConfig().setIdleTime(IdleStatus.READER_IDLE, getIdleTimeout()); ((NioDatagramAcceptor) inputSource).setHandler(this); try { ((NioDatagramAcceptor)inputSource).bind(new InetSocketAddress(port)); } catch (IOException e) { log.error("Failed to connect {}", e); } {code} One Acceptor is listening on port 9800, the other one on 9801. If I now send UDP packages (from a external application) to both ports (independently). It seems, that both UDP port are "connected" to the same session. Information: The external app is sending: Message "TEST_1 " just to port 9800 Message "TEST_2 " just to port 9801 The overwritten method messageReceived will give the following output: {code:java} public void messageReceived(IoSession session, Object message) throws Exception { String msgStr = message.toString(); log.info("SessionId:" + session.getId() + " " + msgStr); } {code} 2023-04-19_11:47:35.035 [NioDatagramAcceptor-2] INFO - SessionId:1 TEST_1 1681904855701 2023-04-19_11:47:35.035 [NioDatagramAcceptor-3] INFO - SessionId:1 TEST_2 1681904855701 So, both messages (for port 9800 and port 9801) are received by SessionId1. If I do exactly the same with `NioSocketConnector`, I can see two different sessions, such that both messages are handled independently: 2023-04-19_11:44:35.725 [NioProcessor-11] INFO - SessionId:1 TEST_1 1681904875701 2023-04-19_11:44:37.754 [NioProcessor-15] INFO - SessionId:2 TEST_2 1681904875701 Is there anything I did not mention in the context of UDP/DatagramAcceptor? Or is there any setting, such that DatagramAcceptors can create/handle their own session objects? -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org