Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade doesn't create user #147

Closed
ddzyan opened this issue Dec 22, 2018 · 11 comments
Closed

upgrade doesn't create user #147

ddzyan opened this issue Dec 22, 2018 · 11 comments

Comments

@ddzyan
Copy link

ddzyan commented Dec 22, 2018

docker-compose run --rm web upgrade
Starting onpremise_smtp_1      ... done
Starting onpremise_redis_1     ... done
Starting onpremise_postgres_1  ... done
Starting onpremise_memcached_1 ... done
09:55:51 [INFO] sentry.plugins.github: apps-not-configured
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.admin
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.messages
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.staticfiles
 > crispy_forms
 > debug_toolbar
 > raven.contrib.django.raven_compat
 > rest_framework
 > sentry.plugins.sentry_interface_types
 > sentry.plugins.sentry_mail
 > sentry.plugins.sentry_urls
 > sentry.plugins.sentry_useragents
 > sentry.plugins.sentry_webhooks
 > sudo
 > south
 > sentry_plugins.slack

Not synced (use migrations):
 - sentry
 - sentry.nodestore
 - sentry.search
 - social_auth
 - sentry.tagstore
 - sentry_plugins.jira_ac
 - sentry_plugins.hipchat_ac
(use ./manage.py migrate to migrate these)
Running migrations for sentry:
- Nothing to migrate.
 - Loading initial data for sentry.
Installed 0 object(s) from 0 fixture(s)
Running migrations for nodestore:
- Nothing to migrate.
 - Loading initial data for nodestore.
Installed 0 object(s) from 0 fixture(s)
Running migrations for search:
- Nothing to migrate.
 - Loading initial data for search.
Installed 0 object(s) from 0 fixture(s)
Running migrations for social_auth:
- Nothing to migrate.
 - Loading initial data for social_auth.
Installed 0 object(s) from 0 fixture(s)
Running migrations for tagstore:
- Nothing to migrate.
 - Loading initial data for tagstore.
Installed 0 object(s) from 0 fixture(s)
Running migrations for jira_ac:
- Nothing to migrate.
 - Loading initial data for jira_ac.
Installed 0 object(s) from 0 fixture(s)
Running migrations for hipchat_ac:
- Nothing to migrate.
 - Loading initial data for hipchat_ac.
Installed 0 object(s) from 0 fixture(s)
Creating missing DSNs
Correcting Group.num_comments counter
@yanghuayi
Copy link

I have the same problem

@evansmwendwa
Copy link

Anyone find a solution to this?

@evansmwendwa
Copy link

Tried to run

docker-compose run --rm web createuser

after the instructions and got the following error

Traceback (most recent call last):
  File "/usr/local/bin/sentry", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/sentry/runner/__init__.py", line 162, in main
    cli(prog_name=get_prog(), obj={}, max_content_width=100)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/runner/decorators.py", line 36, in inner
    return ctx.invoke(f, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/sentry/runner/commands/createuser.py", line 95, in createuser
    org = Organization.get_default()
  File "/usr/local/lib/python2.7/site-packages/sentry/models/organization.py", line 161, in get_default
    )[0]
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 132, in __getitem__
    return list(qs)[0]
IndexError: list index out of range

@evansmwendwa
Copy link

Noticed the same errors not happening if you use atleast 3GB RAM

@Frank-Y
Copy link

Frank-Y commented Jan 29, 2019

8GB RAM, same problem

@DaYePython
Copy link

DaYePython commented Feb 2, 2019

I'm 1G RAM, docker-compose run --rm web createuser is work . But the more and new BUG is coming!!

@jameswmcnab
Copy link

I had this exact same issue when testing Sentry using Docker for Mac with on 1GB RAM allocated to the Docker VM.

It seems the upgrade job runs out of memory and fails to create the default 'internal' project and also fails to prompt to create a user. The impact of this is that even running the createuser command will not work because the default project hasn't been created.

@itsnuwan
Copy link

itsnuwan commented Mar 7, 2019

I had this exact same issue when testing Sentry using Docker for Mac with on 1GB RAM allocated to the Docker VM.

It seems the upgrade job runs out of memory and fails to create the default 'internal' project and also fails to prompt to create a user. The impact of this is that even running the createuser command will not work because the default project hasn't been created.

i am also having the same issue(1GB RAM).But is seems above 3GB and 8GB cases are also failed.
How did you find the memory issue? ware there any log entries about that while upgrade process running?

@jameswmcnab
Copy link

I had this exact same issue when testing Sentry using Docker for Mac with on 1GB RAM allocated to the Docker VM.
It seems the upgrade job runs out of memory and fails to create the default 'internal' project and also fails to prompt to create a user. The impact of this is that even running the createuser command will not work because the default project hasn't been created.

i am also having the same issue(1GB RAM).But is seems above 3GB and 8GB cases are also failed.
How did you find the memory issue? ware there any log entries about that while upgrade process running?

Sorry I don't have any specifics beyond what I experienced using Docker for Mac with 1GB allocated. No issues when I ran set up the Sentry docker instance in production. I don't recall any specific or obvious error message but I can't say I'm that familiar with the internals of Sentry or Django and I'm not a Python dev.

The correlation in my case was the amount of RAM Docker had access to, but that doesn't mean that was the cause (or indeed the only possible cause).

@itsnuwan
Copy link

itsnuwan commented Mar 8, 2019

This worked for me.Just ran following after upgrade( 1GB RAM , Linux-CentOS, Docker setup)

docker run \
  -it --rm \
  --link sentry-redis:redis \
  --link sentry-postgres:postgres \
  --link sentry-smtp:smtp \
  --env SENTRY_SECRET_KEY='YOUR-KEY-HERE' \
  sentry-onpremise \
  createuser --email=testuser@gmail.com --password=password --superuser

@mattrobenolt
Copy link
Contributor

Going to close this since it would be related to running out of memory during migrations. We’d recommend 4GB of RAM needed for initial run. If you have more than this, and still have the issue, let us know.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants