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

Connection Error:HTTPConnectionPool #230

Closed
YushengZhang opened this issue Mar 31, 2018 · 21 comments
Closed

Connection Error:HTTPConnectionPool #230

YushengZhang opened this issue Mar 31, 2018 · 21 comments

Comments

@YushengZhang
Copy link

YushengZhang commented Mar 31, 2018

When I try to python the train.py, such error will show up:
Traceback (most recent call last):
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/visdom/init.py", line 261, in _send
data=json.dumps(msg),
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/home/yushengzhang/.conda/envs/my_root/lib/python3.5/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /events (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f5cc198ca90>: Failed to establish a new connection: [Errno 111] Connection refused',))

I have tried to modify the requests.adapters.DEFAULT_RETRIES from 0 to 5, but also set requests.session().keep_alive to False.However it doesn't work.How can I successfully run the train.py?

@YushengZhang YushengZhang changed the title Connection Connection Error:HTTPConnectionPool Mar 31, 2018
@hengshan123
Copy link

I also meet this problem . Do you solve it ?

@YushengZhang
Copy link
Author

Not yet,I'm going to python another CycleGAN code

@YushengZhang
Copy link
Author

Finally I have found the answer!
"start the visdom server before starting the training

python -m visdom.server
"
And the code can run.

@hengshan123
Copy link

Wow,so great ! it works 👍 😄

@firestonelib
Copy link

@YushengZhang
start the visdom server before starting the training:
python -m visdom.server
It works! Thanks a lot!

@Matlmr
Copy link

Matlmr commented Apr 5, 2018

You can also set the --display_id 0 if you don't want to use visdom

@junyanz junyanz closed this as completed Apr 15, 2018
@zikai1
Copy link

zikai1 commented Apr 23, 2018

python -m visdom.server python train.py
then I start python train.py
It start works!

@paviddavid
Copy link

@hengshanji @YushengZhang @Designbook1 @Matlmr @junyanz

I am facing a similar issue. I do not know how to handle the visdom tool.
Starting the server by python -m visdom.server works (more or less) as expected - no error message, everything starts and I see a blue screen in localhost:8097
However, how should I go on?

I can enter something in the same terminal window (where I started the server) but nothing happens. Should I close it before I can go on?

I am using the docker image provided in the repo.

Sorry for the confusions and thanks a lot in advance!!

@junyanz
Copy link
Owner

junyanz commented Jun 12, 2019

You need to create a second terminal and type the training command.

@yanhuanhuanyy
Copy link

Hi, @junyanz . I follow your steps, start the visdom server before starting the training:
python -m visdom.server , and create a second terminal and type the training command. But I still see a blue screen in localhost:8097, nothing in the screen, just an message "file failed to load:/extension/MathZoom.js" and "file failed to load:/extension/MathMenu.js" in the lower left corner. Could you give me some advice? thanks a lot!

@junyanz
Copy link
Owner

junyanz commented Oct 10, 2019

I haven't encountered this issue before. It takes some time to get the first visualization results. Regarding Mathzoom, this post might be relevant.

@yanhuanhuanyy
Copy link

Thanks for your response! I reinstalled the related dependencies, but I still see a blue screen in localhost:8097 and no navigation bar, like this:
1
I tried a lot of methods, but it didn't work. I really need your help.
Could you give me some other advice?

@junyanz
Copy link
Owner

junyanz commented Oct 14, 2019

I am not sure what has happened. Does it work for other visdom demos? Maybe you can run some example demos in the visdom repo. I am not sure if it is caused by our repo or just visdom issues. If you post your question on visdom repo, more people might be able to know what's going on.

@yanhuanhuanyy
Copy link

ok, thanks a lot! Currently, I still can't solve this visdom problem. If I don't use visdom, will I miss the relevant training information? For example: loss curve, etc. Can I get training information in other ways?

@junyanz
Copy link
Owner

junyanz commented Oct 15, 2019

Yes, the training results and losses are stored in the directory specified by --checkpoints_dir.

@yanhuanhuanyy
Copy link

I'm very graceful for your help. I reinstalled firefox(a more modern version), it works! This appears to be a browser compatibility problem. I'm sorry to bother you.

@junyanz
Copy link
Owner

junyanz commented Oct 16, 2019

Good to know. Thanks.

@Lxiangyue
Copy link

You can also set the --display_id 0 if you don't want to use visdom
It works!

@ghost
Copy link

ghost commented Jul 1, 2020

You can also set the --display_id 0 if you don't want to use visdom
It works!

Where to set --display_id 0?

@junyanz
Copy link
Owner

junyanz commented Jul 2, 2020

In the training bash script.

@Tom-Lotze
Copy link

I'm struggling with the same problem, but I'm training on a remote GPU cluster where I submit my training script to the job scheduler. Therefore, I cannot start up multiple terminals and run the Visdom server in some other terminal. Any advice how to proceed? I want to view the results locally using port forwarding, which is all set up.

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

10 participants