honeynet / beeswarm

Honeypot deployment made easy
GNU General Public License v3.0
237 stars 64 forks source link

TypeError when starting #221

Closed jimmycleuren closed 9 years ago

jimmycleuren commented 9 years ago

Dear,

I'm trying to setup beeswarm but cannot seem to get passed the following error:

jimmy@beeswarm-server:~/server_workdir$ beeswarm --server 
2014-12-22 23:29:59,146 (root) Initializing BeeSwarm version 0.7.13
*** Please answer a few configuration options ***
2014-12-22 23:29:59,147 (root) Beeswarm server will be configured using default ssl parameters and network configuration, this could be used to fingerprint the beeswarm server. If you want to customize these options please use the --customize options on first startup.
2014-12-22 23:29:59,148 (beeswarm.shared.helpers) Creating certificate and key.

* Communication between drones (honeypots and clients) and server *
* Please make sure that drones can always contact the Beeswarm server using the information that you are about to enter. *
IP or hostname of server: 192.168.5.10
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/misc/config_actor.py", line 64, in _run
    self.config_commands.bind(SocketNames.CONFIG_COMMANDS)
  File "zmq/backend/cython/socket.pyx", line 429, in zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:3917)
TypeError: expected str, got: <SocketNames.CONFIG_COMMANDS: 'inproc://configCommands'>
<ConfigActor at 0x7f1cca3124b0> failed with TypeError

Traceback (most recent call last):
  File "/usr/local/bin/beeswarm", line 151, in <module>
    reset_password=args.resetpw, max_sessions=args.max_sessions, start_webui=not args.no_webui)
  File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/server.py", line 73, in __init__
    self.prepare_environment(work_dir, customize, server_hostname=server_hostname)
  File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/server.py", line 361, in prepare_environment
    socket.connect(SocketNames.CONFIG_COMMANDS)
  File "zmq/backend/cython/socket.pyx", line 466, in zmq.backend.cython.socket.Socket.connect (zmq/backend/cython/socket.c:4237)
TypeError: expected str, got: <SocketNames.CONFIG_COMMANDS: 'inproc://configCommands'>

When I replace SocketNames.CONFIG_COMMANDS in the corresponding line with "inproc://configCommands" it seems to work but fails on the next line with an enum. Any ideas ?

johnnykv commented 9 years ago

I cannot reproduce. Could you provide your versions of the following: python pyzmq gevent

berqavos commented 9 years ago

Hi johnnykv,

I've got the same error like jimmycleuren. System: Ubuntu 14.04.1 with latest updates python: 2.7 pyzmq: 14.4.1 gevent: 1.0.1 beeswarm: 0.7.13

Installed in a virtuelenv, but also not working without virtualenv.

btw are you somewhere else online like jabber or irc?

johnnykv commented 9 years ago

@bqion ynnhoj on Freenode. Which minor version of python 2.7.9?

berqavos commented 9 years ago

@johnnykv thx for the other online presence sys.version_info -> 2.7.6

johnnykv commented 9 years ago

Root cause for this error is a conflict between enum and Enum34, where the packages would overwrite each other. A quick, not too much tested, fix would be:

pip uninstall enum
pip uninstall Enum34
pip install enum

A proper fix will be included in 0.7.14.

berqavos commented 9 years ago

@johnnykv wow, that was fast and your fix worked. thx!

johnnykv commented 9 years ago

No problem, please note that when 0.7.14 is release you will have to uninstall enum and install Enum34 again. Using Enum34 really is the most correct solutions, but it requires some code changes from my side.

jimmycleuren commented 9 years ago

Now it's working, thanks for the quick response !

johnnykv commented 9 years ago

closed with 202f66bfe5d00bdb46420edc5fc46f8d02abf272

johnnykv commented 9 years ago

This issue remains open until 0.7.14 is released