kaleidos-ventures / taiga-scripts

Taiga deploy scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Production installation on EC2

danielshir opened this issue · comments

I've run the server installation on a clean Ubuntu instance on EC2 (nothing installed on it, except git).
The installation runs fine without any issues, but I end up with just an error page.

screen shot 2014-10-02 at 1 55 07 pm

Probably is a "taiga-back" problem, the javascript console show something?

Yep, it says it can't connect :

OPTIONS http://localhost:8000/api/v1/projects net::ERR_CONNECTION_REFUSED

I did check, and gunicorn is running.
It looks as if this is a config issue, and taiga doesn't have the correct
hostname.
How do you guys resolve the hostname on EC2?

On Thu, Oct 2, 2014 at 2:00 PM, Jesús Espino notifications@github.com
wrote:

Probably is a "taiga-back" problem, the javascript console show something?


Reply to this email directly or view it on GitHub
#5 (comment).

Is issue is related to an other: #4

And I'm currently workong on it ;)

Awesome :)

On that note, kudos for open sourcing this.
I'm really looking forward to checking it out.

On Thu, Oct 2, 2014 at 2:11 PM, Andrey Antukh notifications@github.com
wrote:

Is issue is related to an other: #4
#4

And I'm currently workong on it ;)


Reply to this email directly or view it on GitHub
#5 (comment).

commented

I have a similar issue, albeit not deploying to EC2.

The root issue seems to be that gunicorn keeps restarting. When started manually, it will bail out like this:

(taiga)taiga@taiga:~/taiga-back$ gunicorn -w3 -t60 --pythonpath=. taiga.wsgi
2014-10-02 13:37:22 [11324] [INFO] Starting gunicorn 18.0
2014-10-02 13:37:22 [11324] [INFO] Listening at: http://127.0.0.1:8000 (11324)
2014-10-02 13:37:22 [11324] [INFO] Using worker: sync
2014-10-02 13:37:22 [11327] [INFO] Booting worker with pid: 11327
2014-10-02 13:37:22 [11329] [INFO] Booting worker with pid: 11329
2014-10-02 13:37:22 [11330] [INFO] Booting worker with pid: 11330
Trying import local.py settings...
Trying import local.py settings...
Trying import local.py settings...

Error: dictionary changed size during iteration

@zakx Yes, I have detected it, it should be fixed in the last master branch of taiga-back.
It only one part of the total fix of this issue.

commented

awesome, thanks 👍

commented

I can confirm that it works for me after pulling HEAD in taiga-back.

Great!

I just have merged the improvements branch.

Additionally, I almost finished the taiga-vagrant refactor, that now uses taiga-scripts as provision scripts, and I will push the new version in few minuts.

Still the same over here, even after pulling.
Also, I'm getting these after boot:

-bash: /home/ubuntu/.tmux-conf.sh: line 4: syntax error near unexpected token `;'
-bash: /home/ubuntu/.tmux-conf.sh: line 4: `    if ; then'
ubuntu@foo:~$ head .tmux-conf.sh 
function taiga-runserver {
    session=taiga
    state=
    if ; then
        if ; then
            tmux attach -t 
        fi
        tmux select-window -t servers
    else
        tmux new-session -ds  -n servers

Sorry, my fault, I now pushed the fix. I have forgotten escape some $ chars.

Having dropped my VPS instance and starting over from scratch, the problem still persists. For the shell script installation I just hit enter for defaults (HTTP and port 8000). The web inspector console output is:

"Initialize navigation urls" libs.js:9
"Initializing configuration" Object { host: "localhost:8000", scheme: "http", debug: true, defaultLanguage: "en", languageOptions: Object, publicRegisterEnabled: false, privacyPolicyUrl: null, termsOfServiceUrl: null } libs.js:9
"Initialize api urls" libs.js:9
"Initialize resources" libs.js:9
"Initialize application" libs.js:9
"FAIL" app.js:2

I can see via ps aux that there are 4 instances of gunicorn running on port 8001

Same for me, the problem is still there -

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

When you start running a setup-server.sh, the script asks you the hostname and scheme. As far as i know you are keep the default values, but you are trying connect to vps out of localhost.

For get it working properly, you should set scheme as http (default) and hostname yourvpsexternalip:8000

Ah, ok.

I've changed it in ~/.setup/data.sh and I've tried restarting gunicorn with kill -HUP [PID] for each of the pids. I've also re-run the setup script. Also restarted nginx.

Am I missing any other steps to restart?

You should change the taiga-front/app/config/main.coffee and rerun gulp deploy on taiga-front directory

That fixes it. 👍

Awesome!