ha7ilm / openwebrx

Open source, multi-user SDR receiver software with a web interface
https://sdr.hu/openwebrx
GNU Affero General Public License v3.0
980 stars 462 forks source link

Service for waterfall crashes all the time #106

Open pe1chl opened 6 years ago

pe1chl commented 6 years ago

I installed OpenWebRx on a PC with SDRPlay RSP1 and I find that it works the first time I try listening, but when the connection to the user is not so good the service for the waterfall crashes with the messages shown below and when the next user connects there is no waterfall anymore, but the receiver still sends audio and is tunable. Then I need to stop and restart the program to get it working again, but never for very long.

Exception happened during processing of request from ('(ip address here)', 34756) Traceback (most recent call last): File "/usr/lib/python2.7/SocketServer.py", line 599, in process_request_thread self.finish_request(request, client_address) File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.7/SocketServer.py", line 657, in init self.finish() File "/usr/lib/python2.7/SocketServer.py", line 716, in finish self.wfile.close() File "/usr/lib/python2.7/socket.py", line 279, in close self.flush() File "/usr/lib/python2.7/socket.py", line 303, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) error: [Errno 32] Broken pipe

pe1chl commented 6 years ago

Any idea what this can be? I see other sites running openwebrx apparently successfully but for us it cannot run more than an hour or so. The system is Debian Jessie with its standard python 2.7 is that not OK?

ha7ilm commented 6 years ago

Is this the only error? When a client disconnects, currently it is OK if it shows an exception like that.

pe1chl commented 6 years ago

Yes this is the error we see on the console, but when the next client connects he gets only audio and no waterfall until the program is stopped and restarted. When starting the program I get this: [openwebrx-main] Configuration script not specified. I will use: "config_webrx.py" [openwebrx-main] nmux_bufsize = 1253376, nmux_bufcnt = 40 [openwebrx-main] Started rtl_thread: rx_sdr -F CF32 -s 5000000 -f 432500000 -p 0 -g 15 -| nmux --bufsize 1253376 --bufcnt 40 --port 4951 --address 127.0.0.1 [openwebrx-main] Waiting for I/Q server to start... nmux: listening on 127.0.0.1:4951 [openwebrx-main] I/Q server started. [openwebrx-main] Starting watchdog threads. nmux: pthread_create() done, clients now: 1 client 0x17653d0: started! [openwebrx-main] Starting spectrum thread. [openwebrx-spectrum] Spectrum thread initialized successfully. [openwebrx-dsp-plugin:csdr] Command = nc -v 127.0.0.1 4951 | csdr fft_cc 4096 2863 | csdr logaveragepower_cf -70 4096 194 | csdr fft_exchange_sides_ff 4096 | csdr compress_fft_adpcm_f_u8 4096 [openwebrx-spectrum] Spectrum thread started. [openwebrx-main] Starting HTTP server. localhost [127.0.0.1] 4951 (?) open nmux: pthread_create() done, clients now: 2 client 0x1765590: started! Using device 1 B0006P0004: mir_sdr_api_version=2.100000 mir_sdr_hw_version=1 Found 1 antenna(s): RX Found 2 gain(s): IFGR RFGR Found 2 frequencies: RF CORR Found 13 sample rates: 250000 500000 1000000 2000000 2048000 3000000 4000000 5000000 6000000 7000000 8000000 9000000 10000000 Found 8 bandwidths: 200000 300000 600000 1536000 5000000 6000000 7000000 8000000 [INFO] Using format CS16. Using output format: CF32 (input format CS16) Sampling at 5000000 S/s. Tuned to 432500000 Hz. Tuner gain set to 15.00 dB. Reading samples in sync mode... client 0x17653d0: CS_THREAD_FINISHED, client_goto_source = 2, errno = 32

Is that OK?

pe1chl commented 6 years ago

After another test with a client that just closes the browser I see this:

[openwebrx-httpd:ws] exception: <class 'socket.error'> [Errno 32] Broken pipe File "./openwebrx.py", line 488, in do_GET rxws.send(self, temp_audio_data, "AUD ") File "/home/scoop/Downloads/openwebrx/rxws.py", line 164, in send myself.wfile.write(header+data_to_send) File "/usr/lib/python2.7/socket.py", line 324, in write self.flush() File "/usr/lib/python2.7/socket.py", line 303, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) [openwebrx-httpd] client 44.137.41.97#8da419eaa1862bbe588ba171b1774402 :: client being closed. [openwebrx-dsp-plugin:csdr] try_delete_pipes() :: [Errno 2] No such file or directory: '/tmp/openwebrx_pipe_140278170259536_bpf_pipe' [openwebrx-dsp-plugin:csdr] try_delete_pipes() :: [Errno 2] No such file or directory: '/tmp/openwebrx_pipe_140278170259536_shift_pipe' [openwebrx-dsp-plugin:csdr] try_delete_pipes() :: [Errno 2] No such file or directory: '/tmp/openwebrx_pipe_140278170259536_squelch_pipe' [openwebrx-dsp-plugin:csdr] try_delete_pipes() :: [Errno 2] No such file or directory: '/tmp/openwebrx_pipe_140278170259536_smeter_pipe'

Exception happened during processing of request from ('44.137.41.97', 45157) Traceback (most recent call last): File "/usr/lib/python2.7/SocketServer.py", line 599, in process_request_thread self.finish_request(request, client_address) File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.7/SocketServer.py", line 657, in init self.finish() File "/usr/lib/python2.7/SocketServer.py", line 716, in finish self.wfile.close() File "/usr/lib/python2.7/socket.py", line 279, in close self.flush() File "/usr/lib/python2.7/socket.py", line 303, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) error: [Errno 32] Broken pipe

However this time the program still works OK after reconnecting. I have rebooted the system earlier today so maybe the problem has solved itself by magic...

ha7ilm commented 6 years ago

OK, then please send the full console output of OpenWebRX if you encounter this again.