Hello. I installed Taiga following the instructions Install Taiga in Production .
Everything installed without problems, I can see all the pages, but if I try to create a new project, then I see a 500 error in debugging.
OS Ubuntu Server 22.04.3 (clean install).
Nginx is up and running.
The second error I see in debugging is: Firefox cannot establish a connection to the wss://myhost.name/events server.
I have already tried everything and give up, tell me what could be my problem and what am I doing wrong?
To help you further with the 500 error we would require the detailed logs taiga-back provides while you’re creating the project, and probably your config.py file. Please, remember not to reveil any password publicly.
The events error it’s reflecting a comunication problem between taiga-back and taiga-event services. I’d start validating that any RabbitMQ values and the SECRET_KEY in the configuration variables in the two system are right and they are the same (they should match).
I get the same 500-Error like the OP when creating a project. A glance into the admin panel shows, that the project (with name and description) is created there, but the front-end never gets the information.
I also get this websocket-error which is visible in the OPs screenshots.
OS is also Ubuntu 22.04.03, running on a 32-bit ARM-machine (Odroid HC1).
What I tried to fix:
Changing all the URLs (with slash at the end and without)
Connecting to MQTT via online MQTT-Broker (works, I can send messages there)
Visiting the API URL (works, I get the project information there)
Googling the internet, found a bug with new version of RabbitMQ which suggests to downgrade to version 3.8 - not available for my ubuntu version and therefore I stopped as I fear about system stability when applying.
Decided now to ask here
About the information you requested from the OP (from my point of view):
I was not able to detect the backend-error-log (found server-log only). Where am I able to find it?
It’ll be easier if we focus in an error at a time. Let’s focus on the 500-Error.
Increase the log level to taiga-back
First, I’d start adding the line DEBUG = True to the config.py file in taiga-back to log more data.
How to get the 500 error log
If you have followed the “Install Taiga in Production” manual, taiga-back is deployed through a systemd service, so its logs will be there.
To monitor the service’s logs in real-time you can use the $ sudo journalctl -u taiga.service -b -f command. Then you just have to reproduce the error while creating a project and review the traces.
Another option is to review past logs with sudo journalctl -u taiga.service --since "1 hour ago". You can change the time interval, for example, to “2 days ago” or “1 day ago”.
You can review the ~/taiga-front-dist/dist/conf.json file from taiga-front, checking the eventsUrl variable is right according to your subpath configuration.
Share with us this file if you continue experiencing issues.
The nginx should also be configured to redirect properly the requests to taiga-events. You can check the documentation: Configure NGINX for Taiga in a subpath.
server {
listen 80 default_server;
server_name mycompany.com; # <------
return 301 https://$server_name$request_uri;
}
server {
listen 443 default_server;
server_name mycompany.com; # <------
[...] # Rest of the locations ...
# Events
location /taiga/events { # <------
Hello, I’m sorry that I didn’t respond for a long time.
I tried to reinstall everything again.
There really are problems with taiga-async.
here are my logs and configs.
$ sudo journalctl -u taiga.service -b -f
Oct 03 06:50:06 kvant-tracker systemd[1]: taiga.service: Deactivated successfully.
Oct 03 06:50:06 kvant-tracker systemd[1]: Stopped taiga_back.
Oct 03 06:50:06 kvant-tracker systemd[1]: taiga.service: Consumed 3.906s CPU time.
Oct 03 06:50:06 kvant-tracker systemd[1]: Started taiga_back.
Oct 03 06:50:06 kvant-tracker gunicorn[29082]: [2023-10-03 06:50:06 +0000] [29082] [INFO] Starting gunicorn 20.1.0
Oct 03 06:50:06 kvant-tracker gunicorn[29082]: [2023-10-03 06:50:06 +0000] [29082] [INFO] Listening at: http://0.0.0.0:8001 (29082)
Oct 03 06:50:06 kvant-tracker gunicorn[29082]: [2023-10-03 06:50:06 +0000] [29082] [INFO] Using worker: sync
Oct 03 06:50:06 kvant-tracker gunicorn[29084]: [2023-10-03 06:50:06 +0000] [29084] [INFO] Booting worker with pid: 29084
Oct 03 06:50:06 kvant-tracker gunicorn[29086]: [2023-10-03 06:50:06 +0000] [29086] [INFO] Booting worker with pid: 29086
Oct 03 06:50:06 kvant-tracker gunicorn[29088]: [2023-10-03 06:50:06 +0000] [29088] [INFO] Booting worker with pid: 29088
Oct 03 06:50:06 kvant-tracker gunicorn[29090]: [2023-10-03 06:50:06 +0000] [29090] [INFO] Booting worker with pid: 29090
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: ERROR:2023-10-03 06:51:37,304: Internal Server Error: /api/v1/projects
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: Traceback (most recent call last):
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 47, in inner
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: response = get_response(request)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 181, in _get_response
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: response = wrapped_callback(request, *callback_args, **callback_kwargs)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/base/api/viewsets.py", line 95, in view
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: return self.dispatch(request, *args, **kwargs)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: return view_func(*args, **kwargs)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/base/api/views.py", line 449, in dispatch
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: response = self.handle_exception(exc)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/base/api/views.py", line 447, in dispatch
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: response = handler(request, *args, **kwargs)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/base/api/mixins.py", line 89, in create
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: self.object = validator.save(force_insert=True)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/base/api/serializers.py", line 1104, in save
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: self.object = super().save(**kwargs)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/base/api/serializers.py", line 637, in save
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: self.save_object(self.object, **kwargs)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/base/api/serializers.py", line 1122, in save_object
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: obj.save(**kwargs)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/projects/models.py", line 327, in save
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: super().save(*args, **kwargs)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/db/models/base.py", line 739, in save
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: self.save_base(using=using, force_insert=force_insert,
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/db/models/base.py", line 787, in save_base
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: post_save.send(
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/dispatch/dispatcher.py", line 180, in send
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: return [
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: (receiver, receiver(signal=self, sender=sender, **named))
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/projects/signals.py", line 62, in project_post_save
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: template.apply_to_project(instance)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/projects/models.py", line 1266, in apply_to_project
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: UserStoryStatus.objects.create(
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/db/models/manager.py", line 85, in manager_method
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: return getattr(self.get_queryset(), name)(*args, **kwargs)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/db/models/query.py", line 453, in create
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: obj.save(force_insert=True, using=self.db)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/projects/models.py", line 633, in save
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: return super().save(*args, **kwargs)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/db/models/base.py", line 739, in save
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: self.save_base(using=using, force_insert=force_insert,
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/db/models/base.py", line 787, in save_base
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: post_save.send(
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/dispatch/dispatcher.py", line 180, in send
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: return [
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: (receiver, receiver(signal=self, sender=sender, **named))
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/events/signal_handlers.py", line 30, in on_save_any_model
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: events.emit_event_for_model(instance, sessionid=sesionid, type=type)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/events/events.py", line 76, in emit_event_for_model
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: return emit_event(routing_key=routing_key,
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/events/events.py", line 38, in emit_event
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: connection.on_commit(backend_emit_event)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/django/db/backends/base/base.py", line 645, in on_commit
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: func()
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/events/events.py", line 35, in backend_emit_event
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: backend.emit_event(message=json.dumps(data), routing_key=routing_key, channel=channel)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/taiga/events/backends/rabbitmq.py", line 47, in emit_event
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: connection.connect()
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/amqp/connection.py", line 323, in connect
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: self.transport.connect()
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/amqp/transport.py", line 129, in connect
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: self._connect(self.host, self.port, self.connect_timeout)
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/home/taiga/taiga-back/.venv/lib/python3.10/site-packages/amqp/transport.py", line 172, in _connect
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: entries = socket.getaddrinfo(
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
Oct 03 06:51:37 kvant-tracker gunicorn[29086]: socket.gaierror: [Errno -3] Temporary failure in name resolution
sudo systemctl status taiga-async.service
[sudo] password for taiga:
● taiga-async.service - taiga_async
Loaded: loaded (/etc/systemd/system/taiga-async.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-10-03 06:50:07 UTC; 17min ago
Main PID: 29179 (celery)
Tasks: 6 (limit: 9369)
Memory: 267.1M
CPU: 1.811s
CGroup: /system.slice/taiga-async.service
├─29179 /home/taiga/taiga-back/.venv/bin/python3 /home/taiga/taiga-back/.venv/bin/celery -A taiga.celery worker -B --concurrency 4 -l INFO
├─29203 /home/taiga/taiga-back/.venv/bin/python3 /home/taiga/taiga-back/.venv/bin/celery -A taiga.celery worker -B --concurrency 4 -l INFO
├─29204 /home/taiga/taiga-back/.venv/bin/python3 /home/taiga/taiga-back/.venv/bin/celery -A taiga.celery worker -B --concurrency 4 -l INFO
├─29205 /home/taiga/taiga-back/.venv/bin/python3 /home/taiga/taiga-back/.venv/bin/celery -A taiga.celery worker -B --concurrency 4 -l INFO
├─29206 /home/taiga/taiga-back/.venv/bin/python3 /home/taiga/taiga-back/.venv/bin/celery -A taiga.celery worker -B --concurrency 4 -l INFO
└─29207 /home/taiga/taiga-back/.venv/bin/python3 /home/taiga/taiga-back/.venv/bin/celery -A taiga.celery worker -B --concurrency 4 -l INFO
Oct 03 07:05:58 kvant-tracker celery[29207]: [2023-10-03 07:05:58,334: ERROR/Beat] beat: Connection error: [Errno -3] Temporary failure in name resolution. Trying again in 32.0 seconds...
Oct 03 07:06:30 kvant-tracker celery[29179]: [2023-10-03 07:06:30,544: ERROR/MainProcess] consumer: Cannot connect to amqp://taiga:**@rabbitmq:5672/taiga: [Errno -3] Temporary failure in name resolution.
Oct 03 07:06:30 kvant-tracker celery[29179]: Trying again in 32.00 seconds... (16/100)
Oct 03 07:06:30 kvant-tracker celery[29207]: [2023-10-03 07:06:30,573: ERROR/Beat] beat: Connection error: [Errno -3] Temporary failure in name resolution. Trying again in 32.0 seconds...
Oct 03 07:07:02 kvant-tracker celery[29207]: [2023-10-03 07:07:02,774: ERROR/Beat] beat: Connection error: [Errno -3] Temporary failure in name resolution. Trying again in 32.0 seconds...
Oct 03 07:07:02 kvant-tracker celery[29179]: [2023-10-03 07:07:02,775: ERROR/MainProcess] consumer: Cannot connect to amqp://taiga:**@rabbitmq:5672/taiga: [Errno -3] Temporary failure in name resolution.
Oct 03 07:07:02 kvant-tracker celery[29179]: Trying again in 32.00 seconds... (16/100)
Oct 03 07:07:34 kvant-tracker celery[29179]: [2023-10-03 07:07:34,998: ERROR/MainProcess] consumer: Cannot connect to amqp://taiga:**@rabbitmq:5672/taiga: [Errno -3] Temporary failure in name resolution.
Oct 03 07:07:34 kvant-tracker celery[29179]: Trying again in 32.00 seconds... (16/100)
Oct 03 07:07:34 kvant-tracker celery[29207]: [2023-10-03 07:07:34,998: ERROR/Beat] beat: Connection error: [Errno -3] Temporary failure in name resolution. Trying again in 32.0 seconds...
I tried to pin down the issue and may have to do with a failed request while trying to send out a confirmation email ( as part of the create project request ). Got sidetracked finishing up on setting up my production mail server and when that is done will continue with Taiga.
I was able to get a project created by creating it as public and then setting it to private. But then still some things don’t work like uploading attachments and images ( this is probably b/c i messed up my Nginx - locations ).
It looks like the eventsURL in ~/taiga-front-dist/dist/conf.json is not configured correctly, as @daniel.herrero already suggested. Your nginx setup and the screenshots in the original post suggest that your eventsURL should look like
"eventsUrl": "wss://mycompany.com/events"
and not
"eventsUrl": "wss://mycompany.com/taiga/events"
Can you please check your ~/taiga-front-dist/dist/conf.json?
I wanted to share my recent success in getting Taiga running. For me the issues were related to connection to our SMTP server. By configuring the following settings:
EMAIL_PORT=587 # Default SMTP port
EMAIL_HOST_USER=user@mydomain.com
EMAIL_HOST_PASSWORD=mypassword
DEFAULT_FROM_EMAIL=user@mydomain.com
Taiga started working for me. I opted for Docker Mail Server (Home - Docker Mailserver) for email, a choice I was initially hesitant about. However, I’m glad I chose this route as it enabled DKIM and DMARK, marking our emails as legitimate.
i was having the same problem (500 internal error)
my problem was that i havent configured it right my RabbitMQ in the
~/taiga-back/settings/config.py
which there is two places you should change the url (as the following image):