{"action":"created","issue":{"url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/887","repository_url":"https://api.github.com/repos/cuckoosandbox/cuckoo","labels_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/887/labels{/name}","comments_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/887/comments","events_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/887/events","html_url":"https://github.com/cuckoosandbox/cuckoo/issues/887","id":151590396,"number":887,"title":"Error when running cuckoo in parallel","user":{"login":"Nadacsc","id":18310199,"avatar_url":"https://avatars.githubusercontent.com/u/18310199?v=3","gravatar_id":"","url":"https://api.github.com/users/Nadacsc","html_url":"https://github.com/Nadacsc","followers_url":"https://api.github.com/users/Nadacsc/followers","following_url":"https://api.github.com/users/Nadacsc/following{/other_user}","gists_url":"https://api.github.com/users/Nadacsc/gists{/gist_id}","starred_url":"https://api.github.com/users/Nadacsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nadacsc/subscriptions","organizations_url":"https://api.github.com/users/Nadacsc/orgs","repos_url":"https://api.github.com/users/Nadacsc/repos","events_url":"https://api.github.com/users/Nadacsc/events{/privacy}","received_events_url":"https://api.github.com/users/Nadacsc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-28T09:26:23Z","updated_at":"2016-04-28T10:06:39Z","closed_at":null,"body":"I am using the latest cuckoo 2.0 RC1\r\n\r\nand my cuckoo settings is perfect, however when I tried to run it in parallel I encountered some errors: \r\n```\r\nTraceback (most recent call last):\r\n  File \"./cuckoo.py\", line 118, in <module>\r\n    test=args.test)\r\n  File \"./cuckoo.py\", line 78, in cuckoo_init\r\n    ResultServer()\r\n  File \"/var/tmp/cuckoo/lib/cuckoo/common/utils.py\", line 183, in __call__\r\n    cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)\r\n  File \"/var/tmp/cuckoo/lib/cuckoo/core/resultserver.py\", line 46, in __init__\r\n    self.port = int(self.cfg.resultserver.port)\r\nTypeError: int() argument must be a string or a number, not 'NoneType'\r\n\r\n```\r\nI understand that this is referring to the port no which I have commented out in the cuckoo.conf , however with each machine in virtualbox.conf I specified a specific port .. so my complete settings are as follows: \r\n\r\n```\r\n# Specify a comma-separated list of available machines to be used. For each\r\n# specified ID you have to define a dedicated section containing the details\r\n# on the respective machine. (E.g. cuckoo1,cuckoo2,cuckoo3)\r\nmachines = ee_mm,ee_mm2\r\n\r\n[ee_mm]\r\n# Specify the label name of the current machine as specified in your\r\n# VirtualBox configuration.\r\nlabel = ee_mm\r\n\r\n# Specify the operating system platform used by current machine\r\n# [windows/darwin/linux].\r\nplatform = windows\r\n\r\n# Specify the IP address of the current virtual machine. Make sure that the\r\n# IP address is valid and that the host machine is able to reach it. If not,\r\n# the analysis will fail.\r\nip = 192.168.56.101\r\n\r\n# (Optional) Specify the snapshot name to use. If you do not specify a snapshot\r\n# name, the VirtualBox MachineManager will use the current snapshot.\r\n# Example (Snapshot1 is the snapshot name):\r\n snapshot = snapshot1\r\n\r\n# (Optional) Specify the name of the network interface that should be used\r\n# when dumping network traffic from this machine with tcpdump. If specified,\r\n# overrides the default interface specified in auxiliary.conf\r\n# Example (vboxnet0 is the interface name):\r\n interface = vboxnet0\r\n\r\n# (Optional) Specify the IP of the Result Server, as your virtual machine sees it.\r\n# The Result Server will always bind to the address and port specified in cuckoo.conf,\r\n# however you could set up your virtual network to use NAT/PAT, so you can specify here \r\n# the IP address for the Result Server as your machine sees it. If you don't specify an\r\n# address here, the machine will use the default value from cuckoo.conf.\r\n# NOTE: if you set this option you have to set result server IP to 0.0.0.0 in cuckoo.conf.\r\n# Example:\r\n resultserver_ip = 192.168.56.1\r\n\r\n# (Optional) Specify the port for the Result Server, as your virtual machine sees it.\r\n# The Result Server will always bind to the address and port specified in cuckoo.conf,\r\n# however you could set up your virtual network to use NAT/PAT, so you can specify here\r\n# the port for the Result Server as your machine sees it. If you don't specify a port\r\n# here, the machine will use the default value from cuckoo.conf.\r\n# Example:\r\nresultserver_port = 2042\r\n\r\n# (Optional) Set your own tags. These are comma separated and help to identify\r\n# specific VMs. You can run samples on VMs with tag you require.\r\n# tags = windows_xp_sp3,32_bit,acrobat_reader_6\r\n\r\n[ee_mm2]\r\n# Specify the label name of the current machine as specified in your\r\n# VirtualBox configuration.\r\nlabel = ee_mm2\r\n\r\n# Specify the operating system platform used by current machine\r\n# [windows/darwin/linux].\r\nplatform = windows\r\n\r\n# Specify the IP address of the current virtual machine. Make sure that the\r\n# IP address is valid and that the host machine is able to reach it. If not,\r\n# the analysis will fail.\r\nip = 192.168.57.101\r\n\r\n# (Optional) Specify the snapshot name to use. If you do not specify a snapshot\r\n# name, the VirtualBox MachineManager will use the current snapshot.\r\n# Example (Snapshot1 is the snapshot name):\r\n snapshot = snapshot2\r\n\r\n# (Optional) Specify the name of the network interface that should be used\r\n# when dumping network traffic from this machine with tcpdump. If specified,\r\n# overrides the default interface specified in auxiliary.conf\r\n# Example (vboxnet0 is the interface name):\r\n interface = vboxnet1\r\n\r\n# (Optional) Specify the IP of the Result Server, as your virtual machine sees it.\r\n# The Result Server will always bind to the address and port specified in cuckoo.conf,\r\n# however you could set up your virtual network to use NAT/PAT, so you can specify here \r\n# the IP address for the Result Server as your machine sees it. If you don't specify an\r\n# address here, the machine will use the default value from cuckoo.conf.\r\n# NOTE: if you set this option you have to set result server IP to 0.0.0.0 in cuckoo.conf.\r\n# Example:\r\n resultserver_ip = 192.168.57.1\r\n\r\n# (Optional) Specify the port for the Result Server, as your virtual machine sees it.\r\n# The Result Server will always bind to the address and port specified in cuckoo.conf,\r\n# however you could set up your virtual network to use NAT/PAT, so you can specify here\r\n# the port for the Result Server as your machine sees it. If you don't specify a port\r\n# here, the machine will use the default value from cuckoo.conf.\r\n# Example:\r\nresultserver_port = 2043\r\n\r\n# (Optional) Set your own tags. These are comma separated and help to identify\r\n# specific VMs. You can run samples on VMs with tag you require.\r\n# tags = windows_xp_sp3,32_bit,acrobat_reader_6\r\n\r\n```\r\n\r\nand when setting the two cuckoo machines to the same port ( and specifying the result port on cuckoo.conf as 2042 I got the following error: \r\n\r\n```\r\n2016-04-28 10:29:08,748 [lib.cuckoo.core.scheduler] INFO: Starting analysis of FILE \"f0838224e3bd814d03dcd36133af280c\" (task #95, options \"\")\r\n2016-04-28 10:29:08,941 [lib.cuckoo.core.scheduler] INFO: Task #95: acquired machine ee_mm (label=ee_mm)\r\n2016-04-28 10:29:08,949 [modules.auxiliary.sniffer] INFO: Started sniffer with PID 5744 (interface=vboxnet0, host=192.168.56.101\r\nsnapshot = snapshot1\r\ninterface = vboxnet0\r\nresultserver_ip = 192.168.56.1, pcap=/var/tmp/cuckoo/storage/analyses/95/dump.pcap)\r\ntcpdump: syntax error\r\n2016-04-28 10:29:09,975 [lib.cuckoo.core.scheduler] INFO: Starting analysis of FILE \"f1218dd4e77a7c66478c53f6ff8ff9b9\" (task #96, options \"\")\r\n2016-04-28 10:29:10,286 [lib.cuckoo.core.scheduler] INFO: Task #96: acquired machine ee_mm2 (label=ee_mm2)\r\n2016-04-28 10:29:10,294 [modules.auxiliary.sniffer] INFO: Started sniffer with PID 5803 (interface=vboxnet0, host=192.168.57.101\r\nsnapshot = snapshot2\r\ninterface = vboxnet1\r\nresultserver_ip = 192.168.57.1, pcap=/var/tmp/cuckoo/storage/analyses/96/dump.pcap)\r\ntcpdump: syntax error\r\n2016-04-28 10:29:15,856 [lib.cuckoo.core.guest] INFO: Starting analysis on guest (id=ee_mm, ip=192.168.56.101\r\nsnapshot = snapshot1\r\ninterface = vboxnet0\r\nresultserver_ip = 192.168.56.1)\r\n2016-04-28 10:29:18,630 [lib.cuckoo.core.guest] INFO: Starting analysis on guest (id=ee_mm2, ip=192.168.57.101\r\nsnapshot = snapshot2\r\ninterface = vboxnet1\r\nresultserver_ip = 192.168.57.1)\r\n2016-04-28 10:29:19,500 [lib.cuckoo.core.scheduler] ERROR: Failure in AnalysisManager.run\r\nTraceback (most recent call last):\r\n  File \"/var/tmp/cuckoo/lib/cuckoo/core/scheduler.py\", line 447, in run\r\n    self.launch_analysis()\r\n  File \"/var/tmp/cuckoo/lib/cuckoo/core/scheduler.py\", line 339, in launch_analysis\r\n    self.guest_manage(options)\r\n  File \"/var/tmp/cuckoo/lib/cuckoo/core/scheduler.py\", line 257, in guest_manage\r\n    guest.start_analysis(options, monitor)\r\n  File \"/var/tmp/cuckoo/lib/cuckoo/core/guest.py\", line 373, in start_analysis\r\n    self.wait_available()\r\n  File \"/var/tmp/cuckoo/lib/cuckoo/core/guest.py\", line 268, in wait_available\r\n    socket.create_connection((self.ipaddr, self.port), 1).close()\r\n  File \"/usr/lib/python2.7/socket.py\", line 553, in create_connection\r\n    for res in getaddrinfo(host, port, 0, SOCK_STREAM):\r\n  File \"/usr/lib/python2.7/encodings/idna.py\", line 164, in encode\r\n    result.append(ToASCII(label))\r\n  File \"/usr/lib/python2.7/encodings/idna.py\", line 73, in ToASCII\r\n    raise UnicodeError(\"label empty or too long\")\r\nUnicodeError: label empty or too long\r\n2016-04-28 10:29:20,774 [lib.cuckoo.core.scheduler] ERROR: Failure in AnalysisManager.run\r\n\r\n```\r\n\r\nplease help !"},"comment":{"url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/comments/215375873","html_url":"https://github.com/cuckoosandbox/cuckoo/issues/887#issuecomment-215375873","issue_url":"https://api.github.com/repos/cuckoosandbox/cuckoo/issues/887","id":215375873,"user":{"login":"Nadacsc","id":18310199,"avatar_url":"https://avatars.githubusercontent.com/u/18310199?v=3","gravatar_id":"","url":"https://api.github.com/users/Nadacsc","html_url":"https://github.com/Nadacsc","followers_url":"https://api.github.com/users/Nadacsc/followers","following_url":"https://api.github.com/users/Nadacsc/following{/other_user}","gists_url":"https://api.github.com/users/Nadacsc/gists{/gist_id}","starred_url":"https://api.github.com/users/Nadacsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nadacsc/subscriptions","organizations_url":"https://api.github.com/users/Nadacsc/orgs","repos_url":"https://api.github.com/users/Nadacsc/repos","events_url":"https://api.github.com/users/Nadacsc/events{/privacy}","received_events_url":"https://api.github.com/users/Nadacsc/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T10:06:39Z","updated_at":"2016-04-28T10:06:39Z","body":"I am very sorry I didn't quit get it \r\ndo you mean I have only to use 1 interface ( vboxnet0) only and then the guest vms will be 192.168.56.1 and 198.168.56.2 ? so like that the result ip and port will be only one ? but how can tcpdump distinguish the connections that came from the first vm and the second ?"}}