Metaswitch / project-clearwater-issues

Issue list for Project Clearwater
0 stars 1 forks source link

502 Bad Gateway nginx/1.4.6 (Ubuntu) #7

Open jenkins-clearwater opened 7 years ago

jenkins-clearwater commented 7 years ago

[AvinashReddyT]

I am, working on Clearwater Docker images. When ever I try to make some changes to my containers (like adding application server in the json file) my Clearwater use to stop working(I can generate numbers on ellis but I could not register them on Clearwater using zoipher).

So, by using "commit"(sudo docker commit ) command I saved the status of my containers. Then I started using my new images. But , when ever I tried to log into ellis I am , getting a message on my browser "502 Bad Gateway nginx/1.4.6 (Ubuntu)".

Then I even crossed checked my new running container by connecting to them. Where I could even get the data in the database, of my older containers.

I need a solution for this issue.

[Used to be https://github.com/Metaswitch/clearwater-docker/issues/28]

jenkins-clearwater commented 7 years ago

[graemerobertson]

I think what you're saying is that every time you make a change to a Clearwater docker container and run docker commit, Ellis stops working. Is that right? I'm wondering whether our Docker configuration script that gets run when a container starts up is not idempotent, so if you start the container up a second time Clearwater will be misconfigured. This would be an issue we'd be keen to resolve so thanks for raising it.

In the meantime, are you able to achieve your goal by editing the Dockerfile instead of making the changes manually and running docker commit? So, for adding an application servers JSON file to Ellis, can you add a new COPY command to https://github.com/Metaswitch/clearwater-docker/blob/master/ellis/Dockerfile?

jenkins-clearwater commented 7 years ago

[AvinashReddyT]

@graemerobertson Thanks for the reply. Yes, Ellis stops working when ever I make some changes to Clearwater docker containers and run commit. And even the Docker configuration script seams to be same(ie, no changes in script) as earlier one. No, I am not able to achieve my goal by editing the Dockerfile. Yes, I can add new copy command to ellis Dockerfile. But its of no use.

I am still trying to debug this issue. But I am unable to solve this.

I need your help @graemerobertson .

jenkins-clearwater commented 7 years ago

[graemerobertson]

It sounds like the Ellis process isn't running for some reason. Can you run ps -eaf | grep ellis on the Ellis container and see if it is running? It's probably also worth looking for the latest logs in /var/log/ellis/ to help us determine why Ellis isn't working properly.

By the way, why does adding a new COPY command to your Ellis Dockerfile not help you solve this issue?

jenkins-clearwater commented 7 years ago

[AvinashReddyT]

@graemerobertson Thank you for the reply.

My Ellis is working, i checked it by running ps -eaf | grep ellis. But i am unable to access it from browser(My request is going from my browser to server, But i am not getting back response from server). I even attached a document in which i have shared my logs of ellis and even error logs of nginx. Can you go through the document once.

I was able to add a COPY command in Dockerfile. But that thing i can check only when my new containers starts working and access it from browser. ClearwaterDockerIssue.docx

jenkins-clearwater commented 7 years ago

[AvinashReddyT]

I am new to this environment and trying to get adopt to it.

I want to know the steps for saving the status of the container and how to reuse it when ever i need. For Example: If i want to create some 20 numbers on ellis and how to reuse these numbers in future. Right now I am facing some issues like --- I was creating some numbers on ellis and stopping all the containers. And when i restart the containers and log on to ellis , I am getting some message like "Failed to update the server (see detailed diagnostics in developer console). Please refresh the page.".

@richardwhiuk @graemerobertson @rkd-msw @chris-elford-metaswitch @sathiyan-sivathas

jenkins-clearwater commented 7 years ago

[eleanor-merry]

Hi @AvinashReddyT. Just to let you know, we're investigating this issue now, and trying to reproduce it on our systems.

jenkins-clearwater commented 7 years ago

[AvinashReddyT]

Thanks for the reply @eleanor-merry

Hi all, We need to stop all Clearwater processes running on all the Clearwater docker containers. To do that, we are using /usr/bin/supervisorctl script. Following is the command and its output that we used on homestead container to stop all processes on that container.

But as you can see, after stopping processes when we are starting those processes again then some processes are not starting again.

root@b050993bfc2f:/# /usr/bin/supervisorctl clearwater-group:cassandra RUNNING pid 316, uptime 0:00:56 clearwater-group:homestead RUNNING pid 623, uptime 0:00:40 clearwater-group:homestead-prov RUNNING pid 280, uptime 0:00:57 clearwater-group:nginx RUNNING pid 281, uptime 0:00:57 clearwater-infrastructure EXITED Sep 30 11:05 AM sshd RUNNING pid 10, uptime 0:01:00

supervisor> stop all sshd: stopped homestead-prov: stopped nginx: stopped homestead: stopped cassandra: stopped

supervisor> start all clearwater-infrastructure: started sshd: started homestead-prov: ERROR (abnormal termination) nginx: started homestead: ERROR (abnormal termination)

cassandra: started

Please let us know if we are doing something wrong.