[GH-ISSUE #49] Unable to install ambar #51

Closed
opened 2026-02-27 15:54:41 +03:00 by kerem · 12 comments
Owner

Originally created by @thangngoc89 on GitHub (Jun 30, 2017).
Original GitHub issue: https://github.com/RD17/ambar/issues/49

I'm unable to start ambar at the moment
This is all I did:

# Pull ambar.py from github
$ sudo ./ambar.py install
$ sudo ./ambar.py start

 sudo ./ambar.py start  
 

______           ____     ______  ____       
/\  _  \  /'\_/`\/\  _`\  /\  _  \/\  _`\    
\ \ \L\ \/\      \ \ \L\ \ \ \L\ \ \ \L\ \  
 \ \  __ \ \ \__\ \ \  _ <'\ \  __ \ \ ,  /   
  \ \ \/\ \ \ \_/\ \ \ \L\ \ \ \/\ \ \ \ \  
   \ \_\ \_\ \_\ \_\ \____/ \ \_\ \_\ \_\ \_\
    \/_/\/_/\/_/ \/_/\/___/   \/_/\/_/\/_/\/ /


                                              
Docker version 17.05.0-ce, build 89658be
docker-compose version 1.10.0, build 4bd6f1a
vm.max_map_count = 262144
net.ipv4.ip_local_port_range = 15000 61000
net.ipv4.tcp_fin_timeout = 30
net.core.somaxconn = 1024
net.core.netdev_max_backlog = 2000
net.ipv4.tcp_max_syn_backlog = 2048
Creating network "ambar_internal_network" with the default driver
Creating ambar_es_1
Creating ambar_proxy_1
Creating ambar_webapi-cache_1
Creating ambar_rabbit_1
Creating ambar_db_1
Creating ambar_webapi_1
Creating ambar_frontend_1
Waiting for Ambar to start...
Ambar is running on http://192.168.1.5:80

But accessing http://192.168.1.5:80 results in a DNS Error (I think, since I'm receving a page from my ISP that said can't find this page)

Accessing http://192.168.1.5:80/api results in a 504 Gateway timeout error from Nginx

Logs:

Attaching to ambar_webapi_1
webapi_1        | 2017/06/30 15:25:00 Waiting for host: 
webapi_1        | 2017/06/30 15:25:00 Waiting for host: es:9200
webapi_1        | 2017/06/30 15:25:00 Connected to unix:///var/run/docker.sock
webapi_1        | 2017/06/30 15:25:31 Received 200 from http://es:9200
webapi_1        | Crawler schedule service initialized
webapi_1        | Pipeline initialized
webapi_1        | Started on :::8080
Attaching to ambar_proxy_1
proxy_1         | Starting NGINX...
proxy_1         | 192.168.1.5 - - [30/Jun/2017:15:25:36 +0000] "GET / HTTP/1.1" 403 612 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36" "-"
proxy_1         | 2017/06/30 15:26:43 [error] 7#7: *1 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.5, server: ambar-fe, request: "GET /api/ HTTP/1.1", upstream: "http://125.235.4.59:8080/api/", host: "192.168.1.5"
proxy_1         | 192.168.1.5 - - [30/Jun/2017:15:26:43 +0000] "GET /api/ HTTP/1.1" 504 585 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36" "-"

All docker images are up to date

Originally created by @thangngoc89 on GitHub (Jun 30, 2017). Original GitHub issue: https://github.com/RD17/ambar/issues/49 I'm unable to start ambar at the moment This is all I did: ```bash # Pull ambar.py from github $ sudo ./ambar.py install $ sudo ./ambar.py start sudo ./ambar.py start ______ ____ ______ ____ /\ _ \ /'\_/`\/\ _`\ /\ _ \/\ _`\ \ \ \L\ \/\ \ \ \L\ \ \ \L\ \ \ \L\ \ \ \ __ \ \ \__\ \ \ _ <'\ \ __ \ \ , / \ \ \/\ \ \ \_/\ \ \ \L\ \ \ \/\ \ \ \ \ \ \_\ \_\ \_\ \_\ \____/ \ \_\ \_\ \_\ \_\ \/_/\/_/\/_/ \/_/\/___/ \/_/\/_/\/_/\/ / Docker version 17.05.0-ce, build 89658be docker-compose version 1.10.0, build 4bd6f1a vm.max_map_count = 262144 net.ipv4.ip_local_port_range = 15000 61000 net.ipv4.tcp_fin_timeout = 30 net.core.somaxconn = 1024 net.core.netdev_max_backlog = 2000 net.ipv4.tcp_max_syn_backlog = 2048 Creating network "ambar_internal_network" with the default driver Creating ambar_es_1 Creating ambar_proxy_1 Creating ambar_webapi-cache_1 Creating ambar_rabbit_1 Creating ambar_db_1 Creating ambar_webapi_1 Creating ambar_frontend_1 Waiting for Ambar to start... Ambar is running on http://192.168.1.5:80 ``` But accessing http://192.168.1.5:80 results in a DNS Error (I think, since I'm receving a page from my ISP that said can't find this page) Accessing http://192.168.1.5:80/api results in a 504 Gateway timeout error from Nginx Logs: ``` Attaching to ambar_webapi_1 webapi_1 | 2017/06/30 15:25:00 Waiting for host: webapi_1 | 2017/06/30 15:25:00 Waiting for host: es:9200 webapi_1 | 2017/06/30 15:25:00 Connected to unix:///var/run/docker.sock webapi_1 | 2017/06/30 15:25:31 Received 200 from http://es:9200 webapi_1 | Crawler schedule service initialized webapi_1 | Pipeline initialized webapi_1 | Started on :::8080 ``` ``` Attaching to ambar_proxy_1 proxy_1 | Starting NGINX... proxy_1 | 192.168.1.5 - - [30/Jun/2017:15:25:36 +0000] "GET / HTTP/1.1" 403 612 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36" "-" proxy_1 | 2017/06/30 15:26:43 [error] 7#7: *1 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.1.5, server: ambar-fe, request: "GET /api/ HTTP/1.1", upstream: "http://125.235.4.59:8080/api/", host: "192.168.1.5" proxy_1 | 192.168.1.5 - - [30/Jun/2017:15:26:43 +0000] "GET /api/ HTTP/1.1" 504 585 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36" "-" ``` All docker images are up to date
kerem 2026-02-27 15:54:41 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@thangngoc89 commented on GitHub (Jun 30, 2017):

Update: Full logs here https://gist.github.com/thangngoc89/1591a68943937eba1ea7ea5c65cabe2a

<!-- gh-comment-id:312300588 --> @thangngoc89 commented on GitHub (Jun 30, 2017): Update: Full logs here https://gist.github.com/thangngoc89/1591a68943937eba1ea7ea5c65cabe2a
Author
Owner

@isido993 commented on GitHub (Jul 4, 2017):

Hello,

What OS are you running?

<!-- gh-comment-id:312805337 --> @isido993 commented on GitHub (Jul 4, 2017): Hello, What OS are you running?
Author
Owner

@thangngoc89 commented on GitHub (Jul 4, 2017):

@fpd4444 Ubuntu 16.10

<!-- gh-comment-id:312806034 --> @thangngoc89 commented on GitHub (Jul 4, 2017): @fpd4444 Ubuntu 16.10
Author
Owner

@isido993 commented on GitHub (Jul 4, 2017):

@thangngoc89
We recommend using Ubuntu 16.04 LTS since it's much more stable.
In your case it looks like a networking issue with Docker or Ubuntu itself. Try running curl http://webapi:8080/api/ from inside ambar_proxy_1 container. Please post the result here.

<!-- gh-comment-id:312807718 --> @isido993 commented on GitHub (Jul 4, 2017): @thangngoc89 We recommend using Ubuntu 16.04 LTS since it's much more stable. In your case it looks like a networking issue with Docker or Ubuntu itself. Try running `curl http://webapi:8080/api/` from inside `ambar_proxy_1` container. Please post the result here.
Author
Owner

@thangngoc89 commented on GitHub (Jul 4, 2017):

same result like in the host machine. 504 time out

Inside ambar_proxy_1

$ curl http://frontend:80/ 

# html result from frontend

$ curl http://webapi:8080/api/
curl: (7) Failed to connect to webapi port 8080: Connection timed out

I just spined up a new Ubuntu 16.04 LTS machine, I get the same result.

<!-- gh-comment-id:312811939 --> @thangngoc89 commented on GitHub (Jul 4, 2017): same result like in the host machine. 504 time out Inside `ambar_proxy_1` ``` $ curl http://frontend:80/ # html result from frontend $ curl http://webapi:8080/api/ curl: (7) Failed to connect to webapi port 8080: Connection timed out ``` I just spined up a new Ubuntu 16.04 LTS machine, I get the same result.
Author
Owner

@greko6 commented on GitHub (Jul 9, 2017):

I'm on vanilla 16.04 VM and I had similar issue.

It's possibly es instance not starting up as expected through dockerize. In my case, I had my local domain redirected to one IP in my internal network (don't ask why, it's just making my life simpler with docker + nginx + rev proxy + letsencrypt etc combination). "es" was pointing to that (wrong) address by default. I've pointed it statically to VM IP and it started finally working. Also, another issue I've noticed was with nginx-proxy. I think it was related to nslookups as well, but instead of spending even more time investigating, I just went and created manual configuration in my already existing nginx reverse proxy. After all of that it finally started to work.

<!-- gh-comment-id:313902348 --> @greko6 commented on GitHub (Jul 9, 2017): I'm on vanilla 16.04 VM and I had similar issue. It's possibly es instance not starting up as expected through dockerize. In my case, I had my local domain redirected to one IP in my internal network (don't ask why, it's just making my life simpler with docker + nginx + rev proxy + letsencrypt etc combination). "es" was pointing to that (wrong) address by default. I've pointed it statically to VM IP and it started finally working. Also, another issue I've noticed was with nginx-proxy. I think it was related to nslookups as well, but instead of spending even more time investigating, I just went and created manual configuration in my already existing nginx reverse proxy. After all of that it finally started to work.
Author
Owner

@chrisl8 commented on GitHub (Jul 18, 2017):

I had this same issue. Sharing my experience, which may or may not be useful:

What I did to fix it was use the Google Public DNS servers.

My theory is that because my ISP's DNS servers were hijacking DNS look-ups for "frontend" and returning a host name instead of a "not found" result it was causing some issue where Ambar thought there was another 'frontend' on the network and tried to forward traffic to it.

<!-- gh-comment-id:316114217 --> @chrisl8 commented on GitHub (Jul 18, 2017): I had this same issue. Sharing my experience, which may or may not be useful: What I did to fix it was use the Google Public DNS servers. My theory is that because my ISP's DNS servers were hijacking DNS look-ups for "frontend" and returning a host name instead of a "not found" result it was causing some issue where Ambar thought there was another 'frontend' on the network and tried to forward traffic to it.
Author
Owner

@sochix commented on GitHub (Jul 24, 2017):

@chrisl8 good solution!

<!-- gh-comment-id:317362713 --> @sochix commented on GitHub (Jul 24, 2017): @chrisl8 good solution!
Author
Owner

@sochix commented on GitHub (Jul 24, 2017):

@thangngoc89 why did you reopen this issue?

<!-- gh-comment-id:317362822 --> @sochix commented on GitHub (Jul 24, 2017): @thangngoc89 why did you reopen this issue?
Author
Owner

@thangngoc89 commented on GitHub (Jul 24, 2017):

I closed it by accident. Anyway, writing my own nginx config fixed the issue

<!-- gh-comment-id:317363926 --> @thangngoc89 commented on GitHub (Jul 24, 2017): I closed it by accident. Anyway, writing my own nginx config fixed the issue
Author
Owner

@sochix commented on GitHub (Jul 24, 2017):

@thangngoc89 thanks for your feedback, will close the issue

<!-- gh-comment-id:317365348 --> @sochix commented on GitHub (Jul 24, 2017): @thangngoc89 thanks for your feedback, will close the issue
Author
Owner

@goldsz commented on GitHub (Aug 10, 2017):

@thangngoc89, what did you change in your nginx config? Is this something that ambar could fix in their distribution?

<!-- gh-comment-id:321427253 --> @goldsz commented on GitHub (Aug 10, 2017): @thangngoc89, what did you change in your nginx config? Is this something that ambar could fix in their distribution?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ambar#51
No description provided.