Sockets not talking on new fedora 21 installation



  • I have a simple socket application that opens and closes a socket on every write. I've been meaning to keep socket open for quite some, and have a proper dialogue set-up, but I've had other priorities...

    It no longer works on my new fedora 21 installation, which had problems itself, and required me to use the SELinux troubleshooter to permit network-manager access to certain files during the DSL set up.

    Through the bugger I see that I have connected to my remote application and that the write has succeeded. On the receiving application, the qt-creator debugger does not break at the event loop.

    Using NetActView ( which I am new to ) , I observe the recieving port in a CLOSE_WAIT state:

    tcp6 xxxxx CLOSE_WAIT ::ffff:127.0.0.1 44484 localhost.localdomain

    Any clues as to what is wrong? Something is wrong with my OS setup, is my guess, since the code has beeen in use for years.



  • that was my 1st look . Now that things have settled down, I've taken a closer look.

    The QT appliccation succeeds on all write operations, although I notice the library returns errors in some cases ( write ) but not others: for instance connectToHost, which uses signals, and the state(). I added code to check the states & everything is fine, they move from 0 (unconnected) to 2 (connecting) to 3 (connected). The write returns the correct number of bytes and the socket disconnects.

    IF I break it at the write point I see this netstat

    tcp 32863 ESTABLISHED 127.0.0.1 26919 localhost 6007 send
    tcp6 26919 ESTABLISHED ::ffff:127.0.0.1 32860 localhost.localdomain 5850 clang

    but the recieving process does not break at event(), nor incomingConnection()

    After the write and disconnect, the sending port goes into a TIME_WAIT and the receiver goes into CLOSE_WAIT



  • slightly oops, the local port on line one should match the remote port on line two, the exmple was glued to from two runs of the program, an actual case would look like this:

    tcp 32925 ESTABLISHED 127.0.0.1 26919 localhost 6265 send
    tcp6 26919 ESTABLISHED ::ffff:127.0.0.1 32925 localhost.localdomain 6245 clang



  • incidentally my initial are RASTA , not LABRAT, which may have everything to do with where IBM moved it's OS/2 developers, but does not solve my problems.



  • typos ... my initials , ie. of my given name, are R.A.ST.A. (FYI) and quite immaterial to the discussion .



  • I was able to get things running by using Qt.4.8.6.



  • Which is to say the compile with QT 5.3.2 did not work with the new installation, and, I'll try again later.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.