Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Teamspeak Error 500 #139

Closed
Ashisacat opened this issue Dec 15, 2015 · 22 comments
Closed

Teamspeak Error 500 #139

Ashisacat opened this issue Dec 15, 2015 · 22 comments

Comments

@Ashisacat
Copy link

I'm getting a Error 500 on the admin page when requesting new auth keys, trying to create TS groups, etc. The password and ports on the server are matching settings.py.. Any advice?

@CokkocZateki
Copy link

go into your nano alliance_auth/settings.py

then go to DEBUG = 'True' == os.environ.get('AA_DEBUG','False') and change the 'False' to 'True*

save and exit settings.py

then go back to your ts and redo what you done and see the error message and link it

@Adarnof
Copy link
Member

Adarnof commented Dec 15, 2015

If I had to guess, this is probably related to #132 and #74 - these symptoms are usually transient, and result from improper handling of error codes returned by the teamspeak server. If it doesn't clear up in a couple minutes it might be something else. I'm hoping @Kaezon will have time to look into this once exam season is over.

@Ashisacat
Copy link
Author

Quick update;
Enabled debug mode, and attempting to add TS groups gives;

IntegrityError at /admin/services/tsgroup/add/
(1048, "Column 'ts_group_id' cannot be null")

@Adarnof
Copy link
Member

Adarnof commented Dec 22, 2015

You should not be manually adding TS Group models through the admin interface. This is a list which should be populated via the run_databaseUpdate celerytask every minute. You need to be creating associations with the Auth / TS Group models.

I'd recommend un-registering TS Group from the admin interface to prevent this issue as many users have been encountering this error, unless you can make a good argument for it @Kaezon

@Ashisacat
Copy link
Author

So, it seems I was trying to create TS Groups via the admin interface because the ones that are on the server aren't showing. I assumed the database update maybe having an issue and when trying run_databaseUpdate() in Python shell, it returns 'Killed'.

@Adarnof
Copy link
Member

Adarnof commented Dec 22, 2015

Have any TS groups populated after you manually ran the database update task?

@Ashisacat
Copy link
Author

No, no change after manually running the database update task; as before this hangs for a good five minutes with no pipe before returning 'Killed'.

@Adarnof
Copy link
Member

Adarnof commented Dec 22, 2015

None are visible in the admin interface? Very odd. It's failing sooner than I expected.

Can you perform a quick test for me? Comment out this line by adding a pound sign before it and then re-run the database update. Let me know if it still hangs / ends with a 'Killed'.

@orbitroom
Copy link
Collaborator

same problem on a fresh install

@Ashisacat
Copy link
Author

@Adarnof I've commented out that line and when running run_databaseUpdate() it completes instantly and provides me with a pipe to continue... Any thoughts?

@orbitroom
Copy link
Collaborator

python manage.py shell
from celerytask.tasks import run_databaseUpdate
run_databaseUpdate()

worked fixed the issue for me

@Ashisacat
Copy link
Author

@orbitroom No, that's what I've been doing this entire time, it hangs on the databaseUpdate...

@orbitroom
Copy link
Collaborator

are you using the actual serveradmin query username and password that was given on intial ts3 server startup?
that will cause all sorts of problems if if your not

@Ashisacat
Copy link
Author

Yes I am....

@Adarnof
Copy link
Member

Adarnof commented Dec 27, 2015

Seems my duct-tape fix for the TS group syncing is showing its weaknesses. Something in the sync_ts_groups function is spiraling out of control - do any of you see it? Infinite loops etc. If @Kaezon stops ignoring these notifications maybe he can sort this out.

@TrentBartlem
Copy link
Contributor

I can't seem to find the bit in Teamspeak3Manager._sync_ts_group_db() that returns early if TS is not configured.

@Adarnof
Copy link
Member

Adarnof commented Dec 27, 2015

I taped on a try-catch to do that. We don't have a global "IS TS INSTALLED" variable to check.

@vevelonel
Copy link

I am also encountering this issue, but am running into the following error when I try to manually run databaseUpdate()

Warning: unknown mime-type for "https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning." -- using "application/octet-stream"
Error: no such file "https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning."
allianceserver@<redacted>:~/allianceauth$ python run_alliance_corp_update.py
Traceback (most recent call last):
  File "run_alliance_corp_update.py", line 1, in <module>
    from util import bootstrap_permissions
  File "/home/allianceserver/allianceauth/util/__init__.py", line 3, in <module>
    from django.contrib.contenttypes.models import ContentType
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/models.py", line 1, in <module>
    from django.db import models
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/__init__.py", line 5, in <module>
    from django.db.models.query import Q
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 17, in <module>
    from django.db.models.deletion import Collector
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/deletion.py", line 4, in <module>
    from django.db.models import signals, sql
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/__init__.py", line 4, in <module>
    from django.db.models.sql.subqueries import *
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/subqueries.py", line 12, in <module>
    from django.db.models.sql.query import Query
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py", line 22, in <module>
    from django.db.models.sql import aggregates as base_aggregates_module
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/aggregates.py", line 9, in <module>
    ordinal_aggregate_field = IntegerField()
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/__init__.py", line 116, in __init__
    self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 54, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

@Adarnof
Copy link
Member

Adarnof commented Dec 28, 2015

You're not issuing that command properly. It needs to be python manage.py shell < run_alliance_corp_update.py, and that itself doesn't run a database update, only an API refresh to generate corp models.

To manually run a database update:

python manage.py shell
from celerytask.tasks import run_databaseUpdate
run_databaseUpdate()

@vevelonel
Copy link

Perfect, thank you! Can confirm this now works for me.

I feel utterly idiotic.

@Adarnof
Copy link
Member

Adarnof commented Dec 28, 2015

Haha don't sweat it.

@Adarnof
Copy link
Member

Adarnof commented Dec 28, 2015

I've adding logging to certain sections of the code. It would be a great help if anyone affected switched to the logging branch and gave me logs.

Here's instructions on how to switch over.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants