Safe2COVIDApp / bct-server

Bluetooth Contact Tracing for Covid19 - server
5 stars 1 forks source link

Bug running server from command line #142

Closed mitra42 closed 4 years ago

mitra42 commented 4 years ago

I'm seeing the following bug - I think its trying to run against bogus example.com servers, but then the failure is being unable to log that problem.

Note - I don't see this problem in my IDE which makes me wonder if its a problem with something missing from requirements.txt ?

mitraglass:bct-server2 mitra$ python3 server.py --config_file sample_global_config.ini
2020-05-17T10:04:16+1000 [__main__#info] starting server
2020-05-17T10:04:16+1000 [__main__#info] getting data from neighbors
2020-05-17T10:04:16+1000 [__main__#info] getting data from http://example.org/bct-server1/sync?since=1970-01-01T00:00Z
2020-05-17T10:04:16+1000 [__main__#info] getting data from  http://example.org/bct-server2/sync?since=1970-01-01T00:00Z
2020-05-17T10:04:16+1000 [__main__#info] Expiring data
2020-05-17T10:04:16+1000 [-] Site starting on 8080
2020-05-17T10:04:16+1000 [twisted.web.server.Site#info] Starting factory <twisted.web.server.Site object at 0x11042a190>
2020-05-17T10:04:16+1000 [__main__#info] in thread, running <bound method Contacts.delete_from_deletion_list of <contacts.Contacts object at 0x1103d9450>>
2020-05-17T10:04:16+1000 [contacts#info] there are 0 items to delete
2020-05-17T10:04:16+1000 [contacts#info] there are 0 items to delete
2020-05-17T10:04:16+1000 [contacts#info] there are 0 items to delete
2020-05-17T10:04:16+1000 [__main__#info] ran, result is None
2020-05-17T10:04:16+1000 [__main__#info] finished deleting from expired data
2020-05-17T10:04:16+1000 [twisted.web.client._HTTP11ClientFactory#info] Starting factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x110254440>, <HostnameEndpoint example.org:80>)
2020-05-17T10:04:16+1000 [twisted.web.client._HTTP11ClientFactory#info] Starting factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x1103b2e60>, <HostnameEndpoint example.org:80>)
2020-05-17T10:04:16+1000 [twisted.logger._global#warn] server.py:236: builtins.DeprecationWarning: Using readBody with a transport that does not have an abortConnection method
2020-05-17T10:04:16+1000 [__main__#error] Unable to format event {'log_logger': <Logger '__main__'>, 'log_level': <LogLevel=error>, 'log_namespace': '__main__', 'log_source': None, 'log_format': <twisted.python.failure.Failure json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)>, 'log_time': 1589673856.778694}: Log format must be unicode or bytes, not <twisted.python.failure.Failure json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)>
2020-05-17T10:04:16+1000 [__main__#error] Unable to format event {'log_logger': <Logger '__main__'>, 'log_level': <LogLevel=error>, 'log_namespace': '__main__', 'log_source': None, 'log_format': <twisted.python.failure.Failure json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)>, 'log_time': 1589673856.779808}: Log format must be unicode or bytes, not <twisted.python.failure.Failure json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)>
2020-05-17T10:04:16+1000 [twisted.web.client._HTTP11ClientFactory#info] Stopping factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x110254440>, <HostnameEndpoint example.org:80>)
2020-05-17T10:04:16+1000 [twisted.web.client._HTTP11ClientFactory#info] Stopping factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x1103b2e60>, <HostnameEndpoint example.org:80>)
danaronson commented 4 years ago

fixed via #146