Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SSH login prompt Write failed: how to solve Broken pipe

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

The main content of this article is to explain "SSH login prompt Write failed: Broken pipe how to solve", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "SSH login prompt Write failed: how to solve Broken pipe"!

When passing through su-www, the prompt is as follows:

Su: cannot set user id: Resource temporarily unavailable

First, check the / etc/profile file, which also has the following ulimit configuration:

Ulimit-S-c 0 > / dev/null 2 > & 1 ulimit-HSn 65000 ulimit-u 65000

Note: the following-u parameter is the maximum number of processes. If you are afraid that other users will run out of local resources through the fork dead loop, you can reduce this value appropriately. The default value is 1024.

Then look at the / etc/security/limits.conf file and find that the value of nofile has been added below it, as follows:

Www soft nproc 65535 www hard nproc 65535 * soft nofile 65535 * hard nofile 65535

Note: the limits.conf file is actually the configuration file for the ulimit command. Nproc is the maximum number of processes opened, and nofile is the maximum number of files opened. This and the / etc/profile above are set repeatedly. After the implementation has been added, / etc/profile no longer needs to be configured, and the configuration is more standardized and can be restricted to users.

Even if the above two places have been set up, there is still the above hint, magical. Later, after messing about for a long time, I suddenly thought of the previous configuration in the centos 6.3 version, and found that a new / etc/security/limits.d/90-nproc.conf file was added after centos 6.x to control nproc. The default configuration in this is

* soft nproc 1024 root soft nproc unlimited

The 1024 size is obviously too small for the www users I run the program for. After changing to 65535, when su-www, the problem is resolved. There are no more annoying hints.

At this point, I believe you have a deeper understanding of "SSH login prompt Write failed: how to solve Broken pipe", you might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 277

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report