adversarial-vision-challenge icon indicating copy to clipboard operation
adversarial-vision-challenge copied to clipboard

Can't reach model server.

Open blgnksy opened this issue 6 years ago • 9 comments

Hi, I can't access model server. I run my codes in a docker repository which's port 8989 is also made available.

My code :

from adversarial_vision_challenge.utils import read_images, store_adversarial
from adversarial_vision_challenge.utils import load_model

model = load_model()

And the output :

Wating for model server to start...
Retrying for the 1. time
Retrying for the 2. time
Retrying for the 3. time
Retried request for 3 times. Giving up.
Still waiting for model server to start...
Retrying for the 1. time
Retrying for the 2. time
Retrying for the 3. time
Retried request for 3 times. Giving up.
Still waiting for model server to start...
Retrying for the 1. time
Retrying for the 2. time
Retrying for the 3. time
Retried request for 3 times. Giving up.
Still waiting for model server to start...
Retrying for the 1. time
Retrying for the 2. time
Retrying for the 3. time
Retried request for 3 times. Giving up.
=======> Can't reach model server: http://localhost:8989.

blgnksy avatar Sep 03 '18 08:09 blgnksy

Can you run docker logs on the model container.

jonasrauber avatar Sep 10 '18 16:09 jonasrauber

I have this problem too!!!Have you solved this problem?

imsyu avatar Sep 11 '18 07:09 imsyu

My docker logs output is :

[32m[I 07:52:07.187 NotebookApp](B[m Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[32m[I 07:52:07.206 NotebookApp](B[m Serving notebooks from local directory: /notebooks
[32m[I 07:52:07.207 NotebookApp](B[m 0 active kernels
[32m[I 07:52:07.207 NotebookApp](B[m The Jupyter Notebook is running at:
[32m[I 07:52:07.207 NotebookApp](B[m http://0.0.0.0:8888/?token=d4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b02e
[32m[I 07:52:07.207 NotebookApp](B[m Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 07:52:07.207 NotebookApp] 
    
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://0.0.0.0:8888/?token=d4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b02e
[32m[I 07:52:08.633 NotebookApp](B[m 302 GET /?token=d4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 0.62ms
[32m[I 07:52:08.645 NotebookApp](B[m 302 GET /tree?token=d4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 0.91ms
[33m[W 07:52:20.844 NotebookApp](B[m 401 POST /login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 1.34ms referer=http://0.0.0.0:8888/login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b
[33m[W 07:52:36.850 NotebookApp](B[m 401 POST /login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 1.27ms referer=http://0.0.0.0:8888/login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b
[33m[W 07:52:54.304 NotebookApp](B[m 401 POST /login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 1.60ms referer=http://0.0.0.0:8888/login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b
[32m[I 07:53:10.739 NotebookApp](B[m 302 POST /login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 1.01ms
[32m[I 07:53:17.223 NotebookApp](B[m Writing notebook-signing key to /root/.local/share/jupyter/notebook_secret
[33m[W 07:53:17.224 NotebookApp](B[m Notebook NIPS_Repo/EnsembleAttacks-v1.ipynb is not trusted
[32m[I 07:53:17.749 NotebookApp](B[m Kernel started: cb1f9aa7-bf98-40a6-91b6-8c45d5dd795f
[32m[I 07:53:18.430 NotebookApp](B[m Adapting to protocol v5.1 for kernel cb1f9aa7-bf98-40a6-91b6-8c45d5dd795f
[32m[I 07:53:22.370 NotebookApp](B[m Starting buffering for cb1f9aa7-bf98-40a6-91b6-8c45d5dd795f:a354d77a45d04aed8c3f50f7895ccb8e
[33m[W 07:53:31.388 NotebookApp](B[m Notebook NIPS_Repo/combat/Untitled.ipynb is not trusted
[32m[I 07:53:31.469 NotebookApp](B[m Kernel started: 7ec77c14-2cbe-43eb-9c32-27f6bfee8d20
[32m[I 07:53:31.909 NotebookApp](B[m Adapting to protocol v5.1 for kernel 7ec77c14-2cbe-43eb-9c32-27f6bfee8d20
[32m[I 07:55:31.494 NotebookApp](B[m Saving file at /NIPS_Repo/combat/Untitled.ipynb

blgnksy avatar Sep 11 '18 07:09 blgnksy

@imsyu Unfortunately.

blgnksy avatar Sep 11 '18 07:09 blgnksy

Why are you starting a Jupyter notebook server in your model container? Your container should start with the script that initializes the model and starts the model server. Please have a look at the baseline models.

jonasrauber avatar Sep 11 '18 08:09 jonasrauber

I use the Jupiter for development purposes only. I am aware of the baseline code.

blgnksy avatar Sep 11 '18 12:09 blgnksy

Maybe we should load model and wrap it as a foolbox model first. I forgot to do this.

imsyu avatar Sep 13 '18 09:09 imsyu

But I have this error : Client has not sent any requests to to the server for more than 180.17973017692566s

imsyu avatar Sep 13 '18 09:09 imsyu

Again: your Docker container for the model has to start a script when the container gets started and that script has to start the model server. In the baseline resnet model the run.sh script starts the main.py and that calls model_server(fmodel) on the Foolbox model instance. Your logs, on the other hand, show that your container starts Jupyter instead of a script that starts the model server.

jonasrauber avatar Sep 13 '18 15:09 jonasrauber