Nitrate
Nitrate copied to clipboard
500 Service Error
I'm trying to Register a New Account in Nitrate but I'm receiving 500 Service Error.
How do you run Nitrate? Run it in container? Can you get the traceback from the log file?
Yes, I'm using Docker and I run it in a container. Attached image is my setup and the log file.
These are the steps that we did during the setup.
- Execute command:
git clone https://github.com/Nitrate/Nitrate.git
- Execute command:
cd ./Nitrate
- Execute command:
docker-compose -f container-compose.yml up
Optional: when there's an error after executing docker-compose up
- 3.1. Open ./container-compose.yml, replace
RABBITMQ_DEFAULT_VHOST=myvhost
to- RABBITMQ_DEFAULT_VHOST=myvhost
- 3.2. Open ./container-compose.yml, remove
NITRATE_MIGRATE_DB: yes
andNITRATE_SET_DEFAULT_PERMS: yes
- Execute command:
docker exec -it nitrate_web_1 django-admin migrate
- Execute command:
docker exec -it nitrate_web_1 django-admin createsuperuser
- Execute command:
docker exec -it nitrate_web_1 django-admin setdefaultperms
The log shows a sueruser admin has been created. So, you can login by using admin:admin. For local use, as a workaround, you can create user in the administration web UI.
I tried creating a user in administration web UI but it's still not working. I also tried adding a Test Case in a Test Run and I also received 500 Server Error. Please help me fix the issue. Please see attached.
I got this error:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/celery/app/trace.py", line 405, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/celery/app/trace.py", line 697, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/tcms/core/mailto.py", line 60, in mailto
email_msg.send()
File "/usr/lib/python3.9/site-packages/django/core/mail/message.py", line 284, in send
return self.get_connection(fail_silently).send_messages([self])
File "/usr/lib/python3.9/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
new_conn_created = self.open()
File "/usr/lib/python3.9/site-packages/django/core/mail/backends/smtp.py", line 62, in open
self.connection = self.connection_class(self.host, self.port, **connection_params)
File "/usr/lib64/python3.9/smtplib.py", line 255, in __init__
(code, msg) = self.connect(host, port)
File "/usr/lib64/python3.9/smtplib.py", line 341, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib64/python3.9/smtplib.py", line 312, in _get_socket
return socket.create_connection((host, port), timeout,
File "/usr/lib64/python3.9/socket.py", line 843, in create_connection
raise err
File "/usr/lib64/python3.9/socket.py", line 831, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
This is because the EMAIL_
related settings are not set properly. You can set them in the contrib/compose/web_custom_conf.py
and start the container again.
At least, EMAIL_HOST and EMAIL_PORT are required to set.
Alternatively, if you don't care about the email notification for now, you can set EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
in the contrib/compose/web_custom_conf.py
instead.
How about when I assigned test cases in a test run? I'm also receiving 500 Server Error.
@aldouslbstda Hi, there could be some issue to the asynchronous task sending email. Let me find a time to investigate.
@tkdchen I'll patiently wait. Thanks in advance.
@tkdchen Hi, I just wanted to ask if there's an update? Thank you.
@aldouslbstda Hi, Thank you very much for your patience. There is actually an issue and it has been fixed. Please remove the nitrate and nitrate-worker image and up
the compose again. New image containing the fix will be pulled.