Closed jgedeon120 closed 10 years ago
Try running the following commands before installing Beeswarm:
$ sudo apt-get install libffi-dev build-essential python-dev python-pip libssl-dev libxml2-dev libxslt1-dev
$ pip install pydes --allow-external pydes --allow-unverified pydes
Just updates the install docs to clarify this.
Johnny,
The pip install pydes part fails.
pip install pydes --allow-external pydes --allow-unverified pydes
Usage: /usr/bin/pip install [OPTIONS] PACKAGE_NAMES...
/usr/bin/pip install: error: no such option: --allow-external
On Tue, Aug 26, 2014 at 10:16 PM, Johnny Vestergaard < notifications@github.com> wrote:
Try running the following commands before installing Beeswarm:
$ sudo apt-get install libffi-dev build-essential python-dev python-pip libssl-dev libxml2-dev libxslt1-dev $ pip install pydes --allow-external pydes --allow-unverified pydes
Just updates the install docs to clarify this.
— Reply to this email directly or view it on GitHub https://github.com/honeynet/beeswarm/issues/187#issuecomment-53519121.
Registered Linux User # 379282
The problem was ubuntu 12.04.5 installed pip 1.0. Upgrading, pip install --upgrade pip installed the newer version where --allow-external was a valid option.
On Wed, Aug 27, 2014 at 6:42 AM, Joe Gedeon joe.gedeon@gmail.com wrote:
Johnny,
The pip install pydes part fails.
pip install pydes --allow-external pydes --allow-unverified pydes
Usage: /usr/bin/pip install [OPTIONS] PACKAGE_NAMES...
/usr/bin/pip install: error: no such option: --allow-external
On Tue, Aug 26, 2014 at 10:16 PM, Johnny Vestergaard < notifications@github.com> wrote:
Try running the following commands before installing Beeswarm:
$ sudo apt-get install libffi-dev build-essential python-dev python-pip libssl-dev libxml2-dev libxslt1-dev $ pip install pydes --allow-external pydes --allow-unverified pydes
Just updates the install docs to clarify this.
— Reply to this email directly or view it on GitHub https://github.com/honeynet/beeswarm/issues/187#issuecomment-53519121.
Registered Linux User # 379282
Registered Linux User # 379282
Ok, sound good. So everything works installwise now?
Testing now.
On Wed, Aug 27, 2014 at 6:49 AM, Johnny Vestergaard < notifications@github.com> wrote:
Ok, sound good. So everything works installwise now?
— Reply to this email directly or view it on GitHub https://github.com/honeynet/beeswarm/issues/187#issuecomment-53553463.
Registered Linux User # 379282
Got the install done, now here are the errors to access the interface.
Browser: Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Console:
OperationalError: (OperationalError) unable to open database file None None
<Greenlet at 0x2b2ceb0: <bound method Scheduler.do_classification of <beeswarm.server.misc.scheduler.Scheduler object at 0x2b49210>>> failed with OperationalError
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/scheduler.py", line 76, in do_classification
classifier.classify_bait_session(db_session=db_session)
File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/misc/classifier.py", line 86, in classify_bait_session
.filter(BaitSession.timestamp < min_datetime).all()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2300, in all
return list(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2412, in iter
return self._execute_and_instances(context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2425, in _execute_and_instances
close_with_result=True)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2416, in _connection_from_session
**kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind
conn = bind.contextual_connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1799, in contextual_connect
self.pool.connect(),
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 338, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 641, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 440, in checkout
rec = pool._do_get()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1055, in _do_get
return self._create_connection()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 285, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 411, in init
self.connection = self.__connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 537, in __connect
connection = self.__pool._creator()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 96, in connect
connection_invalidated=invalidated
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
<Greenlet at 0x4fdae10: <bound method Scheduler.do_classification of <beeswarm.server.misc.scheduler.Scheduler object at 0x2b49210>>> failed with OperationalError
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/scheduler.py", line 76, in do_classification
classifier.classify_bait_session(db_session=db_session)
File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/misc/classifier.py", line 86, in classify_bait_session
.filter(BaitSession.timestamp < min_datetime).all()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2300, in all
return list(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2412, in iter
return self._execute_and_instances(context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2425, in _execute_and_instances
close_with_result=True)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2416, in _connection_from_session
**kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind
conn = bind.contextual_connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1799, in contextual_connect
self.pool.connect(),
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 338, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 641, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 440, in checkout
rec = pool._do_get()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1055, in _do_get
return self._create_connection()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 285, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 411, in init
self.connection = self.__connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 537, in __connect
connection = self.__pool._creator()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 96, in connect
connection_invalidated=invalidated
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
<Greenlet at 0x2b2ceb0: <bound method Scheduler.do_classification of <beeswarm.server.misc.scheduler.Scheduler object at 0x2b49210>>> failed with OperationalError
Registered Linux User # 379282
could you try the following after install:
mkdir s
cd s
beeswarm -v --server
and post the entire console output (including the initial logging) here.
root@beeswarm-1:~# mkdir s root@beeswarm-1:~# cd s root@beeswarm-1:~/s# beeswarm -v --server 2014-08-27 07:34:28,885 (root) Initializing BeeSwarm version 0.4.8 * Please answer a few configuration options * 2014-08-27 07:34:28,886 (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-08-27 07:34:28,886 (beeswarm.shared.helpers) Creating SSL Certificate and Key.
Default password for the admin account is: lhooyipdbibcbn
2014-08-27 07:34:36,505 (beeswarm.server.misc.config_actor) Sending config to subscribers. 2014-08-27 07:34:36,507 (beeswarm.server.server) Starting server listening on port 5000 2014-08-27 07:34:36,508 (beeswarm.shared.helpers) Privileges dropped, running as nobody/nogroup. 2014-08-27 07:34:36,509 (beeswarm.server.server) Server started and priviliges dropped. 2014-08-27 07:34:36,511 (beeswarm.server.misc.config_actor) Received command: PUBLISH_CONFIG 2014-08-27 07:34:36,511 (beeswarm.server.misc.config_actor) Sending config to subscribers. 2014-08-27 07:34:36,512 (beeswarm.server.db.session_persister) Config received 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/scheduler.py", line 76, in do_classification classifier.classify_bait_session(db_session=db_session) File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/misc/classifier.py", line 86, in classify_bait_session .filter(BaitSession.timestamp < min_datetime).all() File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2300, in all return list(self) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2412, in iter return self._execute_and_instances(context) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2425, in _execute_and_instances close_with_result=True) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2416, in _connection_from_session *kw) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 854, in connection close_with_result=close_with_result) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind return self.transaction._connection_for_bind(engine) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind conn = bind.contextual_connect() File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1799, in contextual_connect self.pool.connect(), File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 338, in connect return _ConnectionFairy._checkout(self) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 641, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 440, in checkout rec = pool._do_get() File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1055, in _do_get return self._create_connection() File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 285, in _create_connection return _ConnectionRecord(self) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 411, in init self.connection = self.connect() File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 537, in connect connection = self.__pool._creator() File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 96, in connect connection_invalidated=invalidated File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause reraise(type(exception), exception, tb=exc_tb) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 90, in connect return dialect.connect(_cargs, _cparams) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 377, in connect return self.dbapi.connect(_cargs, *_cparams) OperationalError: (OperationalError) unable to open database file None None <Greenlet at 0x5454b90: <bound method Scheduler.do_classification of <beeswarm.server.misc.scheduler.Scheduler object at 0x31b1190>>> failed with OperationalError
On Wed, Aug 27, 2014 at 7:32 AM, Johnny Vestergaard < notifications@github.com> wrote:
could you try the following after install:
mkdir s cd s beeswarm -v --server
and post the entire console output (including the initial logging) here.
— Reply to this email directly or view it on GitHub https://github.com/honeynet/beeswarm/issues/187#issuecomment-53557067.
Registered Linux User # 379282
Here is the testing output on Ubuntu 14.04 with the install directions.
beeswarm --server
2014-08-27 19:32:52,206 (root) Initializing BeeSwarm version 0.4.10
*** Please answer a few configuration options ***
2014-08-27 19:32:52,208 (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-08-27 19:32:52,210 (beeswarm.shared.helpers) Creating SSL 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.100.149
2014-08-27 19:32:58,462 (beeswarm.server.webapp.auth) Created default admin account for the beeswarm server.
****************************************************************************
Default password for the admin account is: twxaznpastscjw
****************************************************************************
2014-08-27 19:32:58,480 (beeswarm.server.server) Starting server listening on port 5000
2014-08-27 19:32:58,513 (beeswarm.shared.helpers) Privileges dropped, running as nobody/nogroup.
2014-08-27 19:32:58,514 (beeswarm.server.server) Server started and priviliges dropped.
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/scheduler.py", line 76, in do_classification
classifier.classify_bait_session(db_session=db_session)
File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/misc/classifier.py", line 86, in classify_bait_session
.filter(BaitSession.timestamp < min_datetime).all()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2300, in all
return list(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2412, in __iter__
return self._execute_and_instances(context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2425, in _execute_and_instances
close_with_result=True)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2416, in _connection_from_session
**kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind
conn = bind.contextual_connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1799, in contextual_connect
self.pool.connect(),
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 338, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 641, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 440, in checkout
rec = pool._do_get()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1055, in _do_get
return self._create_connection()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 285, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 411, in __init__
self.connection = self.__connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 537, in __connect
connection = self.__pool._creator()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 96, in connect
connection_invalidated=invalidated
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
<Greenlet at 0x7fcee4dd7cd0: <bound method Scheduler.do_classification of <beeswarm.server.misc.scheduler.Scheduler object at 0x7fcec806d790>>> failed with OperationalError
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/scheduler.py", line 76, in do_classification
classifier.classify_bait_session(db_session=db_session)
File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/misc/classifier.py", line 86, in classify_bait_session
.filter(BaitSession.timestamp < min_datetime).all()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2300, in all
return list(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2412, in __iter__
return self._execute_and_instances(context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2425, in _execute_and_instances
close_with_result=True)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2416, in _connection_from_session
**kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind
conn = bind.contextual_connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1799, in contextual_connect
self.pool.connect(),
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 338, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 641, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 440, in checkout
rec = pool._do_get()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1055, in _do_get
return self._create_connection()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 285, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 411, in __init__
self.connection = self.__connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 537, in __connect
connection = self.__pool._creator()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 96, in connect
connection_invalidated=invalidated
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
<Greenlet at 0x7fcee4dd7eb0: <bound method Scheduler.do_classification of <beeswarm.server.misc.scheduler.Scheduler object at 0x7fcec806d790>>> failed with OperationalError
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/scheduler.py", line 76, in do_classification
classifier.classify_bait_session(db_session=db_session)
File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/misc/classifier.py", line 86, in classify_bait_session
.filter(BaitSession.timestamp < min_datetime).all()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2300, in all
return list(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2412, in __iter__
return self._execute_and_instances(context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2425, in _execute_and_instances
close_with_result=True)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2416, in _connection_from_session
**kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind
conn = bind.contextual_connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1799, in contextual_connect
self.pool.connect(),
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 338, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 641, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 440, in checkout
rec = pool._do_get()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1055, in _do_get
return self._create_connection()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 285, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 411, in __init__
self.connection = self.__connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 537, in __connect
connection = self.__pool._creator()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 96, in connect
connection_invalidated=invalidated
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
<Greenlet at 0x7fcee4dd7cd0: <bound method Scheduler.do_classification of <beeswarm.server.misc.scheduler.Scheduler object at 0x7fcec806d790>>> failed with OperationalError
192.168.100.69 - - [2014-08-27 19:33:37] "GET / HTTP/1.1" 302 675 0.029706
192.168.100.69 - - [2014-08-27 19:33:37] "GET /login?next=%2F HTTP/1.1" 200 2595 0.084788
192.168.100.69 - - [2014-08-27 19:33:37] "GET /static/css/bootstrap.min.css HTTP/1.1" 200 106636 0.012465
192.168.100.69 - - [2014-08-27 19:33:37] "GET /static/js/jquery-1.9.1.min.js HTTP/1.1" 200 93246 0.006389
192.168.100.69 - - [2014-08-27 19:33:37] "GET /static/thirdparty/fuelux/css/fuelux-responsive.css HTTP/1.1" 200 25153 0.004803
192.168.100.69 - - [2014-08-27 19:33:37] "GET /static/js/main.js HTTP/1.1" 200 1934 0.006585
192.168.100.69 - - [2014-08-27 19:33:37] "GET /static/thirdparty/fuelux/loader.min.js HTTP/1.1" 200 98200 0.005796
192.168.100.69 - - [2014-08-27 19:33:37] "GET /static/css/bootstrap-responsive.min.css HTTP/1.1" 200 17468 0.006509
192.168.100.69 - - [2014-08-27 19:33:37] "GET /static/thirdparty/fuelux/css/fuelux.css HTTP/1.1" 200 174920 0.039038
192.168.100.69 - - [2014-08-27 19:33:37] "GET /static/css/font-awesome.min.css HTTP/1.1" 200 18399 0.003895
192.168.100.69 - - [2014-08-27 19:33:38] "GET /favicon.ico HTTP/1.1" 404 674 0.004481
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/scheduler.py", line 76, in do_classification
classifier.classify_bait_session(db_session=db_session)
File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/misc/classifier.py", line 86, in classify_bait_session
.filter(BaitSession.timestamp < min_datetime).all()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2300, in all
return list(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2412, in __iter__
return self._execute_and_instances(context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2425, in _execute_and_instances
close_with_result=True)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2416, in _connection_from_session
**kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind
conn = bind.contextual_connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1799, in contextual_connect
self.pool.connect(),
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 338, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 641, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 440, in checkout
rec = pool._do_get()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1055, in _do_get
return self._create_connection()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 285, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 411, in __init__
self.connection = self.__connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 537, in __connect
connection = self.__pool._creator()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 96, in connect
connection_invalidated=invalidated
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
<Greenlet at 0x7fcee4dd7eb0: <bound method Scheduler.do_classification of <beeswarm.server.misc.scheduler.Scheduler object at 0x7fcec806d790>>> failed with OperationalError
2014-08-27 19:33:42,363 (beeswarm.server.webapp.app) Exception on /login [POST]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/webapp/app.py", line 575, in login
user = db_session.query(User).filter(User.id == form.username.data).one()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2369, in one
ret = list(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2412, in __iter__
return self._execute_and_instances(context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2425, in _execute_and_instances
close_with_result=True)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2416, in _connection_from_session
**kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind
conn = bind.contextual_connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1799, in contextual_connect
self.pool.connect(),
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 338, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 641, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 440, in checkout
rec = pool._do_get()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1055, in _do_get
return self._create_connection()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 285, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 411, in __init__
self.connection = self.__connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 537, in __connect
connection = self.__pool._creator()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 96, in connect
connection_invalidated=invalidated
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
192.168.100.69 - - [2014-08-27 19:33:42] "POST /login?next=%2F HTTP/1.1" 500 412 0.011884
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/scheduler.py", line 76, in do_classification
classifier.classify_bait_session(db_session=db_session)
File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/misc/classifier.py", line 86, in classify_bait_session
.filter(BaitSession.timestamp < min_datetime).all()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2300, in all
return list(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2412, in __iter__
return self._execute_and_instances(context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2425, in _execute_and_instances
close_with_result=True)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2416, in _connection_from_session
**kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind
conn = bind.contextual_connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1799, in contextual_connect
self.pool.connect(),
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 338, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 641, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 440, in checkout
rec = pool._do_get()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1055, in _do_get
return self._create_connection()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 285, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 411, in __init__
self.connection = self.__connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 537, in __connect
connection = self.__pool._creator()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 96, in connect
connection_invalidated=invalidated
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
<Greenlet at 0x7fcec132ae10: <bound method Scheduler.do_classification of <beeswarm.server.misc.scheduler.Scheduler object at 0x7fcec806d790>>> failed with OperationalError
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/scheduler.py", line 76, in do_classification
classifier.classify_bait_session(db_session=db_session)
File "/usr/local/lib/python2.7/dist-packages/beeswarm/server/misc/classifier.py", line 86, in classify_bait_session
.filter(BaitSession.timestamp < min_datetime).all()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2300, in all
return list(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2412, in __iter__
return self._execute_and_instances(context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2425, in _execute_and_instances
close_with_result=True)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2416, in _connection_from_session
**kw)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind
conn = bind.contextual_connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1799, in contextual_connect
self.pool.connect(),
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 338, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 641, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 440, in checkout
rec = pool._do_get()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1055, in _do_get
return self._create_connection()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 285, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 411, in __init__
self.connection = self.__connect()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 537, in __connect
connection = self.__pool._creator()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 96, in connect
connection_invalidated=invalidated
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
<Greenlet at 0x7fcec132a230: <bound method Scheduler.do_classification of <beeswarm.server.misc.scheduler.Scheduler object at 0x7fcec806d790>>> failed with OperationalError
^CKeyboardInterrupt
2014-08-27 19:34:04,254 (root) Stopping server.
Finally got it running on 14.04 passing the --customize flag. Here is the errors that I did come up.
2014-08-27 19:44:24,834 (beeswarm.shared.helpers) Creating SSL 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.100.149
TCP port for session data (default: 5712) :
TCP port for drone commands(default: 5713) :
2014-08-27 19:44:38,466 (beeswarm.server.webapp.auth) Created default admin account for the beeswarm server.
****************************************************************************
Default password for the admin account is: qhbgqxxopblifi
****************************************************************************
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/server.py", line 115, in message_proxy
drone_data_inbound.bind('tcp://*:{0}'.format(self.config['network']['zmq_port']))
File "socket.pyx", line 444, in zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:4076)
File "checkrc.pxd", line 21, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:6032)
ZMQError: Invalid argument
<Greenlet at 0x7fd944c2e870: <bound method Server.message_proxy of <beeswarm.server.server.Server object at 0x7fd94398f210>>('/home/hurricane/server_workdir')> failed with ZMQError
can you confirm that the issue involving
OperationalError: (OperationalError) unable to open database file None None
does not happen when starting Beeswarm as a non-root user (and without sudo)?
/me hangs head low and mumbles:
Yes it does not happen as a normal user. :/
On Thu, Aug 28, 2014 at 4:30 PM, Johnny Vestergaard < notifications@github.com> wrote:
can you confirm that the issue involving
OperationalError: (OperationalError) unable to open database file None None
does not happen when starting Beeswarm as a non-root user (and without sudo)?
— Reply to this email directly or view it on GitHub https://github.com/honeynet/beeswarm/issues/187#issuecomment-53792739.
Registered Linux User # 379282
Ok, I think i have identified the problem...We are using zmq pipes for internal messaging, these pipes are created before privs are dropped:
srwxr-xr-x 1 root staff 0 Aug 31 21:09 configCommands
srwxr-xr-x 1 root staff 0 Aug 31 21:09 configPublisher
srwxr-xr-x 1 root staff 0 Aug 31 21:09 droneCommandReceiver
Which means that after dropping privs to "Nobody" we can only read the socket - not write. The solution is to convert to inprocess pipes instead of ipc. I will keep this bug open until we have implemented the change to ipc.
AFAIK this was fixed with 54e77853a67cc9047bcb76748585fa891a19ebdf, please reopen if that is not correct. You can upgrade using pip.
First thanks for all the hard work that has been put into this. I wanted to test this out and tried to follow the easy instructions from the main page but I have been running into multiple issues. First the requirements.txt was reporting as missing. So from the git clone I moved them into build/beeswarm. This allowed me to get further. Then the following were attempted: pip install ez_setup apt-get install build-essential apt-get install python-dev Here is the pip.log.