{"action":"created","issue":{"url":"https://api.github.com/repos/iclab/centinel/issues/161","labels_url":"https://api.github.com/repos/iclab/centinel/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/iclab/centinel/issues/161/comments","events_url":"https://api.github.com/repos/iclab/centinel/issues/161/events","html_url":"https://github.com/iclab/centinel/issues/161","id":99037616,"number":161,"title":"TLS produces tracebacks constantly","user":{"login":"jakubd","id":6005010,"avatar_url":"https://avatars.githubusercontent.com/u/6005010?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubd","html_url":"https://github.com/jakubd","followers_url":"https://api.github.com/users/jakubd/followers","following_url":"https://api.github.com/users/jakubd/following{/other_user}","gists_url":"https://api.github.com/users/jakubd/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubd/subscriptions","organizations_url":"https://api.github.com/users/jakubd/orgs","repos_url":"https://api.github.com/users/jakubd/repos","events_url":"https://api.github.com/users/jakubd/events{/privacy}","received_events_url":"https://api.github.com/users/jakubd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/iclab/centinel/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-04T18:58:46Z","updated_at":"2015-08-12T20:05:24Z","closed_at":null,"body":"The TLS certificate requests experiment constantly produces constant traceback output when you run centinel-dev.  I think this is related to the fact that not all the TLS requests go through (ie name doesn't resolve, connection doesn't connect cleanly etc) which is expected in an experiment but I don't think we should output tracebacks to the users if this functionality is expected.\r\n\r\nThis is a dump of what I am talking about:\r\n```\r\nvagrant@precise32:~$ sudo centinel-dev\r\n2015-08-04 15:15:08,430: INFO: Centinel started.\r\n2015-08-04 15:15:08,432: INFO: Getting metadata for experiment...\r\n2015-08-04 15:15:11,609: INFO: Running baseline...\r\n2015-08-04 15:15:21,611: INFO: tcpdump started...\r\n2015-08-04 15:15:23,616: INFO: Testing input file world.csv...\r\n2015-08-04 15:15:23,628: INFO: Running HTTP GET requests...\r\n2015-08-04 15:39:34,198: INFO: HTTP GET requests took 1450 seconds for\r\n500 URLs.\r\n2015-08-04 15:39:34,199: INFO: Running TLS certificate requests...\r\n2015-08-04 15:39:34,199: INFO: TLS certificate requests took 0 seconds\r\nfor 0 domains.\r\n2015-08-04 15:39:34,200: INFO: Running DNS requests...\r\n2015-08-04 15:41:35,456: INFO: DNS requests took 121 seconds for 500\r\ndomains.\r\n2015-08-04 15:41:35,457: INFO: Running TCP traceroutes...\r\n2015-08-04 15:44:48,126: INFO: Traceroutes took 192 seconds for 500 domains.\r\n2015-08-04 15:44:48,128: INFO: Running UDP traceroutes...\r\n2015-08-04 15:48:03,760: INFO: Traceroutes took 195 seconds for 500 domains.\r\n2015-08-04 15:48:03,764: INFO: Testing took a total of 1960 seconds.\r\n2015-08-04 15:48:03,765: INFO: Testing input file country.csv...\r\n2015-08-04 15:48:03,774: INFO: Running HTTP GET requests...\r\n2015-08-04 15:55:37,993: INFO: HTTP GET requests took 454 seconds for\r\n397 URLs.\r\n2015-08-04 15:55:37,994: INFO: Running TLS certificate requests...\r\nException in thread Thread-3899:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3900:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3901:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3902:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3904:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3905:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3906:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3907:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3909:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3911:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3912:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3913:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3914:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3915:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -2] Name or service not known\r\n\r\nException in thread Thread-3910:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\ngaierror: [Errno -3] Temporary failure in name resolution\r\n\r\nException in thread Thread-3908:\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"/usr/lib/python2.7/threading.py\", line 504, in run\r\n    self.__target(*self.__args, **self.__kwargs)\r\n  File\r\n\"/usr/local/lib/python2.7/dist-packages/centinel/primitives/tls.py\",\r\nline 48, in get_fingerprint\r\n    raise exception\r\nerror: [Errno 110] Connection timed out\r\n\r\n2015-08-04 15:56:46,846: INFO: TLS certificate requests took 68 seconds\r\nfor 17 domains.\r\n2015-08-04 15:56:46,847: INFO: Running DNS requests...\r\n2015-08-04 15:58:25,679: INFO: DNS requests took 98 seconds for 397 domains.\r\n2015-08-04 15:58:25,680: INFO: Running TCP traceroutes...\r\n2015-08-04 16:01:05,037: INFO: Traceroutes took 159 seconds for 397 domains.\r\n2015-08-04 16:01:05,040: INFO: Running UDP traceroutes...\r\n2015-08-04 16:03:46,905: INFO: Traceroutes took 161 seconds for 397 domains.\r\n2015-08-04 16:03:46,909: INFO: Testing took a total of 943 seconds.\r\n2015-08-04 16:03:46,910: INFO: Waiting for tcpdump to process packets...\r\n2015-08-04 16:03:51,915: INFO: tcpdump stopped.\r\n2015-08-04 16:03:51,916: INFO: Saved pcap to\r\n/root/.centinel/results/pcap_baseline-2015-08-04T15:15:11.610007.pcap.bz2.\r\n2015-08-04 16:03:51,917: INFO: baseline took 0:48:40.307117 to finish.\r\n2015-08-04 16:04:03,732: INFO: Finished running experiments. Look in\r\n/root/.centinel/results for results.\r\nvagrant@precise32:~$\r\n```\r\n\r\nIn the above example, everything runs fine but the tracebacks give the impression that the test doesn't work and I would forgive someone for Ctrl-C'ing out of the test assuming something went wrong.  Maybe a better approach would be to summarize the output into a debug log and not output to standard out?"},"comment":{"url":"https://api.github.com/repos/iclab/centinel/issues/comments/130428481","html_url":"https://github.com/iclab/centinel/issues/161#issuecomment-130428481","issue_url":"https://api.github.com/repos/iclab/centinel/issues/161","id":130428481,"user":{"login":"rpanah","id":6577290,"avatar_url":"https://avatars.githubusercontent.com/u/6577290?v=3","gravatar_id":"","url":"https://api.github.com/users/rpanah","html_url":"https://github.com/rpanah","followers_url":"https://api.github.com/users/rpanah/followers","following_url":"https://api.github.com/users/rpanah/following{/other_user}","gists_url":"https://api.github.com/users/rpanah/gists{/gist_id}","starred_url":"https://api.github.com/users/rpanah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpanah/subscriptions","organizations_url":"https://api.github.com/users/rpanah/orgs","repos_url":"https://api.github.com/users/rpanah/repos","events_url":"https://api.github.com/users/rpanah/events{/privacy}","received_events_url":"https://api.github.com/users/rpanah/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T20:05:24Z","updated_at":"2015-08-12T20:05:24Z","body":"Raising the exception is not necessary in this case since the textual representation is already recorded in the results file. I'm removing the part that raises the exception. This makes the output cleaner."}}