[Libwebsockets] socket closes after receiving message

dabicho tsukebumi at gmail.com
Wed Apr 20 01:35:23 CEST 2016


Hello.
I am starting out with libwebsockets and websockets in general. With
libwebsockets 1.7.5
I am trying to re-implement the test example with only the http and
status servers

My connection is closing though, after the status message is sent.

I don't see anything strange on the log except "error on reading from skt"
And of course, the fact that it closes (not sure who is closing, if
the client or the server)

How can I further trace what is going wrong?

Here is what I get from my server log:


abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - websocket_server_manager[84]: Configuring
libwebsockets syslog
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - websocket_server_manager[87]: starting server
websocket
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - websocket_server_manager[120]: Using resource
path "/media/sf_rpmbuild/DEVEL/siirfe_gphoto_server-1.0_test/src/"
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
Initial logging level 31
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
Libwebsockets version: 1.7.5 dabicho at localhost.localdomain-
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
IPV6 not compiled in
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
libev support not compiled in
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
Threads: 1 each 1024 fds
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
mem: platform fd map:  8192 bytes
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
mem: per-conn:          400 bytes + protocol rx buf
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
canonical_hostname = localhost.localdomain
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
Compiled with OpenSSL support
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]: SSL
ciphers: 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:HIGH:!aNULL:!eN...28-GCM-SHA256
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
Using non-SSL mode
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
OpenSSL doesn't support ECDH
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 22
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[338]: LWS_CALLBACK_LOCK_POLL
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 32
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[342]: LWS_CALLBACK_UNLOCK_POLL
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
Listening on port 9000
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 27
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_camera_control[437]: Callback: 27
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_camera_control[444]: Inicializado,
"version":"1.7.5 dabicho at localhost.localdomain-",
"hostname":"localhost.localdomain"
abr 19 18:27:53 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - websocket_server_manager[130]: Starting main
loop
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[335]:
LWS_CALLBACK_FILTER_NETWORK_CONNECTION
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 29
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 19
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[338]: LWS_CALLBACK_LOCK_POLL
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 32
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[342]: LWS_CALLBACK_UNLOCK_POLL
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 34
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_camera_control[437]: Callback: 20
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_camera_control[490]: reason 20 not
handled
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_camera_control[437]: Callback: 0
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_camera_control[447]: Conexión
establecida
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]: cache_len 260
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[338]: LWS_CALLBACK_LOCK_POLL
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 34
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[342]: LWS_CALLBACK_UNLOCK_POLL
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[338]: LWS_CALLBACK_LOCK_POLL
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 34
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[342]: LWS_CALLBACK_UNLOCK_POLL
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_camera_control[437]: Callback: 11
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_camera_control[465]: Callback
Writeable
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[338]: LWS_CALLBACK_LOCK_POLL
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 34
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[342]: LWS_CALLBACK_UNLOCK_POLL
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
error on reading from skt
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[338]: LWS_CALLBACK_LOCK_POLL
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 33
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 34
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[342]: LWS_CALLBACK_UNLOCK_POLL
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_camera_control[437]: Callback: 4
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_camera_control[473]: Callback Closed
socket
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
CLOSING pss 0x7f7dc0036bf0 ********
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]: cache_len 110
abr 19 18:28:04 localhost.localdomain siirfe_gphoto_server[18985]:
websocket_server.cxx - callback_http[363]: unhandled callback for 30



More information about the Libwebsockets mailing list