RADAR-base / RADAR-Docker

Integrated Docker Stack for the RADAR mHealth Streaming Platform Components
https://hub.docker.com/u/radarbase/dashboard/
Apache License 2.0
16 stars 16 forks source link

Host not found in upstream error upon installation #230

Closed sallymoon10 closed 3 years ago

sallymoon10 commented 3 years ago

Hello :) I successfully finished installing RADAR base on my Google Cloud linux server. However, I'm having trouble accessing the management portal web application via browser.

Here are the steps I completed so far:

  1. Created a custom domain name and connected to my cloud instance
  2. Installed apache web server and saw that the custom domain name is connected to the external IP address of the cloud server
  3. Updated the .env file and set my custom domain name to be the 'SERVER_NAME' variable, along with go through all the other steps outlined in onboarding steps here (https://radar-base.org/index.php/2019/02/13/how-to-install-radar-base-using-radar-docker/)

When I start the apache web server on my instance, I can access my server using the custom domain through a browser. However, when I tried to install radar-base, it gave me the following error:

ERROR: for radar-cp-hadoop-stack_webserver_1 Cannot start service webserver: driver failed programming external connectivity on endpoint radar-cp-hadoop-stack_webserver_1 (54d12d5c45d c2b38c6f52d95dbd8ddde7394632c91b86c48bc456c6592f6ca28): Error starting userland proxy: listen tcp 0.0.0.0:80: listen: address already in use ERROR: for webserver Cannot start service webserver: driver failed programming external connectivity on endpoint radar-cp-hadoop-stack_webserver_1 (54d12d5c45dc2b38c6f52d95dbd8ddde739 4632c91b86c48bc456c6592f6ca28): Error starting userland proxy: listen tcp 0.0.0.0:80: listen: address already in use ERROR: Encountered errors while bringing up the project.

Therefore, I stopped the apache web server using the '/etc/init.d/apache2 stop' command and tried installing radarbase again and was able to successfully install. However, I am no longer able to connect to my server using my custom domain. Howvere, I got the following message:

Failed authorization procedure. mhiatsl.com (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://mhiat sl.com/.well-known/acme-challenge/J9Uksy-arqSFFPc1PLF-x1glFd6lunojU-2u6IcucPU: Connection refused

Also when I run bin/radar-docker logs -f webserver, I get the following errors:

[emerg] 1#1: host not found in upstream "radar-integration" in /etc/nginx/optional-services.conf:3 webserver_1 | nginx: [emerg] host not found in upstream "radar-integration" in /etc/nginx/optional-services.conf:3

So it seems to me that the webserver deployed with radar-base is not connected properly to the host / DNS. Do you have any suggestions what I need to do moving forwards? Also, are there any additional instructions available on what kind of steps you need to take to get radarbase successfully connected to a cloud server?

Also, do I need to uninstall apache web server in order for radarbase webserver to run properly? Or is it enough to stop it?

Also, do I need to enable https? or is http enough?

Thanks for your help and continued effort in maintaining this project, look forward to hearing back! :)

yatharthranjan commented 3 years ago

Hi, Yes, RADAR-Base comes with its own Nginx Webserver, any external webserver is not required.

This upstream error is due to optional services which are not enabled but webserver configs are still copied over. Can you comment all the lines in /etc/nginx/optional-services.conf (by adding # at the start of each line). This is should fix the error above.

yatharthranjan commented 3 years ago

Hi Sorry, my bad. the path should be etc/webserver/optional-services.conf. This is under RADAR-Docker/dcompose-stack/radar-cp-hadoop-stack.

sallymoon10 commented 3 years ago

Works now, thanks so much!

jimmafeni commented 3 years ago

@yatharthranjan @sallymoon10 Hello, I commented all lines in etc/webserver/optional-services.conf. So now the management portal opens when I use https://servername/managementportal as shown below radarmanagement

However, when I login using 'admin' and 'MANAGEMENTPORTAL_COMMON_ADMIN_PASSWORD', I do not get into the portal but system doesn't say wrong credentials. So I am stuck in sign in.

Please any comments on how to get pass sign in?

yatharthranjan commented 3 years ago

Can you try a re-install? run following- ./bin/radar-docker down ./bin/radar-docker install

if that does not work, please post any errors from the console logs by inspecting the web page and logs of the management portal container.

jimmafeni commented 3 years ago

@yatharthranjan reinstalled docker but still can't login. Here are the errors I get:

Failed to load resource: the server responded with a status of 401 ()
/managementportal/api/account:1 
Failed to load resource: the server responded with a status of 401 ()
/managementportal/api/profile-info:1 
Failed to load resource: the server responded with a status of 401 ()
9
/managementportal/api/account:1 
Failed to load resource: the server responded with a status of 401 ()

Please do you know what may be the issue?

jimmafeni commented 3 years ago

@yatharthranjan Also when I check the status of docker services using docker ps -a. I got an unhealthy service. Could this be the problem?

cad5671b5804 radarbase/radar-gateway:0.3.9 "radar-gateway /etc/…" 41 minutes ago Up 5 minutes (unhealthy) radar-cp-hadoop-stack_gateway_1

kafe09 commented 3 years ago

Hello @jimmafeni and @yatharthranjan -> I'm facing exactly the same issue. How can we solve it?

BR Kafe

litingzhou1 commented 3 years ago

I met same problem, the gateway is unhealthy.

iDmple commented 3 years ago

I think there is an issue with the healthcheck of gateway. I got to a point where the managementportal works, but the gateway is still unhealthy.