can't login in, admin 123123

917 views
Skip to first unread message

Jonathan Haimez

unread,
Feb 2, 2016, 4:59:17 AM2/2/16
to taigaio
Hi,

I try to install taiga front and back in debian 7 and debian 8.


I have same problem for login in those two os.

I can connect to the front and send something in the rigth port, but no login.
I try with lynx localhost:8000/api/v1 and xx.xx.xx.xx:8000/api/v1 in my virtual machine to log in, admin/123123 and i succed to login as admin


i mix up informations about this 3 links :
http://taigaio.github.io/taiga-doc/dist/setup-production.html
https://github.com/taigaio/taiga-front/wiki/install-guides
https://github.com/taigaio/taiga-scripts

my config files are :

for ngninx config :

server {
    listen
8008 default_server;
    server_name _
;
#    listen 443 ssl default_server;
#    server_name group2.myserver.net localhost;

    large_client_header_buffers
4 32k;
    client_max_body_size
50M;
    charset utf
-8;

    index index
.html;

    access_log
/home/user/taiga/logs/nginx.access.log;
    error_log
/home/user/taiga/logs/nginx.error.log;

   
# Frontend
    location
/ {
        root
/home/user/taiga/taiga-front/dist/;
        try_files $uri $uri
/ /index.html;
   
}

   
# Backend
    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
;
   
}

   
# Django admin access (/admin/)
    location
/admin {
        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$request_uri;
        proxy_redirect off
;
   
}

   
# Static files
    location
/static {
       
alias /home/user/taiga/taiga-back/static;
   
}

   
# Media files
    location
/media {
       
alias /home/user/taiga/taiga-back/media;
   
}

# ssl support
#    ssl on;
#    ssl_certificate /etc/ssl/nginx/myserver.net_enc_chained.crt;
#    ssl_certificate_key /etc/ssl/nginx/private/myserver.net_dec.key;
#
#    ssl_session_timeout 5m;
#
#    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
#    ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
#    ssl_prefer_server_ciphers on;

}




for front config :

{
   
"api": "http://xx.xx.xx.xx:8008/api/v1/",
   
"eventsUrl": "ws://xx.xx.xx.xx:8008/events",
   
"eventsMaxMissedHeartbeats": 5,
   
"eventsHeartbeatIntervalTime": 60000,
   
"debug": true,
   
"debugInfo": false,
   
"defaultLanguage": "en",
   
"themes": ["material-design"],
   
"defaultTheme": "material-design",
   
"publicRegisterEnabled": true,
   
"feedbackEnabled": true,
   
"privacyPolicyUrl": null,
   
"termsOfServiceUrl": null,
   
"maxUploadFileSize": null,
   
"contribPlugins": []
}



for back config :

from .development import *

#DEBUG = False

#ADMINS = (
#    ("Admin", "exa...@example.com"),
#)

DATABASES
= {
   
'default': {
       
'ENGINE': 'transaction_hooks.backends.postgresql_psycopg2',
       
'NAME': 'taiga',
       
'USER': 'taiga',
       
'PASSWORD': 'toto1234',
       
'HOST': '',
       
'PORT': '',
   
}
}

#SITES = {
#    "api": {
#       "scheme": "http",
#       "domain": "localhost:8000",
#       "name": "api"
#    },
#    "front": {
#       "scheme": "http",
#       "domain": "localhost:9001",
#       "name": "front"
#    },
#}

#SITE_ID = "api"

#MEDIA_ROOT = '/home/user/taiga/taiga-front/media'
#STATIC_ROOT = '/home/user/taiga/taiga-front/static'


# EMAIL SETTINGS EXAMPLE
#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
#EMAIL_USE_TLS = False
#EMAIL_HOST = 'localhost'
#EMAIL_PORT = 25
#EMAIL_HOST_USER = 'user'
#EMAIL_HOST_PASSWORD = 'password'
#DEFAULT_FROM_EMAIL = "jo...@doe.com"

# GMAIL SETTINGS EXAMPLE
#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
#EMAIL_USE_TLS = True
#EMAIL_HOST = 'smtp.gmail.com'
#EMAIL_PORT = 587
#EMAIL_HOST_USER = 'your...@gmail.com'
#EMAIL_HOST_PASSWORD = 'yourpassword'

# THROTTLING
#REST_FRAMEWORK["DEFAULT_THROTTLE_RATES"] = {
#    "anon": "20/min",
#    "user": "200/min",
#    "import-mode": "20/sec",
#    "import-dump-mode": "1/minute"
#}

# GITHUB SETTINGS
#GITHUB_URL = "https://github.com/"
#GITHUB_API_URL = "https://api.github.com/"
#GITHUB_API_CLIENT_ID = "yourgithubclientid"
#GITHUB_API_CLIENT_SECRET = "yourgithubclientsecret"


# FEEDBACK MODULE (See config in taiga-front too)
#FEEDBACK_ENABLED = True
#FEEDBACK_EMAIL = "sup...@taiga.io"

# STATS MODULE
#STATS_ENABLED = False
#FRONT_SITEMAP_CACHE_TIMEOUT = 60*60  # In second

# SITEMAP
# If is True /front/sitemap.xml show a valid sitemap of taiga-front client
#FRONT_SITEMAP_ENABLED = False
#FRONT_SITEMAP_CACHE_TIMEOUT = 24*60*60  # In second

from .common import *

MEDIA_URL
= "http://xx.xx.xx.xx:8008/media/"
STATIC_URL
= "http://xx.xx.xx.xx:8008/static/"
ADMIN_MEDIA_PREFIX
= "http://xx.xx.xx.xx:8008/static/admin/"
SITES
["front"]["scheme"] = "http"
SITES
["front"]["domain"] = "xx.xx.xx.xx"

SECRET_KEY
= "theveryultratopsecretkey"

DEBUG
= True
PUBLIC_REGISTER_ENABLED
= True

DEFAULT_FROM_EMAIL
= "no-reply@xx.xx.xx.xx"
SERVER_EMAIL
= DEFAULT_FROM_EMAIL

# Uncomment and populate with proper connection parameters
# for enable email sending. EMAIL_HOST_USER should end by @domain.tld
#EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
#EMAIL_USE_TLS = False
#EMAIL_HOST = "localhost"
#EMAIL_HOST_USER = ""
#EMAIL_HOST_PASSWORD = ""
#EMAIL_PORT = 25

# Uncomment and populate with proper connection parameters
# for enable github login/singin.
#GITHUB_API_CLIENT_ID = "yourgithubclientid"
#GITHUB_API_CLIENT_SECRET = "yourgithubclientsecret"


i saw something could be wrong in gulpfile
line 369-372
gulp.task("conf", function(){
   return gulp.src(["conf/conf.example.json"])
.
pipe(gulp.dest(paths.dist));});


in tutorial people said to change/copy conf.example.json in conf.json but in gulp you take conf.example.json for config.

what i doing wrong ?

Best regards.

Alejandro Alonso

unread,
Feb 2, 2016, 5:13:32 AM2/2/16
to Jonathan Haimez, taigaio
Hello Jonathan,

in tutorial people said to change/copy conf.example.json in conf.json but in gulp you take conf.example.json for config.

That line just copies  conf.example.json to your dist folder, your conf.json file should exist in that dist folder too. Could you try accessing http://xx.xx.xx.xx:8008/conf.json to check it's accessible from your browser?

Could you also check your browser console to check if the API requests are sent to the appropriate urls?

Regards!,



--

  
Alejandro Alonso Fernández  
CIO & Co-founder

www.kaleidos.net/FC8EAC/

Jonathan Haimez

unread,
Feb 2, 2016, 5:37:25 AM2/2/16
to taigaio, haimez....@gmail.com
i can acces to
http://xx.xx.xx.xx:8008/conf.json



When i send a request for login i have a 502 bad gateway
i try to acces to 
 http://xx.xx.xx.xx:8008/api/v1/auth

When i acces to login page i have this error ;
WebSocket connection to 'wss://xx.xx.xx.xx:8008/events' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED


i forget to share my circus.ini

[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/user/taiga/taiga-back
cmd
= gunicorn
args
= -w 3 -t 60 --pythonpath=. -b 127.0.0.1:8001 taiga.wsgi
uid
= user
numprocesses
= 1
autostart
= true
send_hup
= true
stdout_stream
.class = FileStream
stdout_stream
.filename = /home/user/taiga/logs/gunicorn.stdout.log
stdout_stream
.max_bytes = 10485760
stdout_stream
.backup_count = 4
stderr_stream
.class = FileStream
stderr_stream
.filename = /home/user/taiga/logs/gunicorn.stderr.log
stderr_stream
.max_bytes = 10485760
stderr_stream
.backup_count = 4

[env:taiga]
PATH
= $PATH:/home/user/.virtualenvs/taiga/bin:$PATH
TERM
=rxvt-256color
SHELL
=/bin/bash
USER
=taiga
LANG
=en_US.UTF-8
LC_LANG
=en_US.UTF-8
HOME
=/home/user
PYTHONPATH
=/home/user/.virtualenvs/taiga/lib/python3.4/site-packages

Alejandro Alonso

unread,
Feb 2, 2016, 5:40:35 AM2/2/16
to Jonathan Haimez, taigaio
And if you directly access to http://xx.xx.xx.xx:8008/api/v1/auth in your web browser?

Jonathan Haimez

unread,
Feb 2, 2016, 5:46:19 AM2/2/16
to taigaio, haimez....@gmail.com
http://xx.xx.xx.xx:8008/api/v1/auth

i have a 502 Bad gateway

Alejandro Alonso

unread,
Feb 2, 2016, 6:02:02 AM2/2/16
to Jonathan Haimez, taigaio
So it seems nginx can't proxypass to django using circus.

Could you check if django is working correctly?, did you check the logs folder for your taiga user?, what's the output of circusctl?

You could try running django manually using something like: 

cd /home/user/taiga/taiga-back
/home/user/.virtualenvs/taiga/bin/python3 /home/user/.virtualenvs/taiga/bin/gunicorn -w 3 -t 60 --pythonpath=. -b 127.0.0.1:8001 taiga.wsgi

Regards,

--
Please help us keep the Taiga.io Community open and inclusive, follow our Code of Conduct:
https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
---
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To post to this group, send email to tai...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/taigaio/eab39dd6-3bec-42e6-bef2-ccb9a6339b94%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jonathan Haimez

unread,
Feb 2, 2016, 8:04:33 AM2/2/16
to taigaio, haimez....@gmail.com
In information, i have not installed ssl connections and async ( rabbitmq-server and redis-server).


log of circus :

Trying import local.py settings...
Trying import local.py settings...
Trying import local.py settings...
[2016-02-02 00:48:06 +0100] [26365] [INFO] Shutting down: Master
[2016-02-02 00:48:09 +0100] [26541] [INFO] Starting gunicorn 19.3.0
[2016-02-02 00:48:09 +0100] [26541] [INFO] Listening at: http://127.0.0.1:8001 (26541)
[2016-02-02 00:48:09 +0100] [26541] [INFO] Using worker: sync
[2016-02-02 00:48:09 +0100] [26549] [INFO] Booting worker with pid: 26549
[2016-02-02 00:48:09 +0100] [26551] [INFO] Booting worker with pid: 26551
[2016-02-02 00:48:09 +0100] [26553] [INFO] Booting worker with pid: 26553

with
cd /home/user/taiga/taiga-back
/home/user/.virtualenvs/taiga/
bin/python3 /home/user/.virtualenvs/taiga/bin/gunicorn -w 3 -t 60 --pythonpath=. -b 127.0.0.1:8001 taiga.wsgi


[2016-02-02 13:56:03 +0100] [31730] [INFO] Starting gunicorn 19.3.0
[2016-02-02 13:56:03 +0100] [31730] [INFO] Listening at: http://127.0.0.1:8001 (31730)
[2016-02-02 13:56:03 +0100] [31730] [INFO] Using worker: sync
[2016-02-02 13:56:03 +0100] [31733] [INFO] Booting worker with pid: 31733
[2016-02-02 13:56:03 +0100] [31735] [INFO] Booting worker with pid: 31735
[2016-02-02 13:56:03 +0100] [31737] [INFO] Booting worker with pid: 31737
Trying import local.py settings...
Trying import local.py settings...
Trying import local.py settings...

For each page from front (not direct link like conf.json) i have this :

WebSocket connection to 'ws://xx.xx.xx.xx:8008/events' failed: Error during WebSocket handshake: Unexpected response code: 200

if fix the miss "s" wss => ws.

Alejandro Alonso

unread,
Feb 2, 2016, 8:57:30 AM2/2/16
to Jonathan Haimez, taigaio
Hello Jonathan,

Don't worry about the websocket connection, it's just a warning.

It seems your circus command works correctly, if you let running in a shell:

cd /home/user/taiga/taiga-back
/home/user/.virtualenvs/taiga/
bin/python3 /home/user/.virtualenvs/taiga/bin/gunicorn -w 3 -t 60 --pythonpath=. -b 127.0.0.1:8001 taiga.wsgi

And access to http://xx.xx.xx.xx:8008/api/v1/auth whats the output?

Did you check the output of "circusctl"?

Regards,  


For more options, visit https://groups.google.com/d/optout.

Jonathan Haimez

unread,
Feb 2, 2016, 12:34:58 PM2/2/16
to taigaio, haimez....@gmail.com
Page not found (404)
Request Method:    GET
Request URL:    http://ns3027655.ip-5-39-88.eu:8008/api/v1//v1/auth
Using the URLconf defined in taiga.urls, Django tried these URL patterns, in this order:
^api/v1/ ^$ [name='api-root']
^api/v1/ ^\.(?P<format>[a-z0-9]+)$ [name='api-root']
^api/v1/ ^locales$ [name='locales-list']
^api/v1/ ^locales\.(?P<format>[a-z0-9]+)$ [name='locales-list']
^api/v1/ ^auth$ [name='auth-list']
^api/v1/ ^auth\.(?P<format>[a-z0-9]+)$ [name='auth-list']
^api/v1/ ^auth/register$ [name='auth-register']
^api/v1/ ^auth/register\.(?P<format>[a-z0-9]+)$ [name='auth-register']
^api/v1/ ^users$ [name='users-list']
^api/v1/ ^users\.(?P<format>[a-z0-9]+)$ [name='users-list']
^api/v1/ ^users/by_username$ [name='users-by-username']
^api/v1/ ^users/by_username\.(?P<format>[a-z0-9]+)$ [name='users-by-username']
^api/v1/ ^users/cancel$ [name='users-cancel']
^api/v1/ ^users/cancel\.(?P<format>[a-z0-9]+)$ [name='users-cancel']
....
....
....
^api/v1/ ^stats/discover$ [name='discover-stats-list']
^api/v1/ ^stats/discover\.(?P<format>[a-z0-9]+)$ [name='discover-stats-list']
The current URL, api/v1//v1/auth, didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.


i see that :

so i change my config to avoid this case, this misformating url.
in config nginx : taiga
    # Backend
    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/v1/;

        proxy_redirect off
;
   
}
replace :
proxy_pass http
://127.0.0.1:8001/api/v1/;
to
proxy_pass http://127.0.0.1:8001$request_uri;

i don't know if it's safe, but it fix my issue.

Jonathan Haimez

unread,
Feb 3, 2016, 1:01:00 PM2/3/16
to taigaio, haimez....@gmail.com
i understand the problem of conf.json, not copy.

in this tutorial, they said conf\conf.json instead of dist\conf.json
https://github.com/taigaio/taiga-front/wiki/install-guides

In this tutorial "PROD", there are the trust answer:
https://taigaio.github.io/taiga-doc/dist/setup-production.html

But in this tutorial "DEV",  there are not enougth detail about the folder.
https://taigaio.github.io/taiga-doc/dist/setup-development.html

If we copy.change conf.json in conf\ folder, gulp never copy conf.json in the rigth place dist\ folder.
...

Alejandro Alonso

unread,
Feb 4, 2016, 4:33:06 AM2/4/16
to Jonathan Haimez, taigaio
Reply all
Reply to author
Forward
0 new messages