Giter Site home page Giter Site logo

RoottheBox Setup problem about rootthebox HOT 20 CLOSED

moloch-- avatar moloch-- commented on July 24, 2024
RoottheBox Setup problem

from rootthebox.

Comments (20)

 avatar commented on July 24, 2024 1

All solved, I have removed the special characters and I have lengthened the password. No more errors at the moment: P

Thank you very much @jeffg2k ;D

from rootthebox.

hatim401 avatar hatim401 commented on July 24, 2024

Please let me how to rectify this error.

from rootthebox.

moloch-- avatar moloch-- commented on July 24, 2024

Can you post the versions numbers ./rootthebox.py --version this is an odd issue.

from rootthebox.

hatim401 avatar hatim401 commented on July 24, 2024

ubuntu

from rootthebox.

moloch-- avatar moloch-- commented on July 24, 2024

Are you using MySQL or SQLite?

from rootthebox.

hatim401 avatar hatim401 commented on July 24, 2024

I am using MySQL as a database.

from rootthebox.

moloch-- avatar moloch-- commented on July 24, 2024

What version of Ubuntu (i'm not able to reproduce the error)?

from rootthebox.

hatim401 avatar hatim401 commented on July 24, 2024

Ubuntu version is 12.04.
I have tried this on Kali linux too, but shows same error.

CAn you send me your mail id so that i can send you the step which i followed, may be i was doing something wrong.

from rootthebox.

hatim401 avatar hatim401 commented on July 24, 2024

This is rootthebox.cfg file.

Please check all setting are correct or not. I think I am doing something wrong in this.

Last updated: 2015-01-22 22:57:20.004835

[ Database ]

sql_database = "rootthebox"
sql_password = "rtb"
sql_port = 3306
sql_user = "rtb"
log_sql = False
sql_dialect = "mysql"
sql_host = "127.0.0.1"

[ /Usr/Local/Lib/Python2.7/Dist-Packages/Tornado/Log.Py ]

logging = "info"
log_file_num_backups = 10
log_to_stderr = None
log_file_prefix = None
log_file_max_size = 100000000

[ Recaptcha ]

use_recaptcha = True
recaptcha_api_key = "6LcJJ88SAAAAAFzcmQqDPWGKRQXmJ0DCiZoPWTZf"

[ Cache ]

memcached = "127.0.0.1"
memcached_port = 11011

[ Server ]

origin = "ws://localhost:8888"
admin_ips = ['127.0.0.1', '::1']
certfile = ""
listen_port = 8888
x_headers = False
ssl = False
session_age = 3600
session_regeneration_interval = 3600
keyfile = ""

[ Application ]

share_dir = "./files/shares"
flag_attachment_dir = "./files/flag_attachments"
debug = False
source_code_market_dir = "./files/source_code_market"
avatar_dir = "./files/avatars"

[ Game ]

use_black_market = True
use_bots = True
whitelist_box_ips = False
flag_value_decrease = 10
password_upgrade_cost = 1000
dynamic_flag_value = True
bribe_cost = 2500
max_password_length = 7
restrict_registration = False
botnet_db = "./files/botnet.db"
default_theme = "cyborg"
public_teams = True
game_name = "Root the Box"
history_snapshot_interval = 300000
bot_reward = 50
rank_by = "flags"
bot_reward_interval = 900000
max_team_size = 4

from rootthebox.

BonJarber avatar BonJarber commented on July 24, 2024

I'm getting this same issue. Just tried installing on a fresh Debian box

from rootthebox.

arestifo avatar arestifo commented on July 24, 2024

Same here. Installing on Debian with Root the box v0.6.1, SQLAlchemy v0.9.9, and Torando v4.1.

from rootthebox.

moloch-- avatar moloch-- commented on July 24, 2024

I'm going to look into it this weekend.

from rootthebox.

viris avatar viris commented on July 24, 2024

Any news regarding this issue?

from rootthebox.

meznak avatar meznak commented on July 24, 2024

I'm seeing this as well.
Ubuntu 12.04 3.2.0-79-generic-pae
Root the Box v0.6.1
SQL Alchemy v1.0.0b5
Torando v4.1

from rootthebox.

meznak avatar meznak commented on July 24, 2024

After pulling the latest files (which caused a SQLAlchemy upgrade), I managed to get past this error.

It's fixed for me.

from rootthebox.

eljeffeg avatar eljeffeg commented on July 24, 2024

This appears to be fixed - so closing. Reopen if needed.

from rootthebox.

 avatar commented on July 24, 2024

Hello everyone, after 3 years of this error that apparently was solved, I am having the same problem with the newest versions.

System Information:
Python 2.7.15 & 3.6.7 (All modules were installed with PIP)
Ubuntu 18.04 LTS

Root the Box v2.2.1
SQL Alchemy v1.2.15
Torando v5.1.1

Python Installed Modules:
BaseHTTPServer asn1crypto imp sched
Bastion ast importlib secretstorage
CDROM asynchat imputil select
CGIHTTPServer asyncore inspect sets
Canvas atexit io setup
ConfigParser audiodev ipaddress setuptools
Cookie audioop itertools sgmllib
Crypto backports_abc json sha
DLFCN base64 keyring shelve
Dialog bdb keyrings shlex
DocXMLRPCServer binascii keyword shutil
FileDialog binhex lib2to3 signal
FixTk bisect libs signatures
HTMLParser bsddb linecache singledispatch
IN bz2 linuxaudiodev singledispatch_helpers
MimeWriter cPickle locale site
MySQLdb cProfile lockfile sitecustomize
PIL cStringIO logging six
Queue calendar lsb_release smtpd
ScrolledText certifi macpath smtplib
SimpleDialog cgi macurl2path sndhdr
SimpleHTTPServer cgitb mailbox socket
SimpleXMLRPCServer chardet mailcap spwd
SocketServer chunk markupbase sqlalchemy
StringIO cmath marshal sqlite3
TYPES cmd math sre
Tix code md5 sre_compile
Tkconstants codecs memcache sre_constants
Tkdnd codeop mhlib sre_parse
Tkinter collections mimetools ssl
UserDict colorama mimetypes stat
UserList colorsys mimify statvfs
UserString command mmap string
_LWPCookieJar commands models stringold
_MozillaCookieJar compileall modulefinder stringprep
builtin compiler modules strop

Error Message:
_File "./rootthebox.py", line 72, in setup
import setup.bootstrap
File "/home/FrameworkManager/RootTheBox/setup/bootstrap.py", line 78, in
dbsession.flush()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2313, in flush
self._flush(objects)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2440, in _flush
transaction.rollback(_capture_exception=True)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 66, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2404, in _flush
flush_context.execute()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 395, in execute
rec.execute(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 560, in execute
uow
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj
mapper, table, insert)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 872, in _emit_insert_statements
execute(statement, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 948, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
exc_info
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 509, in do_execute
cursor.execute(statement, parameters)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
sqlalchemy.exc.IntegrityError: (_mysql_exceptions.IntegrityError) (1062, "Duplicate entry 'Bootstrap' for key '_name'") [S
QL: u'INSERT INTO theme (created, uuid, name) VALUES (%s, %s, %s)'] [parameters: (datetime.datetime(2018, 12, 26, 23, 48,
16, 149314), '0031c82e-91fa-4a85-bf83-9c7c271098f4', 'Bootstrap')] (Background on this error at: http://sqlalche.me/e/gkp
j)

from rootthebox.

eljeffeg avatar eljeffeg commented on July 24, 2024

Sounds like setup was already run. That seems to indicate that the DB entries it's trying to add already exist. So maybe delete the db and try again or perhaps you just need to run ./rootthebox.py --start

from rootthebox.

 avatar commented on July 24, 2024

Okay, there has been a breakthrough, but I have not yet completely solved the error. Apparently when executing "./rootthebox.py --setup = prod" if a module is missing, after installing that module you must delete all the tables that have been created in the database and rerun the command.

After doing this, I get a new error, this time less long:

[] 00:37:40 : Creating the database ...
[
] 00:37:41 : Bootstrapping the database ...
[?] RootTheBox Admin Username: FrameworkAdmin
[?] New Admin Password:
[?] Confirm New Admin Password:
[I 181227 00:38:05 GameHistory:53] Loading game history from database ...
[I 181227 00:38:05 GameHistory:70] History load complete.
Traceback (most recent call last):
File "./rootthebox.py", line 610, in
setup()
File "./rootthebox.py", line 81, in setup
update_db(False)
File "/home/FrameworkManager/RootTheBox/handlers/init.py", line 272, in update_db
alembic_cfg.set_main_option('sqlalchemy.url', str(db_connection))
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 234, in set_main_option
self.set_section_option(self.config_ini_section, name, value)
File "/usr/local/lib/python2.7/dist-packages/alembic/config.py", line 261, in set_section_option
self.file_config.set(section, name, value)
File "/usr/lib/python2.7/ConfigParser.py", line 752, in set
"position %d" % (value, tmp_value.find('%')))
ValueError: invalid interpolation syntax in 'mysql://user:[email protected]/rootthebox' at positio
n 31

PD: Thank you very much for solving the first error. ;D

from rootthebox.

eljeffeg avatar eljeffeg commented on July 24, 2024

Looks like it's having a problem with the password. It's added %2B%2C, encoding for "+,". Apparently, it doesn't like % signs in the Alembic string. I'll try to add something that will convert or work around this, but for now, try a password without those special characters.

from rootthebox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.