Installation problem: Can connect to taiga-front from host machine only

1,522 views
Skip to first unread message

rajat...@gmail.com

unread,
Mar 26, 2015, 2:36:30 PM3/26/15
to tai...@googlegroups.com

Hi..


I completed the installation on Ubuntu 14.04 VM as per http://taigaio.github.io/taiga-doc/dist/setup-production.html

1. I am using a VM on Azure and have created TCP end points for port 80, 8000 & 8001.

2. When I try to connect from an external system, I get the oompa loompas error message with the Js console showing:

http://localhost:8000/api/v1/projects Failed to load resource: net::ERR_CONNECTION_REFUSED

3. When I try to connect from the server using lynx localhost, I get a proper response with no errors

4. When I try to connect from the server using lynx locahost:8000/api/v1/, I get the following error:

    Looking up  'localhost' first

    Looking up localhost first

    Looking up localhost:8000

    Making HTTP connection to localhost:8000

    Alert!: Unable to connect to remote host.

    lynx: Can't access startfile http://localhost:8000/api/v1/

5. When I try to connect from the server using lynx locahost:8000/api/v1/, I get the following error:

     502 Bad Gateway

     nginx/1.4.6 (Ubuntu)

6. My conf.json for front end follows:

    {

    "api": "http://xxxxx.cloudapp.net/api/v1/",

    "eventsUrl": "ws://xxxxx.cloudapp.net/events,

    "debug": true,

    "publicRegisterEnabled": true,

    "feedbackEnabled": true,

    "privacyPolicyUrl": null,

    "termsOfServiceUrl": null,

    "maxUploadFileSize": null,

    "contribPlugins": [],

    "debugInfo": false

    } 


7. app-loader.js shows:

    (function() {

    var promise, version;

    version = 1426845020297;


     window.taigaConfig = {

     "api": "http://localhost:8000/api/v1/",

     "eventsUrl": null,

     "debug": true,

     "publicRegisterEnabled": true,

     "feedbackEnabled": true,

     "privacyPolicyUrl": null,

     "termsOfServiceUrl": null,

     "maxUploadFileSize": null,

     "contribPlugins": []

      };

      promise = $.getJSON("/js/conf.json");

      promise.done(function(data) {

      return window.taigaConfig = _.extend({}, window.taigaConfig, data);

      });


     promise.always(function() {

     var plugins;

      if (window.taigaConfig.contribPlugins.length > 0) {

      plugins = _.map(window.taigaConfig.contribPlugins, function(plugin) {

        return plugin + "?v=" + version;

      });

      return ljs.load(plugins, function() {

        return ljs.load("/js/app.js?v=" + version, function() {

          return angular.bootstrap(document, ['taiga']);

        });

      });

      } else {

       return ljs.load("/js/app.js?v=" + version, function() {

        return angular.bootstrap(document, ['taiga']);

        });

      }

    });


    }).call(this);


8. local.py for taiga-back has all url's changed to xxxxx.cloudapp.net

9. nginx settings follow:


    server {

      listen 80 default_server;

      server_name _;


    large_client_header_buffers 4 32k;

    client_max_body_size 50M;

    charset utf-8;


    access_log /home/xxxx/logs/nginx.access.log;

    error_log /home/xxxx/logs/nginx.error.log;


    # Frontend

    location / {

        root /home/xxxx/taiga-front-dist/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/xxxx/taiga-back/static;

    }


    # Media files

    location /media {

        alias /home/xxxx/taiga-back/media;

    }

    }

Please let me know how to fix the error!?

Alejandro Alonso

unread,
Mar 27, 2015, 2:41:13 AM3/27/15
to rajat...@gmail.com, tai...@googlegroups.com
Hello, 

I've seen that points 4 and 5 make the  same request "When I try to connect from the server using lynx locahost:8000/api/v1/, I get the following error:", could you explain what's the difference?.
Could you also paste your circus.ini configuration file?
Regards,

--
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/c056fc28-dece-4e02-b87d-2f931daed32b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

  
Alejandro Alonso Fernández  
CIO & Co-founder

www.kaleidos.net/FC8EAC/

ra...@wearexenon.com

unread,
Mar 27, 2015, 3:14:09 AM3/27/15
to tai...@googlegroups.com, rajat...@gmail.com
Hi Alejandro,

5 was a typo. The command I ran was: lynx http://localhost/api/v1/
and I got a got bad gateway response from nginx.

Contents of circus.ini follow:

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

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

[watcher:taiga-celery]
working_dir = /home/xxxx/taiga-back
cmd = celery
args = -A taiga worker -c 4
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/xxxx/logs/celery.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 4
stderr_stream.class = FileStream
stderr_stream.filename = /home/xxxx/logs/celery.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 4

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

Regards,
Rajat

Xenon Automotive
Innovate · Shift · Accelerate · Drive

This message is confidential and may also be privileged. If you have received it by mistake, please let us know by e-mail reply and delete it, and any attachments from your system; you may not copy or forward this message or disclose its contents to anyone. The integrity and security of messages sent over the internet cannot be guaranteed. Xenon does not accept liability for any errors or omissions.

Alejandro Alonso

unread,
Mar 27, 2015, 3:21:33 AM3/27/15
to ra...@wearexenon.com, tai...@googlegroups.com, rajat...@gmail.com
Could you check if there is some relevant info in /home/xxxx/logs/ files?

rajat...@gmail.com

unread,
Mar 27, 2015, 3:27:33 AM3/27/15
to tai...@googlegroups.com
The only log files with some content are nginx.accee.log & nginx.error.log. Error log entry for today follows:

2015/03/27 07:12:34 [error] 1300#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: _, request: "GET /api/v1/ HTTP/1.0", upstream: "http://127.0.0.1:8001/api/v1/", host: "localhost"

Regards,
Rajat

Alejandro Alonso

unread,
Mar 27, 2015, 3:29:50 AM3/27/15
to Rajat Patni, tai...@googlegroups.com
I don't know what could be failing...

Could you try use taiga-scripts for an automated installation? -> http://taigaio.github.io/taiga-doc/dist/setup-alternatives.html

When you have it working you can customize the settings to fit your needs.

Regards,

--
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.

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

rajat...@gmail.com

unread,
Mar 27, 2015, 3:31:41 AM3/27/15
to tai...@googlegroups.com
Do you suggest starting over with a fresh VM for that? Or can I run the scripts on the same box?

Regards

Alejandro Alonso

unread,
Mar 27, 2015, 3:35:05 AM3/27/15
to Rajat Patni, tai...@googlegroups.com
A fresh VM would be the best option.

Regards,


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

rajat...@gmail.com

unread,
Mar 28, 2015, 3:11:34 PM3/28/15
to tai...@googlegroups.com
Hi Alejandro,

I tried using the scripts - and it worked...I am able to login now...Thanks!!!
However, when trying to add a new user, the email that gets sent out has a link pointing to localhost:8000 and not to the right server address. When I change the manually to the right server - the rest of the signup process works perfectly...
How do I fix this?

Regards,
Rajat

rajat...@gmail.com

unread,
Mar 28, 2015, 3:27:30 PM3/28/15
to tai...@googlegroups.com
I think I figured it out - changed the SITES["front"]["domain"] setting in local.py

I now have a different issue - when trying to change the avatar image, it again tries to fetch the image from localhost:8000 (I saw the error on the javascript console), causing it to fail. Where do I need to change the settings for it to point to the right path?

Regards

Alejandro Alonso

unread,
Mar 30, 2015, 1:58:19 AM3/30/15
to Rajat Patni, tai...@googlegroups.com
Hello!,

In local.py you should overwrite the MEDIA_URL setting.

Regards!,


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages