Posts Tagged ‘problem’

Howto debug and remount NFS hangled filesystem on Linux

Monday, August 12th, 2019

Reading Time: 6minutes


If you're using actively NFS remote storage attached to your Linux server it is very useful to get the number of dropped NFS connections and in that way to assure you don't have a remote NFS server issues or Network connectivity drops out due to broken network switch a Cisco hub or other network hop device that is routing the traffic from Source Host (SRC) to Destination Host (DST) thus, at perfect case if NFS storage and mounted Linux Network filesystem should be at (0) zero dropped connectios or their number should be low. Firewall connectivity between Source NFS client host and Destination NFS Server and mount should be there (set up fine) as well as proper permissions assigned on the server, as well as the DST NFS should be not experiencing I/O overheads as well as no DNS issues should be present (if NFS is not accessed directly via IP address).
In below article which is mostly for NFS novice admins is described shortly few of the nuances of working with NFS.

1. Check nfsstat and portmap for issues

One indicator that everything is fine with a configured NFS mount is the number of dropped NFS connections
or with a very low count of dropped connections, to check them if you happen to administer NFS



linux:~# nfsstat -o net
Server packet stats:
packets    udp        tcp        tcpconn
0          0          0          0  

nfsstat is useful if you have to debug why occasionally NFS mounts are getting unresponsive.

As NFS is so dependent upon portmap service for mapping the ports, one other point to check in case of Hanged NFSes is the portmap service whether it did not crashed due to some reason.


linux:~# service portmap status
portmap (pid 7428) is running…   [portmap service is started.]


linux:~# ps axu|grep -i rpcbind
_rpc       421  0.0  0.0   6824  3568 ?        Ss   10:30   0:00 /sbin/rpcbind -f -w

A useful commands to debug further rcp caused issues are:

On client side:


rpcdebug -m nfs -c


On server side:


rpcdebug -m nfsd -c


It might be also useful to check whether remote NFS permissions did not changed with the good old showmount cmd

linux:~# showmount -e rem_nfs_server_host

Also it is useful to check whether /etc/exports file was not modified somehow and whether the NFS did not hanged due to attempt of NFS daemon to reload the new configuration from there, another file to check while debugging is /etc/nfs.conf – are there group / permissions issues as well as the usual /var/log/messages andthe kernel log with dmesg command for weird produced NFS client / server or network messages.

nfs-utils disabled serving NFS over UDP in version 2.2.1. Arch core updated to 2.3.1 on 21 Dec 2017 (skipping over 2.2.1.) If UDP stopped working then, add udp=y under [nfsd] in /etc/nfs.conf. Then restart nfs-server.service.

If the remote NFS server is running also Linux it is useful to check its /etc/default/nfs-kernel-server configuration

At some stall cases it might be also useful to remount the NFS (but as there might be a process on the Linux server) trying to read / write data from the remote NFS mounted FS it is a good idea to check (whether a process / service) on the server is not doing I/O operations on the NFS and if such is existing to kill the process in question with fuser

linux:~# fuser -k [mounted-filesystem]


2. Diagnose the problem interactively with htop

    Htop should be your first port of call. The most obvious symptom will be a maxed-out CPU.
    Press F2, and under "Display options", enable "Detailed CPU time". Press F1 for an explanation of the colours used in the CPU bars. In particular, is the CPU spending most of its time responding to IRQs, or in Wait-IO (wio)?

3. Get more extensive Mount info with mountstats


nfs-utils package contains mountstats command which is very useful in debugging further the issues identified

$ mountstats
Stats for example:/tank mounted on /tank:
  NFS mount options: rw,sync,vers=4.2,rsize=524288,wsize=524288,namlen=255,acregmin=3,acregmax=60,acdirmin=30,acdirmax=60,soft,proto=tcp,port=0,timeo=15,retrans=2,sec=sys,,local_lock=none
  NFS server capabilities: caps=0xfbffdf,wtmult=512,dtsize=32768,bsize=0,namlen=255
  NFSv4 capability flags: bm0=0xfdffbfff,bm1=0x40f9be3e,bm2=0x803,acl=0x3,sessions,pnfs=notconfigured
  NFS security flavor: 1  pseudoflavor: 0


NFS byte counts:
  applications read 248542089 bytes via read(2)
  applications wrote 0 bytes via write(2)
  applications read 0 bytes via O_DIRECT read(2)
  applications wrote 0 bytes via O_DIRECT write(2)
  client read 171375125 bytes via NFS READ
  client wrote 0 bytes via NFS WRITE

RPC statistics:
  699 RPC requests sent, 699 RPC replies received (0 XIDs not found)
  average backlog queue length: 0

    338 ops (48%)
    avg bytes sent per op: 216    avg bytes received per op: 507131
    backlog wait: 0.005917     RTT: 548.736686     total execute time: 548.775148 (milliseconds)
    115 ops (16%)
    avg bytes sent per op: 199    avg bytes received per op: 240
    backlog wait: 0.008696     RTT: 15.756522     total execute time: 15.843478 (milliseconds)
    93 ops (13%)
    avg bytes sent per op: 203    avg bytes received per op: 168
    backlog wait: 0.010753     RTT: 2.967742     total execute time: 3.032258 (milliseconds)
    32 ops (4%)
    avg bytes sent per op: 220    avg bytes received per op: 274
    backlog wait: 0.000000     RTT: 3.906250     total execute time: 3.968750 (milliseconds)
    25 ops (3%)
    avg bytes sent per op: 268    avg bytes received per op: 350
    backlog wait: 0.000000     RTT: 2.320000     total execute time: 2.360000 (milliseconds)
    24 ops (3%)
    avg bytes sent per op: 224    avg bytes received per op: 176
    backlog wait: 0.000000     RTT: 30.250000     total execute time: 30.291667 (milliseconds)
    23 ops (3%)
    avg bytes sent per op: 220    avg bytes received per op: 160
    backlog wait: 0.000000     RTT: 6.782609     total execute time: 6.826087 (milliseconds)
    4 ops (0%)
    avg bytes sent per op: 224    avg bytes received per op: 14372
    backlog wait: 0.000000     RTT: 198.000000     total execute time: 198.250000 (milliseconds)
    2 ops (0%)
    avg bytes sent per op: 172    avg bytes received per op: 164
    backlog wait: 0.000000     RTT: 1.500000     total execute time: 1.500000 (milliseconds)
    1 ops (0%)
    avg bytes sent per op: 172    avg bytes received per op: 164
    backlog wait: 0.000000     RTT: 2.000000     total execute time: 2.000000 (milliseconds)
    1 ops (0%)
    avg bytes sent per op: 164    avg bytes received per op: 116
    backlog wait: 0.000000     RTT: 1.000000     total execute time: 1.000000 (milliseconds)

nfs-utils disabled serving NFS over UDP in version 2.2.1. Arch core updated to 2.3.1 on 21 Dec 2017 (skipping over 2.2.1.) If UDP stopped working then, add udp=y under [nfsd] in /etc/nfs.conf. Then restart nfs-server.service.

4. Check for firewall issues

If all fails make sure you don't have any kind of firewall issues. Sometimes firewall changes on remote server or somewhere in the routing servers might lead to stalled NFS mounts.


To use properly NFS as you should know as a minimum you need to have opened as ports is Port 111 (TCP and UDP) and 2049 (TCP and UDP) on the NFS server (side) as well as any traffic inspection routers on the road from SRC (Linux client host) and NFS Storage destination DST server.

There are also ports for Cluster and client status (Port 1110 TCP for the former, and 1110 UDP for the latter) as well as a port for the NFS lock manager (Port 4045 TCP and UDP) but having this opened or not depends on how the NFS is configured. You can further determine which ports you need to allow depending on which services are needed cross-gateway.

5. How to Remount a Stalled unresponsive NFS filesystem mount


At many cases situation with remounting stalled NFS filesystem is not so easy but if you're lucky a standard mount and remount should do the trick.

Most simple way to remout the NFS (once you're sure this might not disrupt any service) – don't blame me if you break something is with:

umount -l /mnt/NFS_mnt_point
mount /mnt/NFS_mnt_point

Note that the lazy mount (-l) umount opt is provided here as very often this is the only way to unmount a stalled NFS mount.

Sometimes if you have a lot of NFS mounts and all are inacessible it is useful to remount all NFS mounts, if the remote NFS is responsive this should be possible with a simple for bash loop:

for P in $(mount | awk '/type nfs / {print $3;}'); do echo $P; echo "sudo umount $P && sudo mount $P" && echo "ok :)"; done

If you cd /mnt/NFS_mnt_point and try ls and you get

$ ls
.: Stale File Handle


You will need to unmount the FS with forceful mount flag

umount -f /mnt/NFS_mnt_point

Sum it up

In this article, I've shown you a few simple ways to debug what is wrong with a Stalled / Hanged NFS filesystem present on a NFS server mounted on a Linux client server.
Above was explained the common issues caused by NFS portmap (rpcbind) dependency, how to its status is fine, some further diagnosis with htop and mountstat was pointed. I've pointed the minimum amount of TCP / UDP ports 2049 and 111 that needs to be opened for the NFS communication to work and finally explained on how to remount a stalled NFS single or all attached mount on a NFS client to restore to normal operations.
As NFS is a whole ocean of things and the number of ways it is used are too extensive this article is just a general info useful for the NFS dummy admin for more robust configs read some good book on NFS such as Managing NFS and NIS, 2nd Edition – O'Reilly Media and for Kernel related NFS debugging make sure you check as a minimum ArchLinux's NFS troubleshooting guide and sourceforge's NFS Troubleshoting and Optimizing NFS Performance guides.


Why du and df reporting different on a filesystem / How to fix inconsistency between used space on FS and disk showing full strangeness

Wednesday, July 24th, 2019

Reading Time: 6minutes


If you're a sysadmin on a large server environment such as a couple of hundred of Virtual Machines running Linux OS on either physical host or OpenXen / VmWare hosted guest Virtual Machine, you might end up sometimes at an odd case where some mounted partition mount point reportsits file use different when checked with
cmd than when checked with du command, like for example:

root@sqlserver:~# df -hT /var/lib/mysql
Filesystem   Type  Size Used Avail Use% Mounted On
/dev/sdb5      ext4    19G  3,4G    14G  20% /var/lib/mysql

Here the '-T' argument is used to show us the filesystem.

root@sqlserver:~# du -hsc /var/lib/mysql
0K    /var/lib/mysql/
0K    total


1. Simple debug on what might be the root cause for df / du inconsistency reporting


Of course the basic thing to do when in that weird situation is to be totally shocked how this is possible and to investigate a bit what is the biggest first level sub-directories that eat up the space on the mounted location, with du:


# du -hkx –max-depth=1 /var/lib/mysql/|uniq|sort -n
4       /var/lib/mysql/test
8       /var/lib/mysql/ezmlm
8       /var/lib/mysql/micropcfreak
8       /var/lib/mysql/performance_schema
12      /var/lib/mysql/mysqltmp
24      /var/lib/mysql/speedtest
64      /var/lib/mysql/yourls
144     /var/lib/mysql/narf
320     /var/lib/mysql/webchat_plus
424     /var/lib/mysql/goodfaithair
528     /var/lib/mysql/moonman
648     /var/lib/mysql/daniel
852     /var/lib/mysql/lessn
1292    /var/lib/mysql/gallery

The given output is in Kilobytes so it is a little bit hard to read, if you're used to Mbytes instead, do


 # du -hmx –max-depth=1 /var/lib/mysql/|uniq|sort -n|less


I've also investigated on the complete /var directory contents sorted by size with:


 # du -akx ./ | sort -n
5152564    ./cache/rsnapshot/hourly.2/localhost
5255788    ./cache/rsnapshot/hourly.2
5287912    ./cache/rsnapshot
7192152    ./cache

Even after finding out the bottleneck dirs and trying to clear up a bit, continued facing that inconsistently shown in two commands and if you're likely to be stunned like me and try … to move some files to a different filesystem to free up space or assigned inodes with a hope that shown inconsitency output will be fixed as it might be caused  due to some kernel / FS caching ?? and this will eventually make the mounted FS to refresh …

But unfortunately, if you try it you'll figure out clearing up a couple of Megas or Gigas will make no difference in cmd output.

In my exact case /var/lib/mysql is a separate mounted ext4 filesystem, however same issue was present also on a Network Filesystem (NFS) and thus, my first thought that this is caused by a network failure problem or NFS bug turned to be wrong.

After further short investigation on the inodes on the Filesystem, it was clear enough inodes are available:

# df -i /var/lib/mysql
Filesystem       Inodes  IUsed   IFree IUse% Mounted on
/dev/sdb5      1221600  2562 1219038   1% /var/lib/mysql


So the filled inodes count assumed issue also has been rejected.
P.S. (if you're not well familiar with them read manual, i.e. – man 7 inode).

– Remounting the mounted filesystem

To make sure the filesystem shown inconsistency between du and df is not due to some hanging network mount or bug, first logical thing I did is to remount the filesytem showing different in size, in my case this was done with:

# mount -o remount,rw -t ext4 /var/lib/mysql

For machines with NFS remote mounted storage locations, used:

# mount -o remount,rw -t nfs /var/www

FS remount did not solved it so I continued to ponder what oddity and of course I thought of a workaround (in case if this issues are caused by kernel bug or OS lib issue) reboot might be the solution, however unfortunately restarting the VMs was not a wanted easy to do solution, thus I continued investigating what is wrong …

Next check of course was to check, what kind of network connections are opened to the affected hosts with:

# netstat -tupanl

Did not found anything that might point me to the reported different Megabytes issue, so next step was to check what is the situation with currently opened files by running processes on the weird df / du reported systems with lsof, and boom there I observed oddity such as multiple files


# lsof -nP | grep '(deleted)'

mysqld   2588  mysql    4u   REG 253,17      52     0  1495 /var/lib/mysql/tmp/ibY0cXCd (deleted)
mysqld   2588  mysql    5u   REG 253,17    1048     0  1496 /var/lib/mysql/tmp/ibOrELhG (deleted)
mysqld   2588  mysql    6u   REG 253,17       777884290     0  1497 /var/lib/mysql/tmp/ibmDFAW8 (deleted)
mysqld   2588  mysql    7u   REG 253,17       123667875     0 11387 /var/lib/mysql/tmp/ib2CSACB (deleted)
mysqld   2588  mysql   11u   REG 253,17       123852406     0 11388 /var/lib/mysql/tmp/ibQpoZ94 (deleted)


Notice that There were plenty of '(deleted)' STATE files shown in memory an overall of 438:


# lsof -nP | grep '(deleted)' |wc -l

As I've learned a bit online about the problem, I found it is also possible to find deleted unlinked files only without any greps (to list all deleted files in memory files with lsof args only):


# lsof +L1|less

The SIZE field (fourth column)  shows a number of files that are really hard in size and that are kept in open on filesystem and in memory, totally messing up with the filesystem. In my case this is temp files created by MYSQLD daemon but depending on the server provided service this might be apache's www-data, some custom perl / bash script executed via a cron job, stalled rsync jobs etc.

2. Check all the list open files with the mysql / root user as part of the the server filesystem inconsistency debugging with:


– Grep opened files on server by user

# lsof |grep mysql
mysqld    1312                       mysql  cwd       DIR               8,21       4096          2 /var/lib/mysql
mysqld    1312                       mysql  rtd       DIR                8,1       4096          2 /
mysqld    1312                       mysql  txt       REG                8,1   20336792   23805048 /usr/sbin/mysqld
mysqld    1312                       mysql  mem       REG               8,21      24576         20 /var/lib/mysql/tc.log
mysqld    1312                       mysql  DEL       REG               0,16                 29467 /[aio]
mysqld    1312                       mysql  mem       REG                8,1      55792   14886933 /lib/x86_64-linux-gnu/


# lsof | grep root
COMMAND    PID   TID TASKCMD          USER   FD      TYPE             DEVICE   SIZE/OFF       NODE NAME
systemd      1                        root  cwd       DIR                8,1       4096          2 /
systemd      1                        root  rtd       DIR                8,1       4096          2 /
systemd      1                        root  txt       REG                8,1    1489208   14928891 /lib/systemd/systemd
systemd      1                        root  mem       REG                8,1    1579448   14886924 /lib/x86_64-linux-gnu/

Other command that helped to track the discrepancy between df and du different file usage on FS is:

# du -hxa  / | egrep '^[[:digit:]]{1,1}G[[:space:]]*'


3. Fixing large files kept in memory filesystem problem

What is the real reason for ending up with this file handlers opened by running backgrounded programs on the Linux OS?
It could be multiple  but most likely it is due to exceeded server / client interactions or breaking up RAM or HDD drive with writing plenty of logs on the FS without ending keeping space occupied or Programming library bugs used by hanged service leaving the FH opened on storage.

What is the solution to file system files left in memory problem?

The best solution is to first fix custom script or hanged service and then if possible to simply restart the server to make the kernel / services reload or if this is not possible just restart the problem creation processes.

Once the process is identified like in my case this was MySQL on systemd enabled newer OS distros, just do:



# systemctl restart mysqld.service

or on older init.d system V ones:

# /etc/init.d/service restart

For custom hanged scripts being listed in ps axuwef you can grep the pid and do a kill -HUP (if the script is written in a good way to recognize -HUP and restart the sub-running process properly – BE EXTRA CAREFUL IF YOU'RE RESTARTING BROKEN SCRIPTS as this might cause your running service disruptions …).

# pgrep -l

# kill -HUP PID


Now finally this should either mitigate or at best case completely solve the reported disagreement between df and du, after which the calculated / reported disk space should be back to normal and show up approximately the same (note that size changes a bit as mysql service is writting data) constantly extending the size between the two checks.


# df -hk /var/lib/mysql; du -hskc /var/lib/mysql
Filesystem       Inodes  IUsed   IFree IUse% Mounted on
/dev/sdb5        19097172 3472744 14631296  20% /var/lib/mysql
3427772    /var/lib/mysql
3427772    total


What we learned?

What I've explained in this article is why and how it comes that 'zoombie' files reside on a filesystem
appearing to be eating disk space on a mounted local or network partition, giving strange inconsistent
reports, leading to system service disruptions and impossibility to have correctly shown information on used
disk space on mounted drive.

I went through with some standard logic on debugging service / filesystem / inode issues up explainat, that led me to the finding about deleted files being kept in filesystem and producing the filesystem strange sized / showing not correct / filled even after it was extended with tune2fs and was supposed to have extra 50GBs.

Finally it was explained shortly how to HUP / restart hanging script / service to fix it.

Some few good readings that helped to fix the issue:

What to do when du and df report different usage is here
df in linux not showing correct free space after file removal is here
Why do “df” and “du” commands show different disk usage?

The evils of the Corporate Business and the Multi National Business crimes – What is the legal status of a International Corporation Company? – The Corporation – A documentary movie on the birth of modern Corporations and Multinational businesses

Friday, December 14th, 2012

Reading Time: 5minutes


Some 5 years ago, while I was still studying in International College Albena (International College Dobrich, Bulgaria) also historically known under the name "International College Albena", In one of my regular Logistics (lectures), we were Projected a movie by our professor Mr. Bojidar Bojkov.
Usually I take no interest in educational presentations as most of them is obsolete junk more or less not reflecting the real life reality and is some abstract "pseudo"-science concepts. This time it was different me and my IBMS (International Business Management Studies) study fellows were projected a very informative movie called The Corporation.

The Corporation is a movie containing elements of propaganda as it is trying to proof (convince) the public – that modern society should be much more critical and active in measures against the bad-ness of multi-national corporations and many of the Fortune top 500 profitable businesses

As every kind of movie it is more-or-less manipulative and the author tries to impose his idea about "the evil corporations". The topic of Corporate Citizenship is a modern topic in Business and every large size businesses is claiming to hold a very high standards of "corporate citizenship" and being loyal or green and environmental friendly Green and environment friendliness "buzz-word mantra like words" are everywhere, from the littlest company operating on a single Country Market to the largest and most "respected" companies like BP – (British Petroleum).

It is a public "secret", that most of the succeesful business organizations (be it profit or non-profit) is a dirty and devilish undertaking driven with the one and only goal to enrich the shareholder/s wealth. The organization is usually not governed by the shareholders but assigned management is assigned to supervise the organizations and take the management decisions concerning the org. wealth and power increase.

It is evident noticable fact, that the bigger a business or company is the more likely it is to be functioning efficiently and to provide lower product prices on the market. The reason is middle and big size corporations dispose themselves with "BIG MONEY" – huge financial investments (many of which are with doubtful origin) ….

The expension of USA and UK (English), model of business gave a collapse to any alternative forms of company functionining except – the western model. However the severe economic crisis clearly indicates – "The Western Business Model" which is backboned by such a solid and good theoretical base is not working as expected in practice. Though with the worsening crisis over the last few years it is more and more evident that something need to change fundamentaly on global scale in how private businesses and organizations (westerned) model organizations function, still there is nearly noone doing anything. Instead America is continously following their 'good old' well known "Create Wars and Conflicts Strategy". Where mostly all non western modelated countries or any kind of "untracked" business out of the western model is deliberatily being killed by creating (financing) internal conflicts inside countries (like it happened recently in Egypt), like it happens with the war in Syria and like happened in Vietnam some years back.

There are still some countries in the world, trying to fight-back the broken western unified (international one system) model tendency of the west like Russia and Belarus and hopefully some other Countries whose economics are showing negative results, but in general it seems the 'Western Corporate model' will take over in short future.
There is an easy solution to the problem 'raise awareness' of the corporate badness, limit corporations on a local governmental basis and foster a business climate, where start-up and little and middle sized companies are encouraged to rise-up, parallely with dramatical rise in taxation over large corporate multination-business entities …
But in order for this to happens it is necessary the majority of people to realize about the Corporations problem and deliberately and peacefully work each on individual base (and according to his abilities) against the 'Evil Corporations Structural (New-World Order) like Empire'

One of this Raise-UP Awareness against the badness of Business-es of the High Scale is The Corporation movie. I'm sure anyone who is interested in knowing how stuff works and how modern economy works would definitely learn a lot from the movie.


The Corporation- A Documentary Movie on curious facts about evils of Multi-National Corporations and "International Businesses"

It is rather paradoxically that the movie came to see the light of day by the University of British Columbia. A movie which criticizes the Western Corporate model was done by a Western (British) University. The movie was primary conducted and made by a law professor Joel Bakan

The documentary examines the modern-day corporation, considering its legal status as a class of person and evaluating its behaviour towards society and the world at large as a psychiatrist might evaluate an ordinary person.

It is rather interesting fact to learn, that probably most not know that in modern times in most countries (if not all), the Corporation is being perceived from a Legal stand-point as 'An ordinary person (citizen) Entity'. Yeah that's right, non-human "being" is legally perceived as human and has all the rights and duties of an ordinary citizen. The big problem with this is the impact is has on general cotiety. An ordinary human could "kill" someone blow off a bomb and kill hundreds but cannot be blamed for killing few millions or leaving a billion of people poor or on the threshold of starvation, but Corporation as having the legal status of a Country Citizen sadly can ….

In the end of the movie after a few typical corporations are examined – a psychiatry diagnosis is set the Corporation (Multi-National) Business Model is diagnosed as Psychopat. The movie also gives a very interesting information concerning some Top Brands and products – like Coca Cola, Fanta, IBM etc. etc.

It is worthy to mention just of them – Fanta used to be invented and was known as 'The Nazis Drink' as in Nazist Germany it was drinked as Substitute for the American way drink (TM) – Coca Cola.

Other interesting facts is back in the day and even probably to this day Coca Cola placed – real quantity of Cocain in their drink leading to addiction – and tried various methods to manipulate the minds of the Consumer in Advertisements of their products. What striked me personally the most was the fact IBM (International Business Machines), were selling identification systems to Hitler and the Nazis in order to number the Jewish prisoners in concentration camps. Noone cares nowadays and still IBM – known also as (The Blue Elephant) is still operating profitably and one of the most important players in the field of IT and Computer Equipment, nevertheless the unhuman crime they did by selling systems which were used by German Officers whose killed millions of Jews and other non-Aryans …

It is rather uneasy to think that the same Corporation which helped indirectly for killing millions helped and played kill role of development of the Personal Computer – The Laptop, the Mobile Phones, Modern Genetics, Implants, The Internent and well you name it …

Here is also a short explanation of the Movie from Wikipedia:

" The film features interviews with prominent corporate critics such as Noam Chomsky, Naomi Klein, Michael Moore, Vandana Shiva, Charles Kernaghan, and Howard Zinn as well as opinions from company CEOs such as Ray Anderson (from the Interface carpet & fabric company), the viewpoints of Peter Drucker and Milton Friedman, and think tanks advocating free markets such as the Fraser Institute. Interviews also feature Dr. Samuel Epstein with his involvement in a lawsuit against Monsanto Company for promoting the use of Posilac, (Monsanto's trade name for recombinant Bovine Somatotropin) to induce more milk production in dairy cattle. "

Though the movie outlines so much important facts, that should be known by any Business Student out – there or any person somehow involved in Business, I have the impression most of the people out there never watch it. Thus I hope my little article will make it a bit more popular and bring some more people to realize, that Corporations Culture and Evils should be opposed and mitigated on individual and society level!

How to solve qmail-inject: fatal: qq temporary problem (#4.3.0) Qmail and Qmail Scanner problems on Debian Linux Wheezy

Monday, October 16th, 2017

Reading Time: 3minutes


Below QMAIL error

qmail-inject: fatal: qq temporary problem (#4.3.0)

occured to me right after upgraded from Debian Linux Squeeze 6 to Debian 7 Wheezy,

qmail-inject: fatal: qq temporary problem (#4.3.0) is really terrible error and I only experienced that error in my Thunderbird during sending mails, mail receiving doesn't work either, so as normally when there are problems with Qmail its a lot of puzzling until you get it.

There is no even trace in logs on what might be causing it, strangely enough nothing in qmail-smtpd, qmail-send logs, the mail server and all components seemed to work perfectly fine I checked whether there are libraries that are missing with a small loop line as follows:


root@pcfreak:/var/log/qmail/qmail-smtpd# for i in $(ls -1 /var/qmail/bin/*); do ldd $i |grep -i "not found"; done


The absence of result indicates, all binaries are properly linked and no found mmissing libraries.

After investigating closely what might be wrong and reading comments on Thibs QmailRocks Install Qmail-Scanner page, I realied
the error might be caused, because of problems with suid perl, as I already checked my earlier post in which I seemed to have faced the same qmail-inject: fatal: qq temporary problem (#4.3.0) error on Debian Wheezy and explained the possible reasons what might be causing the qq qmail error  here as well


and a related issue I experienced earlier with qmail scanner unable to create files in previous article hereSuid Perl no longer available as a package and therefore because of the inability of perl to run as root anymore in Debian Wheezy, script did not work either.

root@pcfreak:/downloads/simscan-1.4.0# 320  echo "hi, testing." > /tmp/mailtest.txt
root@pcfreak:/downloads/simscan-1.4.0# env QMAILQUEUE=/var/qmail/bin/qmail-scanner-queue /var/qmail/bin/qmail-inject < /tmp/mailtest.txt
qmail-inject: fatal: qq permanent problem (#5.3.0)

root@pcfreak:/downloads/simscan-1.4.0# /var/qmail/bin/qmail-scanner-queue



A short note to make here is qmail-scanner-queue and are set with suid bit set as follows:

root@pcfreak:/home/hipo/info# ls -al /var/qmail/bin/{qmail-scanner-queue,}
-rwsr-sr-x 1 qscand qscand   6814 окт 14 17:22 /var/qmail/bin/qmail-scanner-queue*
-rwsr-sr-x 1 qscand qscand 158880 окт 14 23:52 /var/qmail/bin/*

Good to say here is qmail-scanner-queue is a suid wrapper binary that actually invokes

root@pcfreak:/downloads/simscan-1.4.0# su hipo
hipo@pcfreak:/downloads/simscan-1.4.0$ /var/qmail/bin/ -g
perlscanner: generate new DB file from /var/spool/qscan/quarantine-events.txt
hipo@pcfreak:/downloads/simscan-1.4.0$ exit

root@pcfreak:/downloads/simscan-1.4.0# cp /downloads/qmail-scanner-2.11st/contrib/logrotate.qmail-scanner /etc/logrotate.d/qmail-scanner
root@pcfreak:/downloads/simscan-1.4.0# chmod 644 /etc/logrotate.d/qmail-scanner
root@pcfreak:/downloads/simscan-1.4.0# cd /downloads/qmail-scanner-2.11st/contrib
root@pcfreak:/downloads/qmail-scanner-2.11st/contrib# chmod 755
root@pcfreak:/downloads/qmail-scanner-2.11st/contrib# ./ -doit
Sending standard test message – no viruses… 1/4
qmail-inject: fatal: qq temporary problem (#4.3.0)
Bad error. qmail-inject died

This are the other things, I've done to fix possible permission issues

root@pcfreak:/downloads/qmail-scanner-2.11st/contrib#  sudo -u qscand /var/qmail/bin/ -z
root@pcfreak:/downloads/qmail-scanner-2.11st/contrib# chown qscand:qscand /var/spool/qscan/qmail-scanner-queue-version.txt

In /etc/sudoers add following lines:

root@pcfreak:~# vim /etc/sudoers

ALL ALL=(qscand) NOPASSWD: /var/qmail/bin/
##necroleak ALL=(ALL) ALL

root@pcfreak:/downloads/qmail-scanner-2.11st/contrib# cat /etc/sudoers

# /etc/sudoers
# This file MUST be edited with the 'visudo' command as root.
# See the man page for details on how to write a sudoers file.

Defaults    env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL
hipo    ALL=(ALL) ALL
ALL ALL=(qscand) NOPASSWD: /var/qmail/bin/
##necroleak ALL=(ALL) ALL
# Allow members of group sudo to execute any command
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#includedir /etc/sudoers.d

In case you wonder why we put the line in /etc/sudoers:


The reason behind this is that by default sudo resets the environment variables when executing the command. Thus qmail-scanner cannot recognize the important info regarding the incoming mail and treats everything as coming from localhost, which leads to passing everything without scanning. The above line preserves the important ENV variables for qmail-scanner.

In /etc/sudoers add following lines:

root@pcfreak:/downloads/qmail-scanner-2.11st/contrib# vim /var/qmail/bin/

Right after comments or in Line 1  ADD

my $real_uid="qscand";

my $effective_uid="qscand";

Also somewhere in the beginning of scripts lets say after above two variable declarations add:

$whoami = getpwuid($<) || "unknown";
if($whoami ne "qscand") {
    exec("/usr/bin/sudo -u qscand /var/qmail/bin/") || die;

To prevent your users logged in on physical console and via SSH it is necessery to disable emergency logs for users in syslog / rsyslog, otherwise due to bug, users will logged in will get flooded with messages such as:

Message from syslogd@pcfreak at Oct 15 16:43:04 … qmail-scanner[6834]: Clear:RC:0( 2.959242 10574 Светлана_Георгиева_оставила_Вам_личное_соо� <36b63ec9a0ce7ecc570de2fcbba6ed73@localhost.localdomain> 1508074981.6836-1.pcfreak:6219 1508074981.6836-0.pcfreak:545


open /etc/rsyslog.conf and find the line starting with:

root@pcfreak:~# vim /etc/rsyslog.conf



right after it so it reads like:


Fixing Disappeared intel net link 5100 wifi on Toshiba Satellite L300 1YA

Friday, October 29th, 2010

Reading Time: 2minutes

I've recently had to fix a Toshiba Satellite L300 1YA notebook , running the shitty Windows Vista operating system.
For some reason suddenly the Net Link 5100 Wi-FI Network Adapter of the laptop mysteriously disappeared.
The led indicating the device is enabled was blinking the driver showed properly installed in Windows -> System and everything.
Even though that the wireless network scanning in the notebook was not working.

In networking in System there were two lines showing up with excalammation mark "!".

To fix the mess it took me 3.5 hours. I tried many things first logical thing I tried was reinstalling the driver with the latest available from Intel's website. Anyways this doesn't helped so I was about to think about other solutions.
What made thinks even worse was that the Vista installed was in Chineese!, yes you red this correctly chineese. You cannot imagine what a hell it is to deal with Windows whose language pack was Chineese …

The Vista had installed also the Chineese antivirus program Rising which also provided the system with some weird firewall and this made the dealing with the problem even more complicated.

After many tries I finally completely removed the wireless driver on the system and reinstalled it with the latest version from Intel's website.
Thanksfully after a couple of reboots and going into save mode the Intel Net Link 5100 started working again by itself?!

Well you know how things goes with Windows, you never know what will happen next.

Maybe a lot of notebooks suffer the same weird issue with Wireless Wi-Fi adapter suddenly stopping to work.

So now you know the solution, remove the driver install it again, restart and it should be working again.
Hope this quick and dirty article will save somebody an hours of time to figure it out …

Psychological instability and the gap between desire and reality

Wednesday, August 7th, 2013

Reading Time: 3minutes

sad reality - bulgarians see no future, protests in bulgaria are the least people can do

I'm in Sofia just for a few days and I'm stunned how expensive is life here if compared to people's revenues. I think it is almost impossible to live normal live in Sofia with money lower than 500 eur. I'm here for a  4 day with my Belarusian girlfriend and I'm trying not to spend too much and already spend about 200 EUR. This makes 50 euro per two person a day and this is just for going outside public transport Metro, Buses and taxis. This makes about 50 euro per day or 25 euro a day required for person to live normal (not at all luxury life) … It is no strange that people are protesting for already about 50 days here in Sofia and that Bulgarians are heavily drinking and smoking and don't want to work. Our Bulgarian nation is depressed and there is a good reason for that. We are forced to live almost like animals. There are no money for renovation the buildings, no money to eat properly, young people's morale is totally messed up for the reason culture here is almost dead or even the one that's left is heavily  connected with godlessness, sexuality and consumerism. It is no strange our structures politics and infrastructure here is so messed up. It all starts with people's messed heads and all this gets materialized in our daily lives … Money are the main aim of living of young people and life here is made in a way that you have to only strive after money and for money you should learn to do anytihng … I just don't understand how we ended up here, its quite a pain especially as I lived in end up communistic Soviet time sand I remember people was not so much after money as there was money for normal almost middle class life in Socialistic Bulgaria … There are plenty of knowledgeable people in my dear homeland. Plenty of brilliant and good people but most emigrate for the reason here conditions of living has become extremely abnormal. Truth is European union totally smashed us. With all this shop chains in Western model like Lidl and Billa  made just to collect even our last money and the lack of industry, if something doesn't change ASAP we will simply be cleaned up of the face of the world or at least noone will stay in this country. There are plenty of emigrants already, the problem is even in western europe and most other countries there is big problem with unemployment so even if we Bulgarians try to go out we can't find job. I know this post is a big rant but I feel sad for my beautiful homeland. We have one of the most beautiful natures in Europe, we have Sea Beaches and Mountains, we have culture of 15 centuries and own well developed language. But it seems we're loosing our identity day by day. Almost everywhere you go you hear some music in English – even though most people in Bulgaria do not speak decent English and are far from understanding music in English I more and more think there is almost straight logic information in English. Most song lyrics are just fractured and incomplete or messed up, mostly speaking about evil than good. It is tragedy how young people spend there time here in Bulgaria for nothing hanging in pubs and bars spending money for alcohol and cigarettes trying to waste themselves for the only reason they see no future …

Richard stallman (father of free software) interview – Stallman: Google+ and Facebook mistreat their users

Thursday, July 12th, 2012

Reading Time: < 1minute


The father of free software, mr. Richard Stallman is notorious for his critical mind and software freedom activism quite well.

While checking some of his speaches and interviews, I came across another interesting, one here RMS critices and exposes the bad and evilness of fb and Google+.

Interview with Richard Stallman – Stallman: Facebook and Google+ Mistreat Their Users


People unaware of computer networks, programming, Unix and the deep computing so to say definitely didn't understand the profoundness of upcoming problems of so called "social networks". The Facebook and Google+ Mistreat Their Users video is also to be found in youtube under name Richard Stallman: Facebook IS Mass Surveillance .

Its a pity Stallman is mostly popular only among specific users like me which are already 'dubbed' into free software and have a belief that computer software should be free. Hopefully as time passes more and more people will be awakened to listen to his speeches and realize the severeness of problems, we face nowdays by simply accepting almost anything new without much privacy concerns …
If you're a free software enthusiast like me, please take the time to share the video and whistle-blow about the problem to as many non-tech pc users as possible 🙂

SuperMarket Secrets and Deception a video explaining the badness of use of super-markets and how super market chains lie to us

Saturday, June 23rd, 2012

Reading Time: 3minutes

(AKA "How To Avoid Being Fooled at the Supermarket")

Today almost every country in both the developed the less-developed and the under-development world has already largely adopted the super market buying culture.
Not that the people are so keen on buying from super-market but rather it is the people with money business-es has slowly "forced" those fake buying culture.

Though things are organized so well and it seems like the supermarket is a great place all made to benefit the client it is exactly the other way around. The truth is the whole super-market with the most little details was designed to benefit the company owning the market.

Below is an interesting documentary, showing parts of how foods are processed before they enter the super-market shelf. Also it is explained, how the strive for perfect looking products takes its toll in terms of end-client quality. Though many fruit and vegetables looks perfectly looking (perfectly shaped) the nutrition this perfect vegs and fruits is often inferior to grown foods which are less symmetrical. Often this is evident even by tasting the fruits and vegetables bought, they somehow are tasteless or whether you eat it feels like you eat plastic.

The movie also wents through showing a lot of farms for growing cows for beef and milk and the bad conditions the animals lives their whole short live on earth. Also the fast food injections the animals are given often results in unexpected animal disease. The lack of movement and the short living space for animals is another severe problem as most of the animals does not grow the way God intended them to when he created the earth animals and us.

The offers to get 3 for the price of 1 or "pay 1 get 2" that so many super-market offer today is another sad story.

The expenses for this fall on the producer and the client instead on the super-market franchiser.

Another severe problem is the 'international logistics' applied by mostly all large super-market chains. At many cases foods grown or breed has to travel hundreds or thousands of kilometers for something as simple as cutting the meat or vegs and packaging them. So a food produced just 50 or 100 kilometers away from the local super-market from where we buy travels some 500 kilometers for the packaging and then comes back packaged in the super-store. As you can guess this increases significantly the price of the product for us the buyers and besides that creates a large environmental contamination.

Also the movie shows that often fruits and vegetables one can buy from local open market are both more nutritious than in super-markets as well as can be gotten on lower price.

Knowing all this it makes one wonder why anyone still is buying from the super-market. Well let me tell you it is because of habit. Through the last 50 years in most countries large supermarket chains successfully imposed the New Age super market culture. As a result for youngsters it is absolutely natural to purchase goods from the super market and buying from anywhere else is considered nowdays unusual.

The result of the lack of nutritious food we buy from the super market severe affects our health and budget. In many countries the over fatness of youngsters is a severe problem.

This problem has a direct relation with the culture of eating junk package food introduced within super markets as well as the over consumption which took place the last years again "thanks" to the huge increase of advertisement influence on people behavior and supermarkets profit only concerned company policies.

Intel and IBM future tech world vision about the world, do we really want this?

Saturday, June 30th, 2012

Reading Time: 2minutes


I'm quite a visionary person as such I'm always interested to prognosis on what the world might look like few years from now. Below are two videos showing IBM and Intel's vision on what might future bring us. I don't know about you but I'm strong in my conviction that I DON'T WANT TO LIVE IN SUCH WORLD. I'm pretty sure that many other people share my opinion that such a world is not fun and is far from what really we're supposed to live. The sad thing is the corporations are already powerful enough to impose their vision and make the vision reality.

It is my understanding that the main problem we have to solve is not how we can embed better or newer technology to change our life (for good?) but rather how we can get out of the trap of living in a fake world like the one displayed in the video. Obviously the vision of this two giant companies is not far from what we're forewarned in the holy bible in Revelation. In revelation we read that there will be a unified system, where everything and everyone on this earth will be market and whoever does not have the mark "of the beast" he will not be able to buy or sell within the system. This prophecy closely matches the vision of future marketing offered as a possible outcome by IBM. I don't think IBM have red in Revelation to get their idea on their infernal system shown within their vision of supermarket video

The logical conclusion might dirive therefore is there is a higher force who leads IBM (and possible most if not all of corporations) on creating the fake tech-nocrat culture society which is building right in front our eyes.
The destruction of real communities and the worsening conditions within the Orthodox Church are another symptom that the End Times as prophecised centuries before are closer than we think.

It is my firm believe that people who does understand about this problem should start uniting and say no to technology innovation that leads us in this technological trap ,,,,,

I'm sure even people who does not have a believe in Jesus Christ and are not Christian from other religions are also seeing that the direction this world has taken up is dark.
We should be very dumb and blind not to see that technology is boxing us and leading us to a modern day techno slavery …..

Intel | Future Technology | Vision

IBM's vision on how future market might look like

Howto add Bulgarian Phonetic keyboard set to Windows XP

Wednesday, September 23rd, 2009

Reading Time: < 1minute
There is a nice site in Bulgarian explaining quite extensively how to add Bulgarian phonetic key set on Injinera’s Website. Another way to solve the problem is to use bgphon_xp program.