2

I am following the directions from https://fenics.readthedocs.io/projects/containers/en/latest/introduction.html .

I get:

fenics@af86d2c8af46:~$ cd ~/demo/python/documented/poisson
fenics@af86d2c8af46:~/demo/python/documented/poisson$     python3 demo_poisson.py
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Solving linear variational problem.
To view figure, visit http://0.0.0.0:8000
Press Ctrl+C to stop WebAgg server

But I am not able to open http://0.0.0.0:8000 (I have tried chrome, safari and firefox). I have also tried replacing 0.0.0.0. with my IP adress or localhost, but the problem remains.

Edit: I'm not sure if this plays a role, but if I try http://0.0.0.0:8000 or localhost:8000, I get an error right away, but when I replace 0.0.0.0 with my IP adress, I get that "the brosing took too long".

1 Answers1

7

0.0.0.0 is not a real IP address. In this context, it designates that the service is reachable through any IPv4 address that this machine has. You can connect to the service via http://127.0.0.1:8000.

You'll also need to forward the docker port to the host machine:

docker run -p 8000:8000 -ti quay.io/fenicsproject/stable:latest
bereal
  • 32,519
  • 6
  • 58
  • 104
  • 1
    Except, "I have also tried replacing 0.0.0.0. with my IP adress or localhost, but the problem remains." – Fred Larson Jun 21 '21 at 12:29
  • @FredLarson Ah indeed, it's a docker file, they need to forward the port, too. Thanks, will fix. – bereal Jun 21 '21 at 12:32
  • I get the following error: docker: Error response from daemon: driver failed programming external connectivity on endpoint goofy_hawking (562afb58796dd053956443f52b8dc3e72af5206503c6d69e24453f489359ceb3): Bind for 0.0.0.0:8000 failed: port is already allocated. –  Jun 21 '21 at 12:41
  • @User1 something is already using that port on your computer, try `docker run -p 8001:8000 ...` (or any other port), then it should be available as `http://localhost:8001`. – bereal Jun 21 '21 at 12:43