Как решить socket.error: [Errno 32] Broken pipe закрытия сокета?
Как решить socket.error: [Errno 32] Broken pipe закрытия сокета? Клиентский часть tcp socket выводит разрыв соединение Traceback (most recent call last): File «clinsock.py», line 25, in tcpCliSock.send(inp) socket.error: [Errno 32] Broken pipe
Перемещено tailgunner из general
Не пытайся писать в закрытый сокет.
Попадробней смотри в своем же коде. Ситуация когда сервер закрыл соединение, а клиент пытается в него писать.
И как мне сделать так что бы соединение не закрывался.
Программирование процесс творческий — придумай что-нибудь. (Строки 64-66)
Я там всё перепробовал с break и tcpCli.close()
если другая сторона закрыла сокет, то уже ничего поделать нельзя
нужно разобраться почему она это сделала
В сем сапосибо я уже исправил проблему добавил исклучение try except.
BrokenPipeError: [Errno 32] Broken pipe #143
Comments
Copy link Quote reply
ShaohongBai commented Jul 4, 2018
I am getting the error of BrokenPipeError: [Errno 32] Broken pipe when using ProessPool module. Could you let me know what is likely to be the issue?
Process ForkPoolWorker-9:
Traceback (most recent call last):
File «/usr/lib/python3.5/multiprocessing/pool.py», line 125, in worker
put((job, i, result))
File «/home/ubuntu/.local/lib/python3.5/site-packages/sklearn/externals/joblib/pool.py», line 386, in put
return send(obj)
File «/home/ubuntu/.local/lib/python3.5/site-packages/sklearn/externals/joblib/pool.py», line 372, in send
self._writer.send_bytes(buffer.getvalue())
File «/usr/lib/python3.5/multiprocessing/connection.py», line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File «/usr/lib/python3.5/multiprocessing/connection.py», line 404, in _send_bytes
self._send(header + buf)
File «/usr/lib/python3.5/multiprocessing/connection.py», line 368, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File «/usr/lib/python3.5/multiprocessing/process.py», line 249, in _bootstrap
self.run()
File «/usr/lib/python3.5/multiprocessing/process.py», line 93, in run
self._target(*self._args, **self._kwargs)
File «/usr/lib/python3.5/multiprocessing/pool.py», line 130, in worker
put((job, i, (False, wrapped)))
File «/home/ubuntu/.local/lib/python3.5/site-packages/sklearn/externals/joblib/pool.py», line 386, in put
return send(obj)
File «/home/ubuntu/.local/lib/python3.5/site-packages/sklearn/externals/joblib/pool.py», line 372, in send
self._writer.send_bytes(buffer.getvalue())
File «/usr/lib/python3.5/multiprocessing/connection.py», line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File «/usr/lib/python3.5/multiprocessing/connection.py», line 404, in _send_bytes
self._send(header + buf)
File «/usr/lib/python3.5/multiprocessing/connection.py», line 368, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
Process ForkPoolWorker-8:
Traceback (most recent call last):
File «/usr/lib/python3.5/multiprocessing/pool.py», line 125, in worker
put((job, i, result))
File «/home/ubuntu/.local/lib/python3.5/site-packages/sklearn/externals/joblib/pool.py», line 386, in put
return send(obj)
File «/home/ubuntu/.local/lib/python3.5/site-packages/sklearn/externals/joblib/pool.py», line 372, in send
self._writer.send_bytes(buffer.getvalue())
File «/usr/lib/python3.5/multiprocessing/connection.py», line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File «/usr/lib/python3.5/multiprocessing/connection.py», line 404, in _send_bytes
self._send(header + buf)
File «/usr/lib/python3.5/multiprocessing/connection.py», line 368, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File «/usr/lib/python3.5/multiprocessing/process.py», line 249, in _bootstrap
self.run()
File «/usr/lib/python3.5/multiprocessing/process.py», line 93, in run
self._target(*self._args, **self._kwargs)
File «/usr/lib/python3.5/multiprocessing/pool.py», line 130, in worker
put((job, i, (False, wrapped)))
File «/home/ubuntu/.local/lib/python3.5/site-packages/sklearn/externals/joblib/pool.py», line 386, in put
return send(obj)
File «/home/ubuntu/.local/lib/python3.5/site-packages/sklearn/externals/joblib/pool.py», line 372, in send
self._writer.send_bytes(buffer.getvalue())
File «/usr/lib/python3.5/multiprocessing/connection.py», line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File «/usr/lib/python3.5/multiprocessing/connection.py», line 404, in _send_bytes
self._send(header + buf)
File «/usr/lib/python3.5/multiprocessing/connection.py», line 368, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
Process ForkPoolWorker-7:
Traceback (most recent call last):
File «/usr/lib/python3.5/multiprocessing/pool.py», line 125, in worker
put((job, i, result))
File «/home/ubuntu/.local/lib/python3.5/site-packages/sklearn/externals/joblib/pool.py», line 386, in put
return send(obj)
File «/home/ubuntu/.local/lib/python3.5/site-packages/sklearn/externals/joblib/pool.py», line 372, in send
self._writer.send_bytes(buffer.getvalue())
File «/usr/lib/python3.5/multiprocessing/connection.py», line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File «/usr/lib/python3.5/multiprocessing/connection.py», line 404, in _send_bytes
self._send(header + buf)
File «/usr/lib/python3.5/multiprocessing/connection.py», line 368, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Linux Error: 32: Broken pipe
Question: What causes this Linux error 32 broken pipe error:
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
How do I fix this error 32?
Answer: The Linux error 32 broken pipe indicates that the listener process could not create a dedicated server process to hand the client request.
This error is caused by a resource exhaustion issue, either within the OS or within the Oracle instance. Possible causes for the Linux error 32 include:
- You may have reached the max processes limit set on the database and cannot spawn a new server connection process.
- You have hit some RAM memory limit or some other OS issue that is preventing the server process from been created (spawned).
- The log file for the listener (located at $ORACLE_HOME/network/log/listener.log) has reached the 2GB file size limit on Linux. To alleviate the problem, simply archive or delete the listener log file and restart the listener process with lsnrctl start.
- This broken pipe error can also be a permission issue. If the sticky bit is not set up for the owner permission of @ORACLE_HOME/bin/oracle binary file, then the user could not complete the process required to handover the inbound connection to the database, which give the Linux error 32: broken pipe.
$ chmod 6751 /u01/app/oracle/product/12.1.0/dbhome_1/bin/oracle
Burleson is the American Team
Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals. Feel free to ask questions on our Oracle forum .
Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.
Errata? Oracle technology is changing and we strive to update our BC Oracle support information. If you find an error or have a suggestion for improving our content, we would appreciate your feedback. Just e-mail:
and include the URL for the page.