Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't run GinanEDA #131

Open
Ali-Fallahi opened this issue Jan 20, 2025 · 2 comments
Open

can't run GinanEDA #131

Ali-Fallahi opened this issue Jan 20, 2025 · 2 comments

Comments

@Ali-Fallahi
Copy link

Ali-Fallahi commented Jan 20, 2025

Hey, dear Ginan support.
I installed Ginan using docker in Windows with this docker-compose(my docker desktop use wsl to run):

version: '3.8'

services:
  ginan:
    image: gnssanalysis/ginan:v3.0.0
    container_name: ginan_container
    ports:
      - "5000:5000"
    volumes:
      - input_data:/ginan/inputData/data
      - input_products:/ginan/inputData/products
      - gnss_outputs:/data
    stdin_open: true
    tty: true
    depends_on:
      - mongodb
  mongodb:
    image: mongo:6.0
    container_name: mongodb
    ports:
      - "27017:27017"
    volumes:
      - mongo_data:/data/db

volumes:
  input_data:
  input_products:
  gnss_outputs:
  mongo_data:

I can not connect to MongoDB like that!
so I successfully downloaded example inputs and also ran MongoDB in the background using these codes:

mkdir -p /var/log/mongodb
touch /var/log/mongodb/mongod.log
chmod -R 755 /var/log/mongodb

mkdir -p /data/db/path
chown -R mongodb:mongodb /data/db/path

mongod --dbpath /data/db --logpath /var/log/mongodb/mongod.log --fork --bind_ip 127.0.0.1 --port 27017

after all of that I ran pea --config ppp_example.yaml and successfully got all trace files and GPS files

now I want to run GinanEDA but unfortunately, it does not appear in my browser(I use localhost).
I run the index.py and this code appears:
root@b7d249c42820:/ginan/scripts/GinanEDA# python3 index.py
Serving Flask app 'index'
Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
Running on http://127.0.0.1:5000
Press CTRL+C to quit

my main problem is all of the ports in Ginan are not accessible on my localhost

@seballgeyer
Copy link
Collaborator

Hello

You’ve successfully set up Ginan in a Docker container and are trying to run GinanEDA using the index.py script. However, you're finding that the web interface isn’t accessible from your browser (localhost:5000), even though the Flask server is running inside the container. This is because the Flask app is bound to 127.0.0.1, which restricts access to just inside the container.

By default, when Flask runs on 127.0.0.1, it’s only accessible from within the container itself. This prevents you from reaching the web interface from your host machine (your Windows system). To make the GinanEDA interface accessible from your browser, you need to make the Flask server listen on all network interfaces, not just 127.0.0.1.

To fix this, you can modify the command you’re using to run Flask inside the container. Use the following command to bind Flask to 0.0.0.0, which makes the app accessible from outside the container (including your Windows host machine):

FLASK_APP=index.py FLASK_RUN_HOST=0.0.0.0 flask run --host=0.0.0.0 --port=5000

This will allow you to access the GinanEDA web interface at http://localhost:5000 on your browser, so you can interact with the tool and analyze your GNSS data.

You can run this command interactively inside the Docker container, and it will make the tool accessible without modifying any internal Flask code. This should solve your issue and allow you to fully use the EDA tool.

@Ali-Fallahi
Copy link
Author

Thank you for your support! I have successfully run the GinanEDA application, but I am encountering an issue when connecting to MongoDB. Specifically, when I connect to MongoDB, nothing appears in the EDA interface for further processing. Let me walk you through the steps I have taken so far:

Steps I Followed:
Docker Compose Setup:
I used the following docker-compose.yml file to set up the environment:

version: '3.8'

services:
  ginan:
    image: gnssanalysis/ginan:v3.0.0
    container_name: ginan_container
    volumes:
      - input_data:/ginan/inputData/data
      - input_products:/ginan/inputData/products
      - gnss_outputs:/data
    stdin_open: true
    tty: true
    depends_on:
      - mongodb
    ports:
      - "5000:5000"
    extra_hosts:
      - "localhost:host-gateway"
  mongodb:
    image: mongo:6.0
    container_name: mongodb
    ports:
      - "27017:27017"
    volumes:
      - mongo_data:/data/db

volumes:
  input_data:
  input_products:
  gnss_outputs:
  mongo_data:

Downloading Sample Data:
After setting up the Docker environment, I downloaded the required sample data using the provided scripts.

Running the Processing Script:
I executed the following command to process the data:

pea --config ppp_example.yaml

The process completed without any apparent errors.

Running GinanEDA:
Finally, I started the GinanEDA application. However, when I attempted to connect to MongoDB using localhost, I did not see any data or options in the EDA interface to proceed with further processing.

Image

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

No branches or pull requests

2 participants