Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Localhost not working #123

Closed
sarzali07 opened this issue Sep 4, 2018 · 7 comments
Closed

Localhost not working #123

sarzali07 opened this issue Sep 4, 2018 · 7 comments

Comments

@sarzali07
Copy link

hospitalrun servver

I manage to install hospitalrun server, but after install step 4, I type localhost as per step 5, UNABLE to connect internet.

Regards

@MatthewDorner
Copy link
Contributor

That is unfortunate. You may be having the same problems we're working on here and hope to have fixed soon: #119.

Would you be able to restart your containers by first doing "docker-compose down" to shut them down, and then "docker-compose up | grep hospitalrun" and then wait 10 minutes and show the resulting output?

This will allow me to confirm whether you're having the problem I'm suspecting.

@sarzali07
Copy link
Author

$ docker-compose down
Removing hospitalrunserver_nginx_1 ... done
Removing hospitalrun ... done
Removing logstash_hr ... done
Removing elasticsearch_hr ... done
Removing couchdb_hr ... done
Removing network hospitalrunserver_default

$docker-compose up | grep hospitalrun
elasticsearch_hr is up-to-date
couchdb_hr is up-to-date
logstash_hr is up-to-date
Starting hospitalrun ... done
Starting hospitalrunserver_nginx_1 ... done
Attaching to elasticsearch_hr, couchdb_hr, logstash_hr, hospitalrun, hospitalrunserver_nginx_1
hospitalrun | Scheduling setup scripts to run in 40 seconds...
hospitalrun | Scheduling setup scripts to run in 120 seconds...
hospitalrun |
hospitalrun | > [email protected] start /usr/src/app
hospitalrun | > node app.js
hospitalrun |
hospitalrun | Loading raml proxy - this may take a while...
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 70 100 64 100 6 219 20 --:--:-- --:--:-- --:--:-- 219
hospitalrun | {"error":"unauthorized","reason":"You are not a server admin."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 106 100 12 100 94 33 259 --:--:-- --:--:-- --:--:-- 260
hospitalrun | {"ok":true}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 95 100 95 0 0 730 0 --:--:-- --:--:-- --:--:-- 736
hospitalrun | {"error":"file_exists","reason":"The database could not be created, the file already exists."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 99 100 12 100 87 62 450 --:--:-- --:--:-- --:--:-- 453
hospitalrun | {"ok":true}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 224 100 58 100 166 294 841 --:--:-- --:--:-- --:--:-- 842
hospitalrun | {"error":"conflict","reason":"Document update conflict."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 95 100 95 0 0 2016 0 --:--:-- --:--:-- --:--:-- 2021
hospitalrun | {"error":"file_exists","reason":"The database could not be created, the file already exists."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 105 100 12 100 93 98 766 --:--:-- --:--:-- --:--:-- 768
hospitalrun | {"ok":true}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 1075 100 58 100 1017 412 7240 --:--:-- --:--:-- --:--:-- 7264
hospitalrun | {"error":"conflict","reason":"Document update conflict."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 413 100 207 100 206 424 422 --:--:-- --:--:-- --:--:-- 425
hospitalrun | "{couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, proxy_authentification_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}"
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 13 100 7 100 6 7 6 0:00:01 --:--:-- 0:00:01 7
hospitalrun | "true"
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 183 100 58 100 125 70 151 --:--:-- --:--:-- --:--:-- 151
hospitalrun | {"error":"conflict","reason":"Document update conflict."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 60 100 58 100 2 1419 48 --:--:-- --:--:-- --:--:-- 1450
hospitalrun | {"error":"conflict","reason":"Document update conflict."}
hospitalrun | Setting up mappings
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 1516 100 351 100 1165 2161 7173 --:--:-- --:--:-- --:--:-- 7191
hospitalrunserver_nginx_1 exited with code 1
hospitalrun | {"error":{"root_cause":[{"type":"index_already_exists_exception","reason":"index [hrdb/X19x5MQaTMKznJ9ha3LXUg] already exists","index_uuid":"X19x5MQaTMKznJ9ha3LXUg","index":"hrdb"}],"type":"index_already_exists_exception","reason":"index [hrdb/X19x5MQaTMKznJ9ha3LXUg] already exists","index_uuid":"X19x5MQaTMKznJ9ha3LXUg","index":"hrdb"},"status":400} % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 70 100 64 100 6 917 86 --:--:-- --:--:-- --:--:-- 927
hospitalrun | {"error":"unauthorized","reason":"You are not a server admin."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 106 100 12 100 94 271 2128 --:--:-- --:--:-- --:--:-- 2136
hospitalrun | {"ok":true}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 95 100 95 0 0 3268 0 --:--:-- --:--:-- --:--:-- 3392
hospitalrun | {"error":"file_exists","reason":"The database could not be created, the file already exists."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 99 100 12 100 87 466 3383 --:--:-- --:--:-- --:--:-- 3480
hospitalrun | {"ok":true}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 224 100 58 100 166 1401 4011 --:--:-- --:--:-- --:--:-- 4048
hospitalrun | {"error":"conflict","reason":"Document update conflict."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 95 100 95 0 0 3473 0 --:--:-- --:--:-- --:--:-- 3518
hospitalrun | {"error":"file_exists","reason":"The database could not be created, the file already exists."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 105 100 12 100 93 200 1554 --:--:-- --:--:-- --:--:-- 1576
hospitalrun | {"ok":true}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 1075 100 58 100 1017 2060 36138 --:--:-- --:--:-- --:--:-- 36321
hospitalrun | {"error":"conflict","reason":"Document update conflict."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 413 100 207 100 206 5190 5165 --:--:-- --:--:-- --:--:-- 5307
hospitalrun | "{couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, proxy_authentification_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}"
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 13 100 7 100 6 112 96 --:--:-- --:--:-- --:--:-- 112
hospitalrun | "true"
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 183 100 58 100 125 3402 7332 --:--:-- --:--:-- --:--:-- 7812
hospitalrun | {"error":"conflict","reason":"Document update conflict."}
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 60 100 58 100 2 1048 36 --:--:-- --:--:-- --:--:-- 1054
hospitalrun | {"error":"conflict","reason":"Document update conflict."}
hospitalrun | Setting up mappings
hospitalrun | % Total % Received % Xferd Average Speed Time Time Time Current
hospitalrun | Dload Upload Total Spent Left Speed
100 1516 100 351 100 1165 10695 35497 --:--:-- --:--:-- --:--:-- 36406

and hang cli.

Regards

@MatthewDorner
Copy link
Contributor

That's different than I expected, your nginx container is the one that's shutting down. There might be because of a problem related to the SSL certificate configuration, as described in step 3 of the guide here:
https://github.com/HospitalRun/hospitalrun-server/blob/master/DEPLOYMENT_GUIDE.md

And you can post the logs from the nginx container by doing the same as you did above and using "docker-compose down", then "docker-compose up | grep nginx" instead.

@sarzali07
Copy link
Author

nginx_1 | Requested name 192.168.100.42 is an IP address. The Let's Encrypt certificate authority will not issue certificates for a bare IP address.
nginx_1 | 2018/09/06 05:43:54 [emerg] 218#218: host not found in upstream "hospitalrun" in /etc/nginx/conf.d/defaultautossl.conf:33
nginx_1 | nginx: [emerg] host not found in upstream "hospitalrun" in /etc/nginx/conf.d/defaultautossl.conf:33
hospitalrunserver_nginx_1 exited with code 1

Here it stick and do not go further

@sarzali07
Copy link
Author

Again I run same command

docker-compose up | grep nginx
elasticsearch_hr is up-to-date
couchdb_hr is up-to-date
logstash_hr is up-to-date
Starting hospitalrun ...

ERROR: for hospitalrun UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

ERROR: for hospitalrun UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

Receive these erros

@MatthewDorner
Copy link
Contributor

It's because you have an IP address for the "DOMAIN_NAME" in docker-compose.yml. It needs a public domain name on the internet like "www.mydomain.com" in order to issue a SSL certificiate and validate it. If you're not on a publicly-accessible domain like that, you can use your own SSL certificate, see where it says "To instead use your own SSL cert..." here:

https://github.com/HospitalRun/hospitalrun-server/blob/master/DEPLOYMENT_GUIDE.md

To be honest you'll probably still have problems after you fix that, due to the issues we're working on in here: #119. Those should be done in a couple of days.

@MatthewDorner
Copy link
Contributor

I merged the mentioned fixes in just now, so you should be good if you update to get the fixes and address your SSL issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants