[Miwi-middleware] Boost.asio seems not to forward the request to the handler

Mathias Hablützel habl at zhaw.ch
Tue Jun 17 20:35:53 CEST 2014


Hi Dmitri (et al),

After trying to decouple the boost.asio io_service with an opaque handler,
the compilation passed very well, but failed the test. It looked like there
are simply no responses from the server. After further investigation I
added some debug messages in the code to find out where the calls go
through and found out that the callback for handling the incoming request
is simply never called.

https://dornbirn.zhaw.ch/kiara/kiara/commit/32d4156aa8fa6ebc40d21ac59a4b192c0dc22a68

/home/user/MyProjectDir/install/build-gcc-debug-x86_64/kiara/bin/kiara_basetypetest_server
> 8080 ortecdr
> Server port: 8080
> Protocol: ortecdr
> Register basetype.send_boolean ...
> Register basetype.send_i8 ...
> Register basetype.send_u8 ...
> Register basetype.send_i16 ...
> Register basetype.send_u16 ...
> Register basetype.send_i32 ...
> Register basetype.send_u32 ...
> Register basetype.send_i64 ...
> Register basetype.send_u64 ...
> Register basetype.send_float ...
> Register basetype.send_double ...
> Register basetype.send_string ...
> [1403029785446719] DEBUG in src/KIARA/Impl/Network.cpp:399 :
> Server::addPortListener: 0.0.0.0:8080 http
> [1403029785447246] DEBUG in src/KIARA/Impl/Network.cpp:541 :
> Server::addService: http://0.0.0.0:8080/rpc/basetype
> [1403029785829093] DEBUG in src/KIARA/Impl/Network.cpp:399 :
> Server::addPortListener: 0.0.0.0:8080 http
> [1403029785829746] DEBUG in src/KIARA/Impl/Network.cpp:581 : Register:
> http http://0.0.0.0:8080/rpc/basetype
> Starting server...
> [1403029785829948] DEBUG in src/KIARA/Transport/Server.cpp:48 : Called
> Server::run()
> [1403029785830398] DEBUG in src/KIARA/Transport/Server.cpp:95 : Accepting
> incoming connections ...
> [1403029785830693] DEBUG in src/KIARA/Transport/Server.cpp:110 :
> Registering acceptor ...
> [1403029787990966] DEBUG in src/KIARA/Transport/Server.cpp:119 : Accepting
> new connection
> [1403029787991017] DEBUG in src/KIARA/Transport/Server.cpp:122 : Starting
> new connection
> [1403029787991041] DEBUG in src/KIARA/Transport/Transport.hpp:113 :
> Handling incoming request
> [1403029787991072] DEBUG in src/KIARA/Transport/Transport.hpp:116 :
> connectionHandler_ is !NULL
> [1403029787991098] DEBUG in src/KIARA/Impl/Network.cpp:335 : Called
> ServerConnectionHandler::onStart, detected transport: http
> [1403029787991122] DEBUG in src/KIARA/Transport/Transport.hpp:119 :
> handleStart()
> [1403029787991143] DEBUG in src/KIARA/Transport/HttpTransport.cpp:260 :
> HttpConnection::handleStart() called
> [1403029787991164] DEBUG in src/KIARA/Transport/HttpTransport.cpp:264 :
> start: reset request
> [1403029787991197] DEBUG in src/KIARA/Transport/HttpTransport.cpp:276 :
> HttpConnection::startRead() called
> [1403029787991218] DEBUG in src/KIARA/Transport/HttpTransport.cpp:288 :
> Calling BufferedTcpConnection::startReadBuffer()
> [1403029787991240] DEBUG in src/KIARA/Transport/Transport.cpp:110 :
> BufferedTcpConnection::startReadBuffer() called
>

Here I miss a call to handleRead. It simply never seem to happen.


> [1403029787991565] DEBUG in src/KIARA/Transport/Server.cpp:110 :
> Registering acceptor ...


There is a call missing to BufferedTcpConnection::handleRead and this seems
to be the reason why the tests fail.

Can you spend some time helping me with debugging this issue? Is Philipp
Slusalek ok with it?

Thank you very much
Mathias
-- 
|_|0|_|   Researcher (Network and Linux)
|_|_|0|   Institute of Information Technology
|0|0|0|   Zürich University of Applied Sciences
           http://cloudcomp.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/miwi-middleware/attachments/20140617/e902f9d1/attachment.html>


More information about the Miwi-middleware mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy