[MBDyn-users] stream socket and couple

Pierangelo Masarati pierangelo.masarati at polimi.it
Sat May 14 16:00:27 CEST 2016


Sounds like when it "worked" it left some socket in TIME_WAIT or 
something like that.  Can you check that, e.g. using lsof or netstat?

Sincerely, p.



On 13/05/2016 16:32, Jens.vanSchelve at Emerson.com wrote:
>
> Dear all,
>
> I found the part of my code producing the abandoned SocketStreamDrive 
> in mbdyn. A failing accept function is causing my program to stop, but 
> just don’t understand why the accept() function is failing most of the 
> time (not always).
>
> cout << "MBDynControl: Waiting for client output connection...(1/2) " 
>  << endl;
>
> new_s_output = accept(s_output, (struct sockaddr*)&cli, &len);
>
> if (new_s_output < 0) {
>
> cout << "MBDynControl: Output accept failed" << endl;
>
> return -1;
>
> }
>
> close(s_output);
>
> cout << "MBDynControl: Output Socket Connected" << endl;
>
> Failture scenario:
>
>>
> MBDynControl: Waiting for client output connection...(1/2)
>
> MBDyn - MultiBody Dynamics 1.7.0
>
> configured on Mar 31 2016 at 12:11:58
>
> ...
>
> Reading Structural(32003)
>
> Reading File(10)
>
> starting stream drive 10
>
> SocketStreamDrive(10, "MBXOUT"): host undefined, using default 
> "127.0.0.1" at line 123, file <VV12_Turbine_CTRL.mdl>
>
> MBDynControl: Output accept failed
>
> MBDynControl: Error in Accept Socket Connection.
>
> Reading Gravity
>
> Reading Joint(10)
>
> Reading Body(31)
>
> ...
>
> Reading Body(20015)
>
> MBDynControl: Terminated.
>
> Reading Body(20016)
>
> ...
>
> Reading Beam(30024)
>
> Reading StreamOutputElement(1)
>
> SocketStreamElem(1): host undefined at line 156, file 
> <VV12_Turbine_CTRL.mdl>
>
> SocketStreamElem(1): using default host: 127.0.0.1:5012
>
> starting SocketStreamElem(1)...
>
> SocketStreamDrive(MBXOUT): communication closed by host; abandoning...
>
> SocketStreamDrive(MBXOUT): abandoned
>
> Jens
>
> *Jens van Schelve *| Research Engineer for System Engineering | SSB 
> Wind Systems GmbH & Co.KG
> *Emerson Industrial Automation *| Neuenkirchener Straße 13 
> | 48499 Salzbergen | Germany
> T +495976946 Ext 2867 | F
> Jens.vanSchelve at Emerson.com <mailto:Jens.vanSchelve at Emerson.com> | 
> www.ssbwindsystems.de <http://www.ssbwindsystems.de>
>
>
>
> _______________________________________________
> MBDyn-users mailing list
> MBDyn-users at mbdyn.org
> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users


-- 
Pierangelo Masarati
Associate Professor
Dipartimento di Scienze e Tecnologie Aerospaziali
Politecnico di Milano

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mbdyn.org/pipermail/mbdyn-users/attachments/20160514/368830a1/attachment.html>


More information about the MBDyn-users mailing list