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

socket.error: [Errno 111] Connection refused #51

Closed
Tenacity-soar opened this issue Jul 2, 2017 · 11 comments
Closed

socket.error: [Errno 111] Connection refused #51

Tenacity-soar opened this issue Jul 2, 2017 · 11 comments

Comments

@Tenacity-soar
Copy link

Tenacity-soar commented Jul 2, 2017

when i run the Pix2Pix
"python train.py --dataroot ./datasets/facades --name facades_pix2pix --model pix2pix --which_model_netG unet_256 --which_direction BtoA --lambda_A 100 --dataset_mode aligned --use_dropout --no_lsgan"

a problem happened as follow:

model [Pix2PixModel] was created
create web directory ./checkpoints/facades_pix2pix/web...
(epoch: 1, iters: 100, time: 5.015) G_GAN: 2.485 G_L1: 36.558 D_real: 0.151 D_fake: 0.257
(epoch: 1, iters: 200, time: 4.833) G_GAN: 3.015 G_L1: 43.858 D_real: 0.045 D_fake: 0.552
(epoch: 1, iters: 300, time: 4.797) G_GAN: 2.519 G_L1: 39.296 D_real: 0.039 D_fake: 0.149
(epoch: 1, iters: 400, time: 6.720) G_GAN: 2.393 G_L1: 25.259 D_real: 0.200 D_fake: 0.504
End of epoch 1 / 200 Time Taken: 5975 sec
Traceback (most recent call last):
File "train.py", line 20, in
for i, data in enumerate(dataset):
File "/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py", line 206, in next
idx, batch = self.data_queue.get()
File "/usr/lib/python2.7/multiprocessing/queues.py", line 376, in get
return recv()
File "/usr/local/lib/python2.7/dist-packages/torch/multiprocessing/queue.py", line 22, in recv
return pickle.loads(buf)
File "/usr/lib/python2.7/pickle.py", line 1382, in loads
return Unpickler(file).load()
File "/usr/lib/python2.7/pickle.py", line 858, in load
dispatchkey
File "/usr/lib/python2.7/pickle.py", line 1133, in load_reduce
value = func(*args)
File "/usr/local/lib/python2.7/dist-packages/torch/multiprocessing/reductions.py", line 68, in rebuild_storage_fd
fd = multiprocessing.reduction.rebuild_handle(df)
File "/usr/lib/python2.7/multiprocessing/reduction.py", line 155, in rebuild_handle
conn = Client(address, authkey=current_process().authkey)
File "/usr/lib/python2.7/multiprocessing/connection.py", line 169, in Client
c = SocketClient(address)
File "/usr/lib/python2.7/multiprocessing/connection.py", line 304, in SocketClient
s.connect(address)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused

how to solve the problem?

@junyanz
Copy link
Owner

junyanz commented Jul 3, 2017

Please install the visdom library, and run the following command python -m visdom.server. Please see more details in training/test details.

@Tenacity-soar
Copy link
Author

screenshot from 2017-07-04 09_23_36
thank you very much. But i have not solve the problem, i have run the command python -m visdom.server. I set the --display_id = 1. I open the http://localhost:8097, nothing in the html.
So i need your help.
Thank you very much! And what should i do next?

@Tenacity-soar
Copy link
Author

Should i run the command http://localhost:8097/env/1 ?

@junyanz
Copy link
Owner

junyanz commented Jul 4, 2017

It might be related to the data_loader. Could you try set --nThreads 1 and see what will happen?

@Tenacity-soar
Copy link
Author

Thank you. I set --nThreds 1, but the same problem happened again.

@Tenacity-soar
Copy link
Author

And I run another dataset edges2shoes. No problem happend.

@sadkangaroo
Copy link

I was running with CPU and had the same problem. Setting --nThreads 0 and --display_id 0 solved the problem for me.

@Tenacity-soar
Copy link
Author

Thanks, I use your ways . And I have solved the problem. Thank you very much.

@aidandan
Copy link

aidandan commented Aug 24, 2017

I have the same bug,,when I setting --nThreads 0 and --display_id ,,,DoI need to run the program after the file changes, such thatpython base_options.py` ? I am note sure the run sequence .

@hongzhenwang
Copy link

Solved by expand shared memory.
http://sharadchhetri.com/2012/08/15/devshm-mount-devshm/

@lideyboy
Copy link

image
What's the problem? Please help!

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

6 participants