Linux error failed code 4

Getting «Error code: 4 (Failure)» when uploading a file to CentOS using WinSCP

I am using WinSCP from last six months almost regularly. Suddenly i am facing a issue that is, I am not able to upload a file in server using it. Its throwing below error message:

General failure (server should provide error description). Error code: 4 Error message from server: Failure Common reasons for the Error code 4 are: - Renaming a file to a name of already existing file. - Creating a directory that already exists. - Moving a remote file to a different filesystem (HDD). - Uploading a file to a full filesystem (HDD). - Exceeding a user disk quota. 
. 2017-12-15 18:06:03.081 Cached directory change via ".." to "/home/centos". . 2017-12-15 18:06:03.081 Getting current directory name. . 2017-12-15 18:06:03.095 Directory content loaded from cache. . 2017-12-15 18:06:03.714 Changing directory to "..". . 2017-12-15 18:06:03.715 Getting real path for '/home/centos/..' > 2017-12-15 18:06:03.715 Type: SSH_FXP_REALPATH, Size: 24, Number: 41232 < 2017-12-15 18:06:03.723 Type: SSH_FXP_STATUS, Size: 24, Number: 40964 . 2017-12-15 18:06:03.723 Discarding reserved response < 2017-12-15 18:06:04.504 Type: SSH_FXP_NAME, Size: 31, Number: 41232 . 2017-12-15 18:06:04.504 Real path is '/home' . 2017-12-15 18:06:04.504 Trying to open directory "/home". >2017-12-15 18:06:04.504 Type: SSH_FXP_LSTAT, Size: 14, Number: 41479 < 2017-12-15 18:06:04.791 Type: SSH_FXP_ATTRS, Size: 37, Number: 41479 . 2017-12-15 18:06:04.791 Getting current directory name. . 2017-12-15 18:06:04.791 Listing directory "/home". >2017-12-15 18:06:04.792 Type: SSH_FXP_OPENDIR, Size: 14, Number: 41739 < 2017-12-15 18:06:05.074 Type: SSH_FXP_HANDLE, Size: 13, Number: 41739 >2017-12-15 18:06:05.075 Type: SSH_FXP_READDIR, Size: 13, Number: 41996 < 2017-12-15 18:06:05.358 Type: SSH_FXP_NAME, Size: 423, Number: 41996 >2017-12-15 18:06:05.359 Type: SSH_FXP_READDIR, Size: 13, Number: 42252 < 2017-12-15 18:06:05.643 Type: SSH_FXP_STATUS, Size: 28, Number: 42252 < 2017-12-15 18:06:05.643 Status code: 1 >2017-12-15 18:06:05.644 Type: SSH_FXP_CLOSE, Size: 13, Number: 42500 . 2017-12-15 18:06:05.644 ..;d;0;2015-07-07T11:20:17.000Z;3;"root" [0];"root" [0];r-xr-xr-x;0 . 2017-12-15 18:06:05.644 centos;d;0;2017-12-15T12:24:52.000Z;3;"centos" [1000];"centos" [1000];rwx------;0 . 2017-12-15 18:06:05.644 nagios;d;0;2016-08-23T12:06:16.000Z;3;"nagios" [1001];"nagios" [1001];rwx------;0 . 2017-12-15 18:06:08.658 Cached directory change via "centos" to "/home/centos". . 2017-12-15 18:06:08.658 Getting current directory name. . 2017-12-15 18:06:08.773 Directory content loaded from cache. . 2017-12-15 18:06:49.957 Copying 1 files/directories to remote directory "/home/centos/" - total size: 871 . 2017-12-15 18:06:49.957 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: Yes; Mask: *.* . 2017-12-15 18:06:49.957 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0 . 2017-12-15 18:06:49.957 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml . 2017-12-15 18:06:49.959 File: 'C:\Documents\C_Programs\Bsearch_using_recursion.txt' [2016-05-03T09:58:13.902Z] [871] . 2017-12-15 18:06:49.972 Copying "C:\Documents\C_Programs\Bsearch_using_recursion.txt" to remote directory started. . 2017-12-15 18:06:49.973 Binary transfer mode selected. . 2017-12-15 18:06:49.973 Opening remote file. > 2017-12-15 18:06:49.973 Type: SSH_FXP_OPEN, Size: 65, Number: 42755 < 2017-12-15 18:06:49.973 Type: SSH_FXP_STATUS, Size: 24, Number: 42500 . 2017-12-15 18:06:49.973 Discarding reserved response < 2017-12-15 18:06:50.256 Type: SSH_FXP_STATUS, Size: 24, Number: 42755 < 2017-12-15 18:06:50.256 Status code: 4, Message: 42755, Server: Failure, Language: . 2017-12-15 18:06:50.256 Cannot create new file "/home/centos/Bsearch_using_recursion.txt", checking if it exists already >2017-12-15 18:06:50.256 Type: SSH_FXP_LSTAT, Size: 49, Number: 43015 < 2017-12-15 18:06:50.543 Type: SSH_FXP_STATUS, Size: 29, Number: 43015 < 2017-12-15 18:06:50.543 Status code: 2, Message: 43015, Server: No such file, Language: * 2017-12-15 18:06:50.544 (ETerminal) General failure (server should provide error description). * 2017-12-15 18:06:50.544 Error code: 4 * 2017-12-15 18:06:50.544 Error message from server: Failure * 2017-12-15 18:06:50.544 * 2017-12-15 18:06:50.544 Common reasons for the Error code 4 are: * 2017-12-15 18:06:50.544 - Renaming a file to a name of already existing file. * 2017-12-15 18:06:50.544 - Creating a directory that already exists. * 2017-12-15 18:06:50.544 - Moving a remote file to a different filesystem (HDD). * 2017-12-15 18:06:50.544 - Uploading a file to a full filesystem (HDD). * 2017-12-15 18:06:50.544 - Exceeding a user disk quota. . 2017-12-15 18:06:50.544 Asking user: . 2017-12-15 18:06:50.545 Cannot create remote file '/home/centos/Bsearch_using_recursion.txt'. ("General failure (server should provide error description). . 2017-12-15 18:06:50.545 Error code: 4 . 2017-12-15 18:06:50.545 Error message from server: Failure . 2017-12-15 18:06:50.545 . 2017-12-15 18:06:50.545 Common reasons for the Error code 4 are: . 2017-12-15 18:06:50.545 - Renaming a file to a name of already existing file. . 2017-12-15 18:06:50.545 - Creating a directory that already exists. . 2017-12-15 18:06:50.545 - Moving a remote file to a different filesystem (HDD). . 2017-12-15 18:06:50.545 - Uploading a file to a full filesystem (HDD). . 2017-12-15 18:06:50.545 - Exceeding a user disk quota.") >2017-12-15 18:06:52.975 Type: SSH_FXP_OPEN, Size: 65, Number: 43267 < 2017-12-15 18:06:53.259 Type: SSH_FXP_STATUS, Size: 24, Number: 43267 < 2017-12-15 18:06:53.260 Status code: 4, Message: 43267, Server: Failure, Language: . 2017-12-15 18:06:53.260 Cannot create new file "/home/centos/Bsearch_using_recursion.txt", checking if it exists already >2017-12-15 18:06:53.260 Type: SSH_FXP_LSTAT, Size: 49, Number: 43527 < 2017-12-15 18:06:53.543 Type: SSH_FXP_STATUS, Size: 29, Number: 43527 < 2017-12-15 18:06:53.543 Status code: 2, Message: 43527, Server: No such file, Language: * 2017-12-15 18:06:53.544 (ETerminal) General failure (server should provide error description). * 2017-12-15 18:06:53.544 Error code: 4 * 2017-12-15 18:06:53.544 Error message from server: Failure 

I google about the issue and found that it might be due to 100% full filesystem. I checked the memory using below command in centos:

 total used free shared buff/cache available Mem: 32014 28612 310 1553 3091 1533 Swap: 0 0 0 

It seems like that i have 1533 MP space available. But still i am not able to upload a small 1 Mb file. df command output:

Filesystem 1K-blocks Used Available Use% Mounted on /dev/vda1 52416860 52416840 20 100% / devtmpfs 16374100 0 16374100 0% /dev tmpfs 16391320 0 16391320 0% /dev/shm tmpfs 16391320 1597928 14793392 10% /run tmpfs 16391320 0 16391320 0% /sys/fs/cgroup tmpfs 3278268 0 3278268 0% /run/user/1000 tmpfs 3278268 0 3278268 0% /run/user/0 

Источник

Читайте также:  Linux найти удаленные файлы

debian упал(

помогите пожалуйста восстановить debian squeezy или понять причину проблемы.

после перезагрузки системы при помощи кнопки reset (которая на системно блоке) дебиан перестала загружаться. сообщения об ошибках примерно такие (по памяти пишу):

/dev/sda6 contains a filesystem with errors? check forced unexpected inconsistency run fsck manually fsck died with exit status 4 failed (code 4) 

затем система предлагает или нажать ctrl + D (следует перезагрузка) или ввести рутовый пароль и работать с консолью. из консоли при этом не запускаются ни иксы, ни другие программы (mc запускается).

пробовал при загрузке выбирать рековери моде. не помогает

пробовал выбирать режим восстановления при воткнутом лайв сиди. в этом случае когда предлагается выбрать раздел для монтирования начинается что-то непонятное. а именно при попытке выбрать любой из разделов появляются сообщения об ошибках красного цвета. к сожалению их содержание не помню.

вобщем помощь требуется в значительной степени телепатическая. так что если хотя бы поможете понять почему такое произошло, я уже буду доволен и благодарен.

Ещё лучше:
1) LiveCD
2) Копировать всё, что копируется
3) fsck

закончилось всё печально - пришлось переустановить систему. но хотя бы понять в общих чертах что произошло. помогите пожалуйста.

как я понял файловая система оказалась поврежденной. связано ли это с: 1. самой железкой(например механическое повреждение) 2. использованием нежурналируемой ФС ext2 3. неустойчивостью debian к перезагрузке через кнопку reset и вообще к перебою в питании

когда пытался запустить fsck /dev/sda6 получил [code] pass1: checking inodes, block, and sizes [/code] при этом ничего не происходило долгое время, хотя при нажатии ctrl + z какой то процесс прерывался.

1. самой железкой(например механическое повреждение

Механические повреждения маловероятны, если вы не бросали накопитель (компьютер) во время того как он работает. В любом случае можно выявить просмотре данные S.M.A.R.T. и проверив поверхность диска, но reset к этому не приводит.

2. использованием нежурналируемой ФС ext2

А кто вас её заставлял использовать ? Её резонно использовать только в тому случае, если монтировать её почти постоянно только на чтение, к примеру на раздел /boot. По умолчанию в Debian, в зависимости от версии релиза, для корневого раздела и прочих используется ext3, в последних релизах ext4, а они с журналом. К томуже проверка должна устранить проблемы.

3. неустойчивостью debian к перезагрузке через кнопку reset и вообще к перебою в питании

Обоснуйте. Debian`у, как и любому Linux большей часть.ю всё равно на reset, больше проблем приводят неправильные действия пользователя: reset во время записи данных на файловую систему, последующая работа с файловой системой без предварительной проверки и устранения появившихся ошибок, журнал конечно отменит некоторую часть изменений, но не всю.

когда пытался запустить fsck /dev/sda6 получил

 pass1: checking inodes, block, and sizes 

при этом ничего не происходило долгое время, хотя при нажатии ctrl + z какой то процесс прерывался.

Читайте также:  Astra linux special edition java

Ну и зачем остановили процесс проверки ? Что по-вашему мнению должно было происходить ? Вам же написали 'pass1: checking inodes, block, and sizes' - этап 1: проверка инодов, блоков и данных о размере. В зависимости от размера файловой системы (раздела / диска) число инодов может быть разным и достаточно большим, вследствие чего этот этап может быть долгим, в Linux все программы пишутся с условием, что если ошибок не выявлено то на стандартынй вывод не будет ничего выводиться. У вас нормально работал первый этап проверки файловой системы, какое-то время, ошибок ещё не было обнаружено., до тех пор пока вы его не прервали. О том, что процесс идёт можете судить по активности индикатора обращения к диску.

Так что все проблемы полученные вами являются следствием только ваших неправильных действий, начинаю от нажатия кнопки reset и заканчивая прерыванием процесса проверки файловой системы.

Источник

Debian User Forums

(warning). fsck died with exit status 4 failed! (code 4).

(warning). fsck died with exit status 4 failed! (code 4).

#1 Post by TSerzhO_ » 2013-02-19 10:36

First of all, I want to apologize for two things:
1) I am completely noob in Linux and know just nothing at all.
2) My English is very poor; I can read, but to speak, compose and write, express my minds and my thoughts is just hard for me; my mother tongue is Ukrainian.
For that I'm sorry.
So, I will try to maximally use my vocabulary to get You could to understand what I'm saying about. And also to provide You as much the details as I only can.

My system has stopped to boot at all.

done. Setting parameters of disc: (none). Setting preliminary keymap. done. Activating swap. done. Checking root file system. fsck from util-linux-ng 2.17.2 /dev/sda1 contains a file system with errors, check forced. Inodes that were part of a corrupted orphan linked list found. /dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) fsck died with exit status 4 failed (code 4). An automatic file system check (fsck) of the root filesystem failed. A manual fsck must be performed, then the system restarted. The fsck should be performed in maintenance mode with the root filesystem mounted in read-only mode. . failed! The root filesystem is currently mounted in read-only mode. A maintenance shell will now be started. After performing system maintenance, press CONTROL-D to terminate the maintenance shell and restart the system. . (warning). Give root password for maintenance (or type Control-D to continue): _

Источник

Читайте также:  Linux утилиты командной строки

fsck died with status code 4

Did you try the -y option? From fsck manual: ` -y For some filesystem-specific checkers, the -y option will cause the fs-specific fsck to always attempt to fix any detected filesystem corruption automatically. Some- times an expert may be able to do better driving the fsck manually. Note that not all filesystem-specific checkers implement this option. In particular fsck.minix(8) and fsck.cramfs(8) does not support the -y option as of this writing.`

(I assume fkck is a typo). Possibly you have another filesystem—are you sure you only have /dev/sda1 ? Check /etc/fstab .

@Ketan Unfortunately the -y flag does solve my problem. @derobert I ran fsck with each of my partitions that show up running fstab .

@Ketan. My system runs again. Your solution solved, although I didn't mentioned it the first time. fsck -y /dev/sda1 returned the same output as fsck /dev/sda1 , so I thought it didn't help. But it did! Please write it down in an answer and I'll mark as accepted answer.

2 Answers 2

-y For some filesystem-specific checkers, the -y option will cause the fs-specific fsck to always attempt to fix any detected filesystem corruption automatically. Some- times an expert may be able to do better driving the fsck manually. Note that not all filesystem-specific checkers implement this option. In particular fsck.minix(8) and fsck.cramfs(8) does not support the -y option as of this writing.

Sometimes fsck shows that a filesystem has no errors, but in reality it has. I had a similar issue once, and if you want to check that filesystem, you have to use force. I'm not sure what type of a filesystem you're using, but let's assume it's ext4:

Emergency help: -p Automatic repair (no questions) -n Make no changes to the filesystem -y Assume "yes" to all questions -c Check for bad blocks and add them to the badblock list -f Force checking even if filesystem is marked clean -v Be verbose -b superblock Use alternative superblock -B blocksize Force blocksize when looking for superblock -j external_journal Set location of the external journal -l bad_blocks_file Add to badblocks list -L bad_blocks_file Set badblocks list 

Источник

Оцените статью
Adblock
detector