[GH-ISSUE #975] Error setting up -- instance deployment failure. #827

Closed
opened 2026-02-27 11:13:46 +03:00 by kerem · 8 comments
Owner

Originally created by @sammdu on GitHub (Nov 26, 2016).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/975

So i followed ur official doc and made my way through (but there are issues before as well, like there are packages required for the installation to continue, but u didn't mention it so i had to spend all day googling error messages X-( )
Here's what i'm trying to do and the error message poped:


(env) root@sserver:/var/server/modoboa# modoboa-admin.py deploy instance --collectstatic --domain sserver --dburl mysql://root:password@localhost:3306/modoboa
Traceback (most recent call last):
  File "/var/server/modoboa/env/bin/modoboa-admin.py", line 7, in <module>
    handle_command_line()
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/__init__.py", line 95, in handle_command_line
    commands[args.command](commands, verbose=args.verbose).run(remaining)
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/__init__.py", line 36, in run
    self.handle(args)
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/deploy.py", line 182, in handle
    'startproject', parsed_args.name, verbosity=False
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 119, in call_command
    return command.execute(*args, **defaults)
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/django/core/management/commands/startproject.py", line 33, in handle
    super(Command, self).handle('project', project_name, target, **options)
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/django/core/management/templates.py", line 84, in handle
    raise CommandError(message)
django.core.management.base.CommandError: '/var/server/modoboa/instance' already exists

the password is replaced here obviously

So what's wrong?
Plz help me thx in advance!

Originally created by @sammdu on GitHub (Nov 26, 2016). Original GitHub issue: https://github.com/modoboa/modoboa/issues/975 So i followed ur official doc and made my way through (but there are issues before as well, like there are packages required for the installation to continue, but u didn't mention it so i had to spend all day googling error messages X-( ) Here's what i'm trying to do and the error message poped: *** (env) root@sserver:/var/server/modoboa# modoboa-admin.py deploy instance --collectstatic --domain sserver --dburl mysql://root:password@localhost:3306/modoboa Traceback (most recent call last): File "/var/server/modoboa/env/bin/modoboa-admin.py", line 7, in <module> handle_command_line() File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/__init__.py", line 95, in handle_command_line commands[args.command](commands, verbose=args.verbose).run(remaining) File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/__init__.py", line 36, in run self.handle(args) File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/deploy.py", line 182, in handle 'startproject', parsed_args.name, verbosity=False File "/var/server/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 119, in call_command return command.execute(*args, **defaults) File "/var/server/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute output = self.handle(*args, **options) File "/var/server/modoboa/env/local/lib/python2.7/site-packages/django/core/management/commands/startproject.py", line 33, in handle super(Command, self).handle('project', project_name, target, **options) File "/var/server/modoboa/env/local/lib/python2.7/site-packages/django/core/management/templates.py", line 84, in handle raise CommandError(message) django.core.management.base.CommandError: '/var/server/modoboa/instance' already exists *** *the password is replaced here obviously* So what's wrong? Plz help me thx in advance!
kerem closed this issue 2026-02-27 11:13:46 +03:00
Author
Owner

@tonioo commented on GitHub (Nov 26, 2016):

Looks like you already tried to deploy an instance.
You have to remove the /var/server/modoboa/instance directory before you can try a new deploy.

<!-- gh-comment-id:263050714 --> @tonioo commented on GitHub (Nov 26, 2016): Looks like you already tried to deploy an instance. You have to remove the `/var/server/modoboa/instance` directory before you can try a new deploy.
Author
Owner

@sammdu commented on GitHub (Nov 26, 2016):

Now This happened when i tried to run that again after removing the instance dir...


Traceback (most recent call last):
  File "/var/server/modoboa/env/bin/modoboa-admin.py", line 7, in <module>
    handle_command_line()
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/__init__.py", line 95, in handle_command_line
    commands[args.command](commands, verbose=args.verbose).run(remaining)
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/__init__.py", line 36, in run
    self.handle(args)
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/deploy.py", line 192, in handle
    info = dj_database_url.config(default=url)
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/dj_database_url.py", line 51, in config
    config = parse(s, engine, conn_max_age)
  File "/var/server/modoboa/env/local/lib/python2.7/site-packages/dj_database_url.py", line 103, in parse
    engine = SCHEMES[url.scheme] if engine is None else engine
KeyError: ''
<!-- gh-comment-id:263052847 --> @sammdu commented on GitHub (Nov 26, 2016): Now This happened when i tried to run that again after removing the instance dir... *** Traceback (most recent call last): File "/var/server/modoboa/env/bin/modoboa-admin.py", line 7, in <module> handle_command_line() File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/__init__.py", line 95, in handle_command_line commands[args.command](commands, verbose=args.verbose).run(remaining) File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/__init__.py", line 36, in run self.handle(args) File "/var/server/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/commands/deploy.py", line 192, in handle info = dj_database_url.config(default=url) File "/var/server/modoboa/env/local/lib/python2.7/site-packages/dj_database_url.py", line 51, in config config = parse(s, engine, conn_max_age) File "/var/server/modoboa/env/local/lib/python2.7/site-packages/dj_database_url.py", line 103, in parse engine = SCHEMES[url.scheme] if engine is None else engine KeyError: ''
Author
Owner

@sammdu commented on GitHub (Nov 27, 2016):

Any ideas bro?

<!-- gh-comment-id:263099756 --> @sammdu commented on GitHub (Nov 27, 2016): Any ideas bro?
Author
Owner

@tonioo commented on GitHub (Nov 27, 2016):

Your --dburloption is wrong. Try the following instead: --dburl default:mysql://root:password@localhost:3306/modoboa

<!-- gh-comment-id:263119137 --> @tonioo commented on GitHub (Nov 27, 2016): Your `--dburl`option is wrong. Try the following instead: ` --dburl default:mysql://root:password@localhost:3306/modoboa`
Author
Owner

@sammdu commented on GitHub (Nov 27, 2016):

Okay it seems to be working since it didn't prompt error this time...
Also please include this into ur manual as well as the fact that the users have to install MySQL (or PostgreSQL, but i haven't tried since the error message poped) using their packge manager (mainly for the *-dev packages) or otherwise the pip installation is gonna prompt error...it literally took me a whole day to figure out the problems....so please make people's life easier ;-)

<!-- gh-comment-id:263123346 --> @sammdu commented on GitHub (Nov 27, 2016): Okay it seems to be working since it didn't prompt error this time... Also please include [this](http://stackoverflow.com/questions/17886647/cant-install-via-pip-because-of-egg-info-error) into ur manual as well as the fact that the users have to install MySQL (or PostgreSQL, but i haven't tried since the error message poped) using their packge manager (mainly for the *-dev packages) or otherwise the pip installation is gonna prompt error...it literally took me a whole day to figure out the problems....so please make people's life easier ;-)
Author
Owner

@sammdu commented on GitHub (Nov 27, 2016):

Also in ur Web Server section of the manual, does modoboa instance dir mean *current_dir*/env/bin/ (which is where modoboa-admin.py is at) or *current_dir*/instance (which matches the description...but i'm still not quite sure)?
And yeah...i suggest u include this info into ur manual as well since it may cause confusion (or it could be just me thinking too much ;-)

<!-- gh-comment-id:263124370 --> @sammdu commented on GitHub (Nov 27, 2016): Also in ur [Web Server](http://modoboa.readthedocs.io/en/latest/manual_installation/webserver.html) section of the manual, does `modoboa instance dir` mean `*current_dir*/env/bin/` (which is where modoboa-admin.py is at) or `*current_dir*/instance` (which matches the description...but i'm still not quite sure)? And yeah...i suggest u include this info into ur manual as well since it may cause confusion (or it could be just me thinking too much ;-)
Author
Owner

@tonioo commented on GitHub (Nov 27, 2016):

Feel free to contribute to the documentation. If you need something more easy, please check the installer. (https://github.com/modoboa/modoboa-installer)
Instance dir corresponds to the location you used when you deployed modoboa. (running the deploy command)

<!-- gh-comment-id:263125518 --> @tonioo commented on GitHub (Nov 27, 2016): Feel free to contribute to the documentation. If you need something more easy, please check the installer. (https://github.com/modoboa/modoboa-installer) Instance dir corresponds to the location you used when you deployed modoboa. (running the deploy command)
Author
Owner

@sammdu commented on GitHub (Nov 27, 2016):

I've already got a nginx serving as a web server so...i don't want the installer to mess up my current setup...
I would definitely contribute to the doc when i have free time ;-)
Thanks for all ur support!

<!-- gh-comment-id:263126231 --> @sammdu commented on GitHub (Nov 27, 2016): I've already got a nginx serving as a web server so...i don't want the installer to mess up my current setup... I would definitely contribute to the doc when i have free time ;-) Thanks for all ur support!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#827
No description provided.