Getting a Blank white page after doing the docker setup in centos 7

Hi Team,

I tried setting up the metasfresh application in our environment on Centos 7 VM. The docker configuration and setup went without any errors. But when I am trying to access through Web it is giving me blank white page. Below is the docker-compose file I used.

docker-compose.yml

docker-compose.yml

db:
  build: db
  restart: always
  volumes:
    - ./volumes/db/data:/var/lib/postgresql/data
    - ./volumes/db/log:/var/log/postgresql
  environment:
    - METASFRESH_USERNAME=metasfresh
    - METASFRESH_PASSWORD=metasfresh
    - METASFRESH_DBNAME=metasfresh
    - DB_SYSPASS=System
    - POSTGRES_PASSWORD=ip2LmNzXX8p8iXg9lZTWEJ9524kQDbXFudB7LR03T-xK9fLweX3TLMkA2AYcEiaS
app:
  build: app
  hostname: app
  links:
    - db:db
    - rabbitmq:rabbitmq
    - search:search
  expose:
    - “8282”
    - “61616”
    - “8788”
  restart: always
  volumes:
    - ./volumes/app/log:/opt/metasfresh/log:rw
    - ./volumes/app/heapdump:/opt/metasfresh/heapdump:rw
  environment:
    - METASFRESH_HOME=/opt/metasfresh
webapi:
  build: webapi
  links:
    - app:app
    - db:db
    - rabbitmq:rabbitmq
    - search:search
  expose:
    - “8789”
    # to access the webui-api directly
    #(eg. for debugging or connecting your app to the metasfresh api)
    #uncomment following port:
  ports:
    - “9093:8080”
  restart: always
  volumes:
    - ./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw
    - ./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw
  webui:
  build: webui
  links:
    - webapi:webapi
  ports:
    - “9091:80”
    - “9092:443”
  restart: always
  #uncomment and set to URL where metasfresh will be available from browsers
  environment:
    - WEBAPI_URL=http://metasfresh:9093
  rabbitmq:
  build: rabbitmq
  expose:
    - “5672”
  restart: always
  volumes:
    - ./volumes/rabbitmq/log:/var/log/rabbitmq/log
  environment:
    RABBITMQ_DEFAULT_USER: “metasfresh”
    RABBITMQ_DEFAULT_PASS: “metasfresh”
    RABBITMQ_DEFAULT_VHOST: “/”
  search:
  build: search
  ulimits:
    memlock:
      soft: -1
      hard: -1
    nofile:
      soft: 65536
      hard: 65536
  cap_add:
    - IPC_LOCK
  #to access the search api directly
  #(e.g. if you did docker-compose up search to have the deachboard with your loc ally running metasfresh services)
  uncomment following ports:
  ports:
    - “9200:9200”
    - “9300:9300”
  volumes:
    - ./volumes/search/data:/usr/share/elasticsearch/data
  environment:
    - “ES_JAVA_OPTS=-Xms128M -Xmx256m”
  restart: always

There are no errors or warnings.

This is the result of the docker compose up and container list:

Can anyone please help me out on this.


Admin-Edit:
I changed formatting of your docker-compose.yml content. So it’s easier to identify possible issues.

In the Editor, you can just mark the text that shall preserve formatting (especially yml files) and select the ‘Preformatted text’ button (</> , or [ctrl]+[shift]+[c] )
Cheers.

Hi Sai,

even though your post is very hard to read, I guess I got the point.
I have the same issue and it is related to Cross Site Scripting / Cross Origin stuff (open the dev console in your browser and look for warnings/error messages).
I executed this command docker exec -u postgres metasfresh_docker_db_1 psql -d metasfresh -c "UPDATE AD_SysConfig SET Value='http://my_metasfreshinstance.com' WHERE Name='webui.frontend.url';" (it shall help; see https://forum.metasfresh.org/t/docker-install-rest-scripts-have-incorrect-cors-headers-cannot-login/1705).
But I still have the white page and a Cross Origin warning.
Unfortunately, I did not find any solution, yet.
There was a github issue https://github.com/metasfresh/metasfresh-docker/issues/52 but the solution was not really mentioned.

Seems like a Port/URL Problem.
If you access via SSL try in webapi url port 9092 and wait after docker-compose up -d it takes several mins to initialize complete!
Here is my working docker-compose for SSL

db:
  build: db
  restart: always
  volumes:
    - ./volumes/db/data:/var/lib/postgresql/data
    - ./volumes/db/log:/var/log/postgresql
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  environment:
    - METASFRESH_USERNAME=metasfresh
    - METASFRESH_PASSWORD=metasfresh
    - METASFRESH_DBNAME=metasfresh
    - DB_SYSPASS=System
    - POSTGRES_PASSWORD=ip2LmNzXX8p8iXg9lZTWEJ9524kQDbXFudB7LR03T-xK9fLweX3TLMkA2AYcEiaS
app:
  build: app
  hostname: app
  links:
    - db:db
    - rabbitmq:rabbitmq
    - search:search
  expose:
    - "8282"
    - "61616"
    - "8788"
  restart: always
  volumes:
    - ./volumes/app/log:/opt/metasfresh/log:rw
    - ./volumes/app/heapdump:/opt/metasfresh/heapdump:rw
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  environment:
    - METASFRESH_HOME=/opt/metasfresh
webapi:
  build: webapi
  links:
    - app:app
    - db:db
    - rabbitmq:rabbitmq
    - search:search
  expose:
    - "8789"
# to access the webui-api directly 
# (eg. for debugging or connecting your app to the metasfresh api) 
# uncomment following port:
  #ports:
   #- "8080:8080"
  restart: always
  volumes:
    - ./volumes/webapi/log:/opt/metasfresh-webui-api/log:rw
    - ./volumes/webapi/heapdump:/opt/metasfresh-webui-api/heapdump:rw
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
webui:
  build: webui
  links:
    - webapi:webapi
  ports:
    - "8080:80"
    - "8443:443"
  restart: always
  volumes:
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  #uncomment and set to URL where metasfresh will be available from browsers
  environment:
    - WEBAPI_URL=https://YOUR_WEBSITE.de:8443
rabbitmq:
  build: rabbitmq
  expose:
    - "5672"
  restart: always
  volumes:
    - ./volumes/rabbitmq/log:/var/log/rabbitmq/log
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  environment:
    RABBITMQ_DEFAULT_USER: "metasfresh"
    RABBITMQ_DEFAULT_PASS: "metasfresh"
    RABBITMQ_DEFAULT_VHOST: "/"
search:
  build: search
  ulimits:
    memlock:
      soft: -1
      hard: -1
    nofile:
      soft: 65536
      hard: 65536
  cap_add:
    - IPC_LOCK
# to access the search api directly
# (e.g. if you did docker-compose up search to have the deachboard with your locally running metasfresh services)
# uncomment following ports:
# ports:
#   - "9200:9200"
#   - "9300:9300"
  volumes:
    - ./volumes/search/data:/usr/share/elasticsearch/data
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
  environment:
    - "ES_JAVA_OPTS=-Xms128M -Xmx256m"
  restart: always
3 Likes

Thanks Marius. This config also works for me. It should be the default for the git repo

1 Like

Additional solution
The https:// part in the WEBAPI_URL will be overriden, see

for solution

Thank you very much Admin.

How quickly is this transferred to the master branch?

Because that seems to have been my problem when I wrote the problem with the white page in the forum