Can't login into taiga
gregoirelemoulant opened this issue · comments
It works in local
But when I'm connecting via IP, it seems that it doesn't connect to the data base, (it does nothing when I click to sign up) and I've got this error : http://172.21.184.100:8000/api/v1/auth 502 (Bad Gateway)
Here is my local.py file:
from .common import *
MEDIA_URL = "/media/"
STATIC_URL = "/static/"
# This should change if you want generate urls in emails
# for external dns.
SITES["front"]["domain"] = "localhost:8000"
DEBUG = True
PUBLIC_REGISTER_ENABLED = True
DEFAULT_FROM_EMAIL = "no-reply@example.com"
SERVER_EMAIL = DEFAULT_FROM_EMAIL
#EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
#EMAIL_USE_TLS = False
#EMAIL_HOST = "localhost"
#EMAIL_HOST_USER = ""
#EMAIL_HOST_PASSWORD = ""
#EMAIL_PORT = 25
thanks
When you say it works in local, what url are you using to access?, could you show us your conf.json file from taiga-front?
Regards,
conf.json :
{
"api": "http://172.21.184.100:8000/api/v1/",
"eventsUrl": null,
"eventsMaxMissedHeartbeats": 5,
"eventsHeartbeatIntervalTime": 60000,
"debug": true,
"debugInfo": false,
"defaultLanguage": "en",
"themes": ["taiga"],
"defaultTheme": "taiga",
"publicRegisterEnabled": true,
"feedbackEnabled": true,
"privacyPolicyUrl": null,
"termsOfServiceUrl": null,
"maxUploadFileSize": null,
"contribPlugins": []
}
regards
I tried to change my local.py like this, but still not working :
from .common import *
MEDIA_URL = "http://172.21.184.100:8000/media/"
STATIC_URL = "http://172.21.184.100:8000/static/"
ADMIN_MEDIA_PREFIX="http://172.21.184.100:8000/static/admin/"
# This should change if you want generate urls in emails
# for external dns.
SITES["front"]["scheme"] = "http"
SITES["front"]["domain"] = "172.21.184.100:8000"
DEBUG = True
PUBLIC_REGISTER_ENABLED = True
DEFAULT_FROM_EMAIL = "no-reply@example.com"
SERVER_EMAIL = DEFAULT_FROM_EMAIL
#EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
#EMAIL_USE_TLS = False
#EMAIL_HOST = "localhost"
#EMAIL_HOST_USER = ""
#EMAIL_HOST_PASSWORD = ""
#EMAIL_PORT = 25
And when I want to restart circus here is the error :
sudo circusctl restart taiga
Timed out.
A time out usually happens in one of those cases:
#1 The Circus daemon could not be reached.
#2 The Circus daemon took too long to perform the operation
For #1, make sure you are hitting the right place
by checking your --endpoint option.
For #2, if you are not expecting a result to
come back, increase your timeout option value
(particularly with waiting switches)
Hello again!,
When it was working in local, what url were you using to access Taiga?, what settings (conf.json, local.py, circus.ini) did you have?.
I see you are trying to restart circus with sudo, did you execute taiga-scripts under a root user?, taiga installation should be done under a normal user, not a privileged one.
Regards!,
I think it was working in localhost via SSH but maybe it was only the discover page.
then I changed the conf.json and local.py like in the previous comments to be abble to access it via IP.
I have well executed the script in normal user
Here is my circus.ini that I haven't changed :
[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
statsd = true
[watcher:taiga]
working_dir = /home/kad/taiga-back
cmd = gunicorn
args = -w 3 -t 60 --pythonpath=. -b 127.0.0.1:8001 taiga.wsgi
uid = kad
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/kad/logs/gunicorn.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 4
stderr_stream.class = FileStream
stderr_stream.filename = /home/kad/logs/gunicorn.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 4
thanks for your help
Could you please show us too your nginx config file for Taiga?. I think the problem is the api URL in your conf.json file
nginx config
server {
listen 80 default_server;
listen 8000 default_server;
server_name _;
large_client_header_buffers 4 32k;
client_max_body_size 50M;
charset utf-8;
access_log /home/kad/logs/nginx.access.log;
error_log /home/kad/logs/nginx.error.log;
location / {
root /home/kad/taiga-front/dist/;
try_files $uri $uri/ /index.html;
}
location /api {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8001/api;
proxy_redirect off;
}
location /static {
alias /home/kad/taiga-back/static;
}
location /media {
alias /home/kad/taiga-back/media;
}
}
It seems to be ok too...if you execute "circusctl", what's the result?
I've got that : circusctl 0.13.0
Checking the circus.ini file you pasted it doesn't look like the one generated by taiga-scripts (https://github.com/taigaio/taiga-scripts/blob/master/scripts/setup-circus.sh), did you paste here the complete file?
If that's the only output you are receiving from circusctl something is wrong, could you check again your circus.ini file (if you didn't edit it it should be the same generated by the script) and execute:
circusctl reloadconfig
circusctl
ok I delete it and re run the script :
so my circusctl is like that :
[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
statsd = true
[watcher:taiga]
working_dir = /home/kad/taiga-back
cmd = gunicorn
args = -w 3 -t 60 --pythonpath=. -b 127.0.0.1:8001 taiga.wsgi
uid = kad
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/kad/logs/gunicorn.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 4
stderr_stream.class = FileStream
stderr_stream.filename = /home/kad/logs/gunicorn.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 4
[env:taiga]
PATH = /home/kad/.virtualenvs/taiga/bin:/home/kad/.virtualenvs/taiga/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
TERM=rxvt-256color
SHELL=/bin/bash
USER=taiga
LANG=en_US.UTF-8
HOME=/home/kad
PYTHONPATH=/home/kad/.local/lib/python3.4/site-packages
but whene i run circusctl reloadconfig
I have this :
~/conf$ circusctl reloadconfig
Timed out.
A time out usually happens in one of those cases:
#1 The Circus daemon could not be reached.
#2 The Circus daemon took too long to perform the operation
For #1, make sure you are hitting the right place
by checking your --endpoint option.
For #2, if you are not expecting a result to
come back, increase your timeout option value
(particularly with waiting switches)
Try with
circusctl reloadconfig --timeout 20
circusctl --timeout 20
hmm
circusctl reloadconfig --timeout 20 give me circusctl: error: unrecognized arguments: --timeout
circusctl --timeout 20 give me : circusctl 0.13.0
It's so strage...
What about:
sudo service circus start
circusctl reloadconfig
circusctl
Failed to start circus.service: Unit circus.service failed to load: No such file or directory.
So strange...what linux distribution did you use?, could you please execute "uname -a"?
3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
it's the server of my company.. so I can't have ubuntu 14.04
Do you think this is the problem ?
Ok, so that's the problem, all the doc we generated assumes ubuntu 14.04.
The problem seems related to the installation of circus in your base system, I'm sorry but I'm afraid we can't help you much more.
Regards,
Ok thank you very much, I'll ask for a 14.04 VM :)
hi all i am facing the same problem above in ubuntu 14.04 pls tell me solution
fatima-batool@ubuntu:~$ circusctl --timeout 20
circusctl 0.13.0
Timed out.
A time out usually happens in one of those cases:
#1 The Circus daemon could not be reached.
#2 The Circus daemon took too long to perform the operation
For #1, make sure you are hitting the right place
by checking your --endpoint option.
For #2, if you are not expecting a result to
come back, increase your timeout option value
(particularly with waiting switches)
(circusctl)
when i execute the following command
systemctl restart taiga
error occurs....
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'taiga.service'.
Authenticating as: MEHAR-UN-NISA,,, (mehar-un-nisa)
Password:
==== AUTHENTICATION COMPLETE ===
Failed to restart taiga.service: Unit taiga.service not found.