[GH-ISSUE #57] Bug: Fresh install, going to server IP redirects me to "https://frontend" #57

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

Originally created by @hbh7 on GitHub (Aug 5, 2017).
Original GitHub issue: https://github.com/RD17/ambar/issues/57

Hey all. I tried to freshly install this using the directions and the ambar.py script. Running Ubuntu Server 17.04. Initially it said ambar running on http://:80 but putting in the IP into the config under fe and host gets it to say http://i.p.i.p:80 but still no change.

Anyone have any ideas what I might be doing wrong? I can provide any more info needed.

Thanks,
hbh7

Originally created by @hbh7 on GitHub (Aug 5, 2017). Original GitHub issue: https://github.com/RD17/ambar/issues/57 Hey all. I tried to freshly install this using the directions and the ambar.py script. Running Ubuntu Server 17.04. Initially it said ambar running on http://:80 but putting in the IP into the config under fe and host gets it to say http://i.p.i.p:80 but still no change. Anyone have any ideas what I might be doing wrong? I can provide any more info needed. Thanks, hbh7
kerem 2026-02-27 15:54:44 +03:00
Author
Owner

@hbh7 commented on GitHub (Aug 6, 2017):

Just set up a brand new Ubuntu 16.04 VM, and it did the exact same thing. "Ambar is running on http://10.20.31.108:80" but if i go to that IP, it brings me right to "https://frontend"

https://blog.ambar.cloud/ambar-installation-step-by-step-guide-2/ These are the directions I followed btw

<!-- gh-comment-id:320540532 --> @hbh7 commented on GitHub (Aug 6, 2017): Just set up a brand new Ubuntu 16.04 VM, and it did the exact same thing. "Ambar is running on http://10.20.31.108:80" but if i go to that IP, it brings me right to "https://frontend" https://blog.ambar.cloud/ambar-installation-step-by-step-guide-2/ These are the directions I followed btw
Author
Owner

@sochix commented on GitHub (Aug 7, 2017):

@hbh7 can you post your config.json here?

<!-- gh-comment-id:320593435 --> @sochix commented on GitHub (Aug 7, 2017): @hbh7 can you post your `config.json` here?
Author
Owner

@hbh7 commented on GitHub (Aug 7, 2017):

{
    "db": {
        "cacheSizeGb": 2
    },
    "dockerComposeTemplate": "https://static.ambar.cloud/docker-compose.template.yml",
    "dockerRepo": "ambar",
    "dataPath": "/opt/ambar",
    "ocr": {
        "pdfMaxPageCount": 5000,
        "pdfSymbolsPerPageThreshold": 100
    },
    "fe": {
        "external": {
            "protocol": "http",
            "host": "10.20.31.108",
            "port": "80"
        }
    },
    "dropbox": {
        "redirectUri": "",
        "clientId": ""
    },
    "es": {
        "heapSize": "1g",
        "containerSize": "2g"
    },
    "api": {
        "auth": "basic",
        "pipelineCount": 1,
        "showFilePreview": "false",
        "external": {
            "protocol": "http",
            "host": "10.20.31.108",
            "port": "80"
        },
        "analyticsToken": "cda4b0bb11a1f32aed7564b08c455992",
        "crawlerCount": 1,
        "cacheSize": "1g",
        "defaultLangAnalyzer": "ambar_en",
        "mode": "ce"
    }
<!-- gh-comment-id:320631729 --> @hbh7 commented on GitHub (Aug 7, 2017): ``` { "db": { "cacheSizeGb": 2 }, "dockerComposeTemplate": "https://static.ambar.cloud/docker-compose.template.yml", "dockerRepo": "ambar", "dataPath": "/opt/ambar", "ocr": { "pdfMaxPageCount": 5000, "pdfSymbolsPerPageThreshold": 100 }, "fe": { "external": { "protocol": "http", "host": "10.20.31.108", "port": "80" } }, "dropbox": { "redirectUri": "", "clientId": "" }, "es": { "heapSize": "1g", "containerSize": "2g" }, "api": { "auth": "basic", "pipelineCount": 1, "showFilePreview": "false", "external": { "protocol": "http", "host": "10.20.31.108", "port": "80" }, "analyticsToken": "cda4b0bb11a1f32aed7564b08c455992", "crawlerCount": 1, "cacheSize": "1g", "defaultLangAnalyzer": "ambar_en", "mode": "ce" } ```
Author
Owner

@hbh7 commented on GitHub (Aug 14, 2017):

Anyone have any ideas? Would really love to get this working. Thanks

<!-- gh-comment-id:322268591 --> @hbh7 commented on GitHub (Aug 14, 2017): Anyone have any ideas? Would really love to get this working. Thanks
Author
Owner

@isido993 commented on GitHub (Aug 15, 2017):

Hi @hbh7

Please run:
sudo docker exec -i -t ambar_proxy_1 /bin/bash
cat /etc/nginx/conf.d/default.conf
and post the result here.

Thanks.

<!-- gh-comment-id:322395950 --> @isido993 commented on GitHub (Aug 15, 2017): Hi @hbh7 Please run: `sudo docker exec -i -t ambar_proxy_1 /bin/bash` `cat /etc/nginx/conf.d/default.conf` and post the result here. Thanks.
Author
Owner

@hbh7 commented on GitHub (Aug 15, 2017):

root@4c444dbbbbeb:/# cat /etc/nginx/conf.d/default.conf
server {
  listen 80;
  server_name ambar-fe;
  client_max_body_size 1024m;
  location /api/ {
    proxy_pass http://webapi:8080/api/;
  }
  location / {
    proxy_pass http://frontend:80/;
  }
}
<!-- gh-comment-id:322434347 --> @hbh7 commented on GitHub (Aug 15, 2017): ``` root@4c444dbbbbeb:/# cat /etc/nginx/conf.d/default.conf server { listen 80; server_name ambar-fe; client_max_body_size 1024m; location /api/ { proxy_pass http://webapi:8080/api/; } location / { proxy_pass http://frontend:80/; } } ```
Author
Owner

@isido993 commented on GitHub (Aug 15, 2017):

@hbh7 this seems ok. Let's go further, please also post your docker-compose.yml file.

<!-- gh-comment-id:322435924 --> @isido993 commented on GitHub (Aug 15, 2017): @hbh7 this seems ok. Let's go further, please also post your docker-compose.yml file.
Author
Owner

@hbh7 commented on GitHub (Aug 15, 2017):

Sure

hbh7@VM-Ambar:~$ cat docker-compose.yml
version: "2"
networks:
  internal_network:
services:
  webapi:
    restart: always
    networks:
      - internal_network
    image: ambar/ambar-webapi:latest
    expose:
      - "8080"
    environment:
      - dockerRepo=ambar
      - db=mongodb://db:27017/ambar_data
      - fe=http://10.20.31.103:80
      - api=http://webapi:8080
      - es=http://es:9200
      - redis=webapi-cache
      - rabbit=amqp://rabbit
      - mode=ce
      - pipelineCount=1
      - crawlerCount=1
      - dropboxClientId=
      - dropboxRedirectUri=
      - defaultLangAnalyzer=ambar_en
      - analyticsToken=cda4b0bb11a1f32aed7564b08c455992
      - auth=basic
      - ocrPdfMaxPageCount=5000
      - ocrPdfSymbolsPerPageThreshold=100
      - showFilePreview=false
    depends_on:
      - db
      - es
      - webapi-cache
      - proxy
      - rabbit
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
  webapi-cache:
    restart: always
    image: redis:alpine
    networks:
      - internal_network
    expose:
      - "6379"
    ports:
      - "6379:6379"
    mem_limit: 1g
  proxy:
    image: ambar/ambar-proxy:latest
    networks:
      - internal_network
    restart: always
    environment:
      - API_EXT_PORT=80
      - FE_EXT_PORT=80
    expose:
      - 80

    ports:
      - "80:80"

  frontend:
    image: ambar/ambar-frontend:latest
    networks:
      - internal_network
    depends_on:
      - webapi
    expose:
      - "80"
    restart: always
    environment:
      - api=http://:80
  db:
    restart: always
    image: ambar/ambar-mongodb:latest
    networks:
      - internal_network
    environment:
      - cacheSizeGB=2
    volumes:
      - /opt/ambar/db:/data/db
    expose:
      - "27017"
    ports:
      - "27017:27017"
  es:
    image: ambar/ambar-es:latest
    networks:
      - internal_network
    restart: always
    expose:
      - "9200"
    ports:
      - "9200:9200"
    environment:
      - cluster.name=ambar-es
      - bootstrap.memory_lock=true
      - xpack.security.enabled=false
      - security.manager.enabled=false
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    mem_limit: 2g
    cap_add:
      - IPC_LOCK
    volumes:
      - /opt/ambar/es:/usr/share/elasticsearch/data
  rabbit:
    image: ambar/ambar-rabbit:latest
    networks:
      - internal_network
    hostname: rabbit
    expose:
      - "15672"
      - "5672"
    ports:
      - "15672:15672"
      - "5672:5672"
    volumes:
      - /opt/ambar/rabbit:/var/lib/rabbitmq
<!-- gh-comment-id:322437760 --> @hbh7 commented on GitHub (Aug 15, 2017): Sure ``` hbh7@VM-Ambar:~$ cat docker-compose.yml version: "2" networks: internal_network: services: webapi: restart: always networks: - internal_network image: ambar/ambar-webapi:latest expose: - "8080" environment: - dockerRepo=ambar - db=mongodb://db:27017/ambar_data - fe=http://10.20.31.103:80 - api=http://webapi:8080 - es=http://es:9200 - redis=webapi-cache - rabbit=amqp://rabbit - mode=ce - pipelineCount=1 - crawlerCount=1 - dropboxClientId= - dropboxRedirectUri= - defaultLangAnalyzer=ambar_en - analyticsToken=cda4b0bb11a1f32aed7564b08c455992 - auth=basic - ocrPdfMaxPageCount=5000 - ocrPdfSymbolsPerPageThreshold=100 - showFilePreview=false depends_on: - db - es - webapi-cache - proxy - rabbit volumes: - /var/run/docker.sock:/var/run/docker.sock webapi-cache: restart: always image: redis:alpine networks: - internal_network expose: - "6379" ports: - "6379:6379" mem_limit: 1g proxy: image: ambar/ambar-proxy:latest networks: - internal_network restart: always environment: - API_EXT_PORT=80 - FE_EXT_PORT=80 expose: - 80 ports: - "80:80" frontend: image: ambar/ambar-frontend:latest networks: - internal_network depends_on: - webapi expose: - "80" restart: always environment: - api=http://:80 db: restart: always image: ambar/ambar-mongodb:latest networks: - internal_network environment: - cacheSizeGB=2 volumes: - /opt/ambar/db:/data/db expose: - "27017" ports: - "27017:27017" es: image: ambar/ambar-es:latest networks: - internal_network restart: always expose: - "9200" ports: - "9200:9200" environment: - cluster.name=ambar-es - bootstrap.memory_lock=true - xpack.security.enabled=false - security.manager.enabled=false - "ES_JAVA_OPTS=-Xms1g -Xmx1g" ulimits: memlock: soft: -1 hard: -1 nofile: soft: 65536 hard: 65536 mem_limit: 2g cap_add: - IPC_LOCK volumes: - /opt/ambar/es:/usr/share/elasticsearch/data rabbit: image: ambar/ambar-rabbit:latest networks: - internal_network hostname: rabbit expose: - "15672" - "5672" ports: - "15672:15672" - "5672:5672" volumes: - /opt/ambar/rabbit:/var/lib/rabbitmq ```
Author
Owner

@isido993 commented on GitHub (Aug 15, 2017):

Ok, now:
wget -O ambar.py https://static.ambar.cloud/ambar.py && chmod +x ./ambar.py
sudo ./ambar.py update
And cat docker-compose.yml again
Thnx

<!-- gh-comment-id:322440852 --> @isido993 commented on GitHub (Aug 15, 2017): Ok, now: `wget -O ambar.py https://static.ambar.cloud/ambar.py && chmod +x ./ambar.py` `sudo ./ambar.py update` And `cat docker-compose.yml` again Thnx
Author
Owner

@hbh7 commented on GitHub (Aug 15, 2017):

Sure.

Not sure if this is relevant or not, but saw this and thought it odd. This is an excerpt from the script running the update.

...
Stopping Ambar...
"docker rm" requires at least 1 argument(s).
See 'docker rm --help'.

Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers
Crawlers containers removed
"docker rm" requires at least 1 argument(s).
See 'docker rm --help'.

Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers
Pipeline containers removed
Stopping ambar_frontend_1     ... done
...

And here's the docker compose file after startup finished.

hbh7@VM-Ambar:~$ cat docker-compose.yml  
version: "2"
networks:
  internal_network:
services:
  webapi:
    restart: always
    networks:
      - internal_network
    image: ambar/ambar-webapi:latest
    expose:
      - "8080"
    environment:
      - dockerRepo=ambar
      - db=mongodb://db:27017/ambar_data
      - fe=http://10.20.31.103:80
      - api=http://webapi:8080
      - es=http://es:9200
      - redis=webapi-cache
      - rabbit=amqp://rabbit
      - mode=ce
      - pipelineCount=1
      - crawlerCount=1
      - dropboxClientId=
      - dropboxRedirectUri=
      - defaultLangAnalyzer=ambar_en
      - analyticsToken=cda4b0bb11a1f32aed7564b08c455992
    networks:
      - internal_network
    environment:
      - cacheSizeGB=2
    volumes:
      - /opt/ambar/db:/data/db
    expose:
      - "27017"
    ports:
      - "27017:27017"
  es:
    image: ambar/ambar-es:latest
    networks:
      - internal_network
    restart: always
    expose:
      - "9200"
    ports:
      - "9200:9200"
    environment:
      - cluster.name=ambar-es
      - bootstrap.memory_lock=true
      - xpack.security.enabled=false
      - security.manager.enabled=false
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    mem_limit: 2g
    cap_add:
      - IPC_LOCK
    volumes:
      - /opt/ambar/es:/usr/share/elasticsearch/data
  rabbit:
    image: ambar/ambar-rabbit:latest
    networks:
      - internal_network
    hostname: rabbit
    expose:
      - "15672"
      - "5672"
    ports:
      - "15672:15672"
      - "5672:5672"
    volumes:
      - /opt/ambar/rabbit:/var/lib/rabbitmq
<!-- gh-comment-id:322442300 --> @hbh7 commented on GitHub (Aug 15, 2017): Sure. Not sure if this is relevant or not, but saw this and thought it odd. This is an excerpt from the script running the update. ``` ... Stopping Ambar... "docker rm" requires at least 1 argument(s). See 'docker rm --help'. Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...] Remove one or more containers Crawlers containers removed "docker rm" requires at least 1 argument(s). See 'docker rm --help'. Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...] Remove one or more containers Pipeline containers removed Stopping ambar_frontend_1 ... done ... ``` And here's the docker compose file after startup finished. ``` hbh7@VM-Ambar:~$ cat docker-compose.yml version: "2" networks: internal_network: services: webapi: restart: always networks: - internal_network image: ambar/ambar-webapi:latest expose: - "8080" environment: - dockerRepo=ambar - db=mongodb://db:27017/ambar_data - fe=http://10.20.31.103:80 - api=http://webapi:8080 - es=http://es:9200 - redis=webapi-cache - rabbit=amqp://rabbit - mode=ce - pipelineCount=1 - crawlerCount=1 - dropboxClientId= - dropboxRedirectUri= - defaultLangAnalyzer=ambar_en - analyticsToken=cda4b0bb11a1f32aed7564b08c455992 networks: - internal_network environment: - cacheSizeGB=2 volumes: - /opt/ambar/db:/data/db expose: - "27017" ports: - "27017:27017" es: image: ambar/ambar-es:latest networks: - internal_network restart: always expose: - "9200" ports: - "9200:9200" environment: - cluster.name=ambar-es - bootstrap.memory_lock=true - xpack.security.enabled=false - security.manager.enabled=false - "ES_JAVA_OPTS=-Xms1g -Xmx1g" ulimits: memlock: soft: -1 hard: -1 nofile: soft: 65536 hard: 65536 mem_limit: 2g cap_add: - IPC_LOCK volumes: - /opt/ambar/es:/usr/share/elasticsearch/data rabbit: image: ambar/ambar-rabbit:latest networks: - internal_network hostname: rabbit expose: - "15672" - "5672" ports: - "15672:15672" - "5672:5672" volumes: - /opt/ambar/rabbit:/var/lib/rabbitmq ```
Author
Owner

@isido993 commented on GitHub (Aug 15, 2017):

@hbh7 thnaks, but you posted not the entire docker-compose.yml, please repost the missing part.
Also please sudo docker ps -a and post the result.

<!-- gh-comment-id:322443042 --> @isido993 commented on GitHub (Aug 15, 2017): @hbh7 thnaks, but you posted not the entire `docker-compose.yml`, please repost the missing part. Also please `sudo docker ps -a` and post the result.
Author
Owner

@hbh7 commented on GitHub (Aug 15, 2017):

My apologies, I'm on a phone on my way to work so it's a bit difficult lol

version: "2"
networks:
  internal_network:
services:
  webapi:
    restart: always
    networks:
      - internal_network
    image: ambar/ambar-webapi:latest
    expose:
      - "8080"
    environment:
      - dockerRepo=ambar
      - db=mongodb://db:27017/ambar_data
      - fe=http://10.20.31.103:80
      - api=http://webapi:8080
      - es=http://es:9200
      - redis=webapi-cache
      - rabbit=amqp://rabbit
      - mode=ce
      - pipelineCount=1
      - crawlerCount=1
      - dropboxClientId=
      - dropboxRedirectUri=
      - defaultLangAnalyzer=ambar_en
      - analyticsToken=cda4b0bb11a1f32aed7564b08c455992
      - auth=basic
      - ocrPdfMaxPageCount=5000
      - ocrPdfSymbolsPerPageThreshold=100
      - showFilePreview=false
    depends_on:
      - db
      - es
      - webapi-cache
      - proxy
      - rabbit
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
  webapi-cache:
    restart: always
    image: redis:alpine   
    networks:
      - internal_network    
    expose:
      - "6379"
    ports:
      - "6379:6379" 
    mem_limit: 1g 
  proxy:
    image: ambar/ambar-proxy:latest
    networks:
      - internal_network
    restart: always
    environment:
      - API_EXT_PORT=80
      - FE_EXT_PORT=80
    expose:
      - 80
      
    ports:
      - "80:80"
      
  frontend:
    image: ambar/ambar-frontend:latest
    networks:
      - internal_network
    depends_on:
      - webapi
    expose:
      - "80"
    restart: always
    environment:
      - api=http://:80
  db:
    restart: always
    image: ambar/ambar-mongodb:latest
    networks:
      - internal_network
    environment:
      - cacheSizeGB=2
    volumes:
      - /opt/ambar/db:/data/db
    expose:
      - "27017"
    ports:
      - "27017:27017"
  es:
    image: ambar/ambar-es:latest
    networks:
      - internal_network
    restart: always
    expose:
      - "9200"
    ports:
      - "9200:9200"
    environment:
      - cluster.name=ambar-es
      - bootstrap.memory_lock=true
      - xpack.security.enabled=false
      - security.manager.enabled=false
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    ulimits:
      memlock:
        soft: -1
        hard: -1  
      nofile:
        soft: 65536
        hard: 65536
    mem_limit: 2g
    cap_add:
      - IPC_LOCK
    volumes:
      - /opt/ambar/es:/usr/share/elasticsearch/data
  rabbit:
    image: ambar/ambar-rabbit:latest
    networks:
      - internal_network
    hostname: rabbit
    expose:
      - "15672"
      - "5672"
    ports:
      - "15672:15672"
      - "5672:5672"
    volumes:
      - /opt/ambar/rabbit:/var/lib/rabbitmq

Here's the docker command

:
docker-compose.yml                         100% 2611     2.7MB/s   00:00
hbh7@VM-Ambar:~$ sudo docker ps -a
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS                   PORTS                                                                                        NAMES
4a38a83bbbfc        ambar/ambar-frontend:latest   "/bin/sh -c 'echo ..."   11 minutes ago      Up 11 minutes            80/tcp                                                                                       ambar_frontend_1
7f7caad4e8b3        ambar/ambar-webapi:latest     "/bin/sh -c 'docke..."   12 minutes ago      Up About a minute        8080/tcp                                                                                     ambar_webapi_1
35fedce49484        redis:alpine                  "docker-entrypoint..."   12 minutes ago      Up 12 minutes            0.0.0.0:6379->6379/tcp                                                                       ambar_webapi-cache_1
d46dce8ed110        ambar/ambar-rabbit:latest     "docker-entrypoint..."   12 minutes ago      Up 12 minutes            4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp, 15671/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp   ambar_rabbit_1
718e233e3523        ambar/ambar-proxy:latest      "/entrypoint.sh"         12 minutes ago      Up 12 minutes            0.0.0.0:80->80/tcp                                                                           ambar_proxy_1
f2a9cf8a6506        ambar/ambar-mongodb:latest    "/entrypoint.sh"         12 minutes ago      Up 12 minutes            0.0.0.0:27017->27017/tcp                                                                     ambar_db_1
e675b409a34d        ambar/ambar-es:latest         "/docker-entrypoin..."   12 minutes ago      Up 12 minutes            0.0.0.0:9200->9200/tcp, 9300/tcp                                                             ambar_es_1
e828ddb0b736        hello-world                   "/hello"                 12 days ago         Exited (0) 12 days ago                                                                                                brave_kalam
e1186524def2        hello-world                   "/hello"                 12 days ago         Exited (0) 12 days ago                                                                                                vigilant_roentgen
<!-- gh-comment-id:322444207 --> @hbh7 commented on GitHub (Aug 15, 2017): My apologies, I'm on a phone on my way to work so it's a bit difficult lol ``` version: "2" networks: internal_network: services: webapi: restart: always networks: - internal_network image: ambar/ambar-webapi:latest expose: - "8080" environment: - dockerRepo=ambar - db=mongodb://db:27017/ambar_data - fe=http://10.20.31.103:80 - api=http://webapi:8080 - es=http://es:9200 - redis=webapi-cache - rabbit=amqp://rabbit - mode=ce - pipelineCount=1 - crawlerCount=1 - dropboxClientId= - dropboxRedirectUri= - defaultLangAnalyzer=ambar_en - analyticsToken=cda4b0bb11a1f32aed7564b08c455992 - auth=basic - ocrPdfMaxPageCount=5000 - ocrPdfSymbolsPerPageThreshold=100 - showFilePreview=false depends_on: - db - es - webapi-cache - proxy - rabbit volumes: - /var/run/docker.sock:/var/run/docker.sock webapi-cache: restart: always image: redis:alpine networks: - internal_network expose: - "6379" ports: - "6379:6379" mem_limit: 1g proxy: image: ambar/ambar-proxy:latest networks: - internal_network restart: always environment: - API_EXT_PORT=80 - FE_EXT_PORT=80 expose: - 80 ports: - "80:80" frontend: image: ambar/ambar-frontend:latest networks: - internal_network depends_on: - webapi expose: - "80" restart: always environment: - api=http://:80 db: restart: always image: ambar/ambar-mongodb:latest networks: - internal_network environment: - cacheSizeGB=2 volumes: - /opt/ambar/db:/data/db expose: - "27017" ports: - "27017:27017" es: image: ambar/ambar-es:latest networks: - internal_network restart: always expose: - "9200" ports: - "9200:9200" environment: - cluster.name=ambar-es - bootstrap.memory_lock=true - xpack.security.enabled=false - security.manager.enabled=false - "ES_JAVA_OPTS=-Xms1g -Xmx1g" ulimits: memlock: soft: -1 hard: -1 nofile: soft: 65536 hard: 65536 mem_limit: 2g cap_add: - IPC_LOCK volumes: - /opt/ambar/es:/usr/share/elasticsearch/data rabbit: image: ambar/ambar-rabbit:latest networks: - internal_network hostname: rabbit expose: - "15672" - "5672" ports: - "15672:15672" - "5672:5672" volumes: - /opt/ambar/rabbit:/var/lib/rabbitmq ``` Here's the docker command ``` : docker-compose.yml 100% 2611 2.7MB/s 00:00 hbh7@VM-Ambar:~$ sudo docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4a38a83bbbfc ambar/ambar-frontend:latest "/bin/sh -c 'echo ..." 11 minutes ago Up 11 minutes 80/tcp ambar_frontend_1 7f7caad4e8b3 ambar/ambar-webapi:latest "/bin/sh -c 'docke..." 12 minutes ago Up About a minute 8080/tcp ambar_webapi_1 35fedce49484 redis:alpine "docker-entrypoint..." 12 minutes ago Up 12 minutes 0.0.0.0:6379->6379/tcp ambar_webapi-cache_1 d46dce8ed110 ambar/ambar-rabbit:latest "docker-entrypoint..." 12 minutes ago Up 12 minutes 4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp, 15671/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp ambar_rabbit_1 718e233e3523 ambar/ambar-proxy:latest "/entrypoint.sh" 12 minutes ago Up 12 minutes 0.0.0.0:80->80/tcp ambar_proxy_1 f2a9cf8a6506 ambar/ambar-mongodb:latest "/entrypoint.sh" 12 minutes ago Up 12 minutes 0.0.0.0:27017->27017/tcp ambar_db_1 e675b409a34d ambar/ambar-es:latest "/docker-entrypoin..." 12 minutes ago Up 12 minutes 0.0.0.0:9200->9200/tcp, 9300/tcp ambar_es_1 e828ddb0b736 hello-world "/hello" 12 days ago Exited (0) 12 days ago brave_kalam e1186524def2 hello-world "/hello" 12 days ago Exited (0) 12 days ago vigilant_roentgen ```
Author
Owner

@isido993 commented on GitHub (Aug 15, 2017):

@hbh7
Looks like your management script isn't working properly.
Try sudo pyton3 ./ambar.py update

<!-- gh-comment-id:322445715 --> @isido993 commented on GitHub (Aug 15, 2017): @hbh7 Looks like your management script isn't working properly. Try `sudo pyton3 ./ambar.py update`
Author
Owner

@hbh7 commented on GitHub (Aug 15, 2017):

Good catch, I think Ubuntu defaults their python command to python2. Sadly, no change. Should I spin up a fresh VM to test?

<!-- gh-comment-id:322446773 --> @hbh7 commented on GitHub (Aug 15, 2017): Good catch, I think Ubuntu defaults their python command to python2. Sadly, no change. Should I spin up a fresh VM to test?
Author
Owner

@isido993 commented on GitHub (Aug 15, 2017):

The thing is that your docker-compose.yml is malformed, see - api=http://:80 line in frontend block.
It's formed by ambar.py script, by this line:
composeTemplate = composeTemplate.replace('${API_EXT_HOST}', configuration['api']['external']['host'])
So, ${API_EXT_HOST} was replaced by an empty string, instead of 10.20.31.103.
I'm running out of ideas now.. To me it looks like python is interpreting the script with some strange errors.
Maybe spinning up a fresh VM is an option.

<!-- gh-comment-id:322448034 --> @isido993 commented on GitHub (Aug 15, 2017): The thing is that your `docker-compose.yml` is malformed, see `- api=http://:80` line in `frontend` block. It's formed by `ambar.py` script, by this line: `composeTemplate = composeTemplate.replace('${API_EXT_HOST}', configuration['api']['external']['host'])` So, `${API_EXT_HOST}` was replaced by an empty string, instead of `10.20.31.103`. I'm running out of ideas now.. To me it looks like python is interpreting the script with some strange errors. Maybe spinning up a fresh VM is an option.
Author
Owner

@hbh7 commented on GitHub (Aug 15, 2017):

Makes sense to me.

I'll fire up a new VM now, and set up an alias for python to python3. I'll let you know how it goes in maybe a half hour. Thanks!

<!-- gh-comment-id:322449343 --> @hbh7 commented on GitHub (Aug 15, 2017): Makes sense to me. I'll fire up a new VM now, and set up an alias for python to python3. I'll let you know how it goes in maybe a half hour. Thanks!
Author
Owner

@hbh7 commented on GitHub (Aug 15, 2017):

No change, but I did some digging. config.json has a host option under "fe" that was unset, so I added the IP in. Sadly that didn't help. (new VM IP is 10.20.31.119 btw)

I changed the line
composeTemplate = composeTemplate.replace('${API_EXT_HOST}', configuration['fe']['external']['host'])
in the config to say
composeTemplate = composeTemplate.replace('${API_EXT_HOST}', "10.20.31.119")
instead.

This fixes the - api=http://:80 to - api=http://10.20.31.119:80 bit in the frontend block. However, no change in the issue. I think this could also be solved by setting that in the config.json file, because it's also unset. Is there a time when this config.json file is populated with values such as this?

Edit: I just wiped the python file and redownloaded it and set the config, and this does populate that value correctly now in the docker-compose.yml file.

In Chome, I can see the server is responding with a 301 Moved Permanently... Maybe this is an nginx config issue?

Are there any programs I need that I might not have? The install guide doesn't list any special requirements.

<!-- gh-comment-id:322489568 --> @hbh7 commented on GitHub (Aug 15, 2017): No change, but I did some digging. config.json has a host option under "fe" that was unset, so I added the IP in. Sadly that didn't help. (new VM IP is 10.20.31.119 btw) I changed the line ` composeTemplate = composeTemplate.replace('${API_EXT_HOST}', configuration['fe']['external']['host']) ` in the config to say ` composeTemplate = composeTemplate.replace('${API_EXT_HOST}', "10.20.31.119") ` instead. This fixes the ` - api=http://:80 ` to `- api=http://10.20.31.119:80` bit in the frontend block. However, no change in the issue. I think this could also be solved by setting that in the config.json file, because it's also unset. Is there a time when this config.json file is populated with values such as this? Edit: I just wiped the python file and redownloaded it and set the config, and this does populate that value correctly now in the docker-compose.yml file. In Chome, I can see the server is responding with a 301 Moved Permanently... Maybe this is an nginx config issue? Are there any programs I need that I might not have? The install guide doesn't list any special requirements.
Author
Owner

@hbh7 commented on GitHub (Aug 17, 2017):

If I enter the frontend docker container, and install wget and wget localhost, i get a HTML file for the loading page. This makes me think it's definitely a proxy issue. Thoughts?

<!-- gh-comment-id:323111408 --> @hbh7 commented on GitHub (Aug 17, 2017): If I enter the frontend docker container, and install wget and `wget localhost`, i get a HTML file for the loading page. This makes me think it's definitely a proxy issue. Thoughts?
Author
Owner

@isido993 commented on GitHub (Aug 18, 2017):

@hbh7
Now it should work properly. Maybe it's just your browser caching previous 301 response. Try clearing your browser's cache.

<!-- gh-comment-id:323284497 --> @isido993 commented on GitHub (Aug 18, 2017): @hbh7 Now it should work properly. Maybe it's just your browser caching previous 301 response. Try clearing your browser's cache.
Author
Owner

@hbh7 commented on GitHub (Aug 18, 2017):

I thought the same thing. That's why I've tested with multiple browsers... I'll double check again in a bit.

<!-- gh-comment-id:323318967 --> @hbh7 commented on GitHub (Aug 18, 2017): I thought the same thing. That's why I've tested with multiple browsers... I'll double check again in a bit.
Author
Owner

@hbh7 commented on GitHub (Aug 22, 2017):

Actually we made some progress. I'll be honest, I don't know what I did at this point lol, but now we're here.
http://i.imgur.com/eD4gJ32.png

Here's the config.json: https://pastebin.com/ypHeezeq
and the docker-compose.yml: https://pastebin.com/TXDxbxDB

Funny story though... This is after a fresh reboot of the VM. Once I did a sudo ./ambar.py restart, we're back to being redirected to https://frontend ... how bizarre

This is repeatable btw, just rebooted again and we're back to first screenshot.

<!-- gh-comment-id:324154040 --> @hbh7 commented on GitHub (Aug 22, 2017): Actually we made some progress. I'll be honest, I don't know what I did at this point lol, but now we're here. http://i.imgur.com/eD4gJ32.png Here's the config.json: https://pastebin.com/ypHeezeq and the docker-compose.yml: https://pastebin.com/TXDxbxDB Funny story though... This is after a fresh reboot of the VM. Once I did a `sudo ./ambar.py restart`, we're back to being redirected to `https://frontend` ... how bizarre This is repeatable btw, just rebooted again and we're back to first screenshot.
Author
Owner

@hbh7 commented on GitHub (Aug 31, 2017):

Just tried on physical hardware, freshly downloaded Ubuntu Server 17.04 on a laptop and tried the ambar installer. Sadly I've got the same issue still.... So not a VM issue.

Any thoughts? Thanks

<!-- gh-comment-id:326376515 --> @hbh7 commented on GitHub (Aug 31, 2017): Just tried on physical hardware, freshly downloaded Ubuntu Server 17.04 on a laptop and tried the ambar installer. Sadly I've got the same issue still.... So not a VM issue. Any thoughts? Thanks
Author
Owner

@sochix commented on GitHub (Sep 5, 2017):

@hbh7 We're out of ideas. Let's schedule a skype call to dig in. You're need a working screen sharing connection to your virtual server to start.

<!-- gh-comment-id:327146411 --> @sochix commented on GitHub (Sep 5, 2017): @hbh7 We're out of ideas. Let's schedule a skype call to dig in. You're need a working screen sharing connection to your virtual server to start.
Author
Owner

@hbh7 commented on GitHub (Sep 5, 2017):

Sure. When do you have time? I should be free tomorrow from about 1-4 EST, or some time this Sunday.

<!-- gh-comment-id:327208382 --> @hbh7 commented on GitHub (Sep 5, 2017): Sure. When do you have time? I should be free tomorrow from about 1-4 EST, or some time this Sunday.
Author
Owner

@sochix commented on GitHub (Sep 6, 2017):

let's discuss it by email. Write to us at hello@ambar.cloud

<!-- gh-comment-id:327400020 --> @sochix commented on GitHub (Sep 6, 2017): let's discuss it by email. Write to us at hello@ambar.cloud
Author
Owner

@imperian commented on GitHub (Oct 1, 2017):

I had this problem as well, but managed to resolve it by removing the "proxy" from the "depends_on" section of "webapi" and adding "frontend" to the "depends_on" section of "proxy" in the docker-compose.yml.

The problem was that proxy was being created before frontend so proxy's hosts file didn't have a "frontend" entry. This shouldn't matter for newer versions of docker with docker's network, but I don't think they have the bugs worked out because it doesn't always work right.

<!-- gh-comment-id:333409447 --> @imperian commented on GitHub (Oct 1, 2017): I had this problem as well, but managed to resolve it by removing the "proxy" from the "depends_on" section of "webapi" and adding "frontend" to the "depends_on" section of "proxy" in the docker-compose.yml. The problem was that proxy was being created before frontend so proxy's hosts file didn't have a "frontend" entry. This shouldn't matter for newer versions of docker with docker's network, but I don't think they have the bugs worked out because it doesn't always work right.
Author
Owner

@sochix commented on GitHub (Oct 30, 2017):

Thanks @imperian !

<!-- gh-comment-id:340371614 --> @sochix commented on GitHub (Oct 30, 2017): Thanks @imperian !
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#57
No description provided.