Git Product home page Git Product logo

Comments (14)

sochix avatar sochix commented on May 16, 2024

Hello! Please post you config.json file

from ambar.

kirichenko avatar kirichenko commented on May 16, 2024
[root@searchbox ambar]# cat config.json 
{
    "dockerComposeTemplate": "https://static.ambar.cloud/docker-compose.template.yml",
    "db": {
        "cacheSizeGb": 2
    },
    "api": {
        "pipelineCount": 1,
        "crawlerCount": 1,
        "cacheSize": "1g",
        "auth": "none",
        "defaultLangAnalyzer": "ambar_en",
        "analyticsToken": "cda4b0bb11a1f32aed7564b08c455992",
        "external": {
            "port": "8004",
            "host": "10.241.232.78",
            "protocol": "http"
        },
        "local": {
            "port": "8004",
            "host": "10.241.232.78",
            "protocol": "http"
        }
    },
    "es": {
        "containerSize": "2g",
        "heapSize": "1g"
    },
    "dataPath": "/opt/ambar",
    "dropbox": {
        "clientId": "",
        "redirectUri": ""
    },
    "fe": {
        "external": {
            "port": "80",
            "host": "10.241.232.78",
            "protocol": "http"
        },
        "local": {
            "port": "80",
            "host": "10.241.232.78",
            "protocol": "http"
        }
    },
    "dockerRepo": "ambar",
    "ocr": {
        "pdfSymbolsPerPageThreshold": 100,
        "pdfMaxPageCount": 5000
    }
}[root@searchbox ambar]#

from ambar.

isido993 avatar isido993 commented on May 16, 2024

Uh, that's quite strange... Please also post your generated docker-compose.yml file.
Thnx.

from ambar.

kirichenko avatar kirichenko commented on May 16, 2024
[root@searchbox ambar]# cat docker-compose.yml 
version: "2"
services:
  webapi:
    restart: always
    image: ambar/ambar-webapi:latest
    expose:
      - "8080"
    ports:
      - "8004:8080"
    environment:
      - db=mongodb://db:27017/ambar_data
      - fe=http://10.241.232.78:80
      - api=http://10.241.232.78:8004
      - es=http://es:9200
      - redis=webapi-cache
      - rabbit=amqp://10.241.232.78
      - mode=prod
      - pipelineCount=1
      - crawlerCount=1
      - dropboxClientId=
      - dropboxRedirectUri=
      - defaultLangAnalyzer=ambar_en
      - analyticsToken=cda4b0bb11a1f32aed7564b08c455992
      - auth=none
      - ocrPdfMaxPageCount=5000
      - ocrPdfSymbolsPerPageThreshold=100
    depends_on:
      - db
      - rabbit
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
  webapi-cache:
    restart: always
    image: redis:alpine       
    expose:
      - "6379"
    ports:
      - "6379:6379"
    depends_on:
      - webapi   
    mem_limit: 1g 
  frontend:
    image: ambar/ambar-frontend:latest
    ports:
      - "80:80"
    restart: always
    environment:
      - api=http://10.241.232.78:8004
  db:
    restart: always
    image: ambar/ambar-mongodb:latest
    environment:
      - cacheSizeGB=2
    volumes:
      - /opt/ambar/db:/data/db
    ports:
      - "27017:27017"
    expose:
      - "27017"
  es:
    image: ambar/ambar-es:latest
    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
    hostname: ambar-rabbit
    ports:
      - 15672:15672
      - 5672:5672
    volumes:
      - /opt/ambar/rabbit:/var/lib/rabbitmq

from ambar.

isido993 avatar isido993 commented on May 16, 2024

I've just checked everything. It seems like a bug in Docker or (maybe, I'm not sure yet) docker-compose. So, first, try updating Docker to version 1.12.5 and re-run the script.

from ambar.

kirichenko avatar kirichenko commented on May 16, 2024

There is no Docker version 1.12.5 in yum repo (Centos 6.5).

# ./ambar.py start
 

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


                                              
Docker version 1.12.6, build 78d1802
docker-compose version 1.12.0, build b31ff33
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_default" with the default driver
Creating ambar_rabbit_1
Creating ambar_es_1
Creating ambar_frontend_1
Creating ambar_db_1
Creating ambar_webapi_1
Creating ambar_webapi-cache_1
Waiting for Ambar to start...
Ambar is running on http://10.240.36.18:80

Ubuntu 16.10 - OK.

from ambar.

kirichenko avatar kirichenko commented on May 16, 2024

Not OK.
"Oops... Something went wrong. Please reload the page"
Reloading the page doesn't help.

from ambar.

isido993 avatar isido993 commented on May 16, 2024

Please open your browser console and post all the messages from there.
Btw, what browser are you using?

from ambar.

kirichenko avatar kirichenko commented on May 16, 2024
  1. Failed to start. Error: TypeError: NetworkError when attempting to fetch resource.
  2. TypeError: NetworkError when attempting to fetch resource.
  3. Failed to auth. Error: TypeError: NetworkError when attempting to fetch resource.

Firefox 52.0.2

from ambar.

sochix avatar sochix commented on May 16, 2024

@kirichenko seems like frontend can't connec to to backend.
Try to open http://10.240.36.18:80:8004/api in your browser, and submit the response here.
Also check if your proxy did not block ports other than 80

from ambar.

kirichenko avatar kirichenko commented on May 16, 2024

"Unable to connect"

from ambar.

sochix avatar sochix commented on May 16, 2024

@kirichenko what the IP address of machine that you can reach? Does it equals 10.240.36.18? Or machine has several network interfaces?

from ambar.

kirichenko avatar kirichenko commented on May 16, 2024

Yes.
Fixed. Started firefox from root.

from ambar.

sochix avatar sochix commented on May 16, 2024

Nice!

from ambar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.