Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » TCP Port: Connection Interrupted error
TCP Port: Connection Interrupted error [message #1777710] Sat, 02 December 2017 03:24 Go to next message
Naum Spaseski is currently offline Naum SpaseskiFriend
Messages: 81
Registered: February 2016
Location: Sophia Antipolis
Member

Hello everyone,

I'm using the TCP port for a certain project (I can't use IPL4 in this case), and always, after the first data exchange, the connection drops automatically. I tested with the same SUT, and it isn't the case for the IPL4 port, only for this port.

What should I do in order to keep the connection open thorough the test case?

Thanks in advance.

Best regards,
Naum
Re: TCP Port: Connection Interrupted error [message #1777719 is a reply to message #1777710] Sat, 02 December 2017 08:23 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Naum,

could you please attach a Wireshark trace, possibly for both (TCP and IPL4) scenarios, so
we can figure out what could be the problem?

BR

Elemer
Re: TCP Port: Connection Interrupted error [message #1777735 is a reply to message #1777719] Sun, 03 December 2017 18:05 Go to previous messageGo to next message
Naum Spaseski is currently offline Naum SpaseskiFriend
Messages: 81
Registered: February 2016
Location: Sophia Antipolis
Member

Hi Elemer,

Here is a wireshark for the oneM2M, it was easiest for me to produce a case and it is public code. So, the test and the pixits are the same. The logs are in the attachments.

An other minor question, is it possible to disable the ASP_Event and ASP_ConnId_ReadyToRelease types when using dual-faced port? Because it is returned to the testcase as an message, and for example, in oneM2M, it disturbs the result.

Best regards,
Naum
Re: TCP Port: Connection Interrupted error [message #1777762 is a reply to message #1777735] Mon, 04 December 2017 11:28 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Naum,

-first , about the ASP_Event and ASP_ConnId_ReadyToRelease:

you can discard them, see refguide 4.22.2.1 Mapping Rules

-the two traffic sequences in the logs are not the same:

for the TCP port it starts with

POST /~/in-cse/in-name HTTP/1.1
Accept: application/xml
Content-Length: 113
Content-Type: application/xml;ty=2
Host: om2m:8080
X-M2M-Origin: 
X-M2M-RI: TC_CSE_DMR_CRE_009-m_createAe237860

<m2m:ae xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="MyAe">    <api>in-cse</api>    <rr>true</rr></m2m:ae>


answered by

HTTP/1.1 201 Created
Date: Sun, 03 Dec 2017 17:15:51 GMT
Set-Cookie: JSESSIONID=1d6xsyx1fyn5hir71pub979ck;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Location: /in-cse/CAE12916322
X-M2M-RI: TC_CSE_DMR_CRE_009-m_createAe237860
X-M2M-Origin: /in-cse
X-M2M-RSC: 2001
Content-Type: application/xml;charset=iso-8859-1
Content-Length: 368
Connection: close
Server: Jetty(9.3.9.v20160517)

<?xml version="1.0" encoding="UTF-8"?>
<m2m:ae xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="MyAe">
   <ty>2</ty>
   <ri>/in-cse/CAE12916322</ri>
   <pi>/in-cse</pi>
   <ct>20171203T181551</ct>
   <lt>20171203T181551</lt>
   <acpi>/in-cse/acp-163386205</acpi>
   <et>20171203T181551</et>
   <api>in-cse</api>
   <aei>CAE12916322</aei>
   <rr>true</rr>
</m2m:ae>





and for the IPL4 port

with
POST /in-name HTTP/1.1
Accept: application/xml
Content-Length: 114
Content-Type: application/xml;ty=2
Host: 127.0.0.1:8080
X-M2M-Origin: 
X-M2M-RI: TC_CSE_DMR_CRE_009-m_createAe714960

<m2m:ae xmlns:m2m="http://www.onem2m.org/xml/protocols" rn="MyAe">    <api>myAppId</api>    <rr>true</rr></m2m:ae>

answered by


HTTP/1.1 201 Created
Content-Location: /in-cse/CAE698608484
X-M2M-RI: TC_CSE_DMR_CRE_009-m_createAe714960
X-M2M-Origin: /in-cse
X-M2M-RSC: 2001
Content-Type: application/xml;charset=ISO-8859-1
Content-Length: 429
Server: Jetty(8.1.16.v20140903)

<?xml version="1.0" encoding="UTF-8"?>
<m2m:ae xmlns:m2m="http://www.onem2m.org/xml/protocols" xmlns:hd="http://www.onem2m.org/xml/protocols/homedomain" rn="MyAe">
   <ty>2</ty>
   <ri>/in-cse/CAE698608484</ri>
   <pi>/in-cse</pi>
   <ct>20171203T183726</ct>
   <lt>20171203T183726</lt>
   <acpi>/in-cse/acp-84742661</acpi>
   <et>20181203T183726</et>
   <api>myAppId</api>
   <aei>CAE698608484</aei>
   <rr>true</rr>
</m2m:ae>



Firstly, the two POST requests differ.
Secondly, in the TCP case it's the server that returns a Connection: close in the response so the port behavior appears normal.


I believe you should make the two POSTs exactly the same and retry.

If the problem still persists, please send me the logs and code as well as the Wireshark trace.

BR

Elemer



Re: TCP Port: Connection Interrupted error [message #1777941 is a reply to message #1777762] Wed, 06 December 2017 13:37 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
A small addition:

the right syntax for discard is;
with {  
	  extension "user IPL4asp_PT
	     	out(
	     		MsgOut 			-> 	ASP_Send 	: function(f_enc_M2MPrimitive_to_ASPSend)
	     	)
	     	in(
	     		ASP_RecvFrom	-> 	MsgIn		: function(f_dec_ASPRecvFrom_to_M2MPrimitive);
//	     		ASP_Event		-> 	ASP_Event	: simple
  			ASP_Event		-> 	-	                : discard
	     	)"; 	  
	};




not

with {  
	  extension "user IPL4asp_PT
	     	out(
	     		MsgOut 			-> 	ASP_Send 	: function(f_enc_M2MPrimitive_to_ASPSend)
	     	)
	     	in(
	     		ASP_RecvFrom	-> 	MsgIn		: function(f_dec_ASPRecvFrom_to_M2MPrimitive);
//	     		ASP_Event		-> 	ASP_Event	: simple
  			ASP_Event		-> 	ASP_Event	: discard
	     	)"; 	  
	};




Previous Topic:TEXT codec and abort() via regerror()
Next Topic:Test port skeleton is not generated for some of ports
Goto Forum:
  


Current Time: Mon Sep 24 18:58:36 GMT 2018

Powered by FUDForum. Page generated in 0.01832 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top