The urandom and random device nodes in each site's filesystem may be set with wrong major and minor nodes. This was an issue in versions prior to Ensim Pro 3.5.10 and was fixed in Ensim Pro 3.5.10. However, sites pre-existing before 3.5.10 will still have these values wrong and should be repaired manually. Symptoms may include frontpage access logs failing to rotate or be processed. Programs that rely on the blocking feature or non-blocking feature of the 'random' device nodes may block forever.
You can identify the device nodes that have this problem by listing it and checking the major and minor values. Example for site1
ls -l /home/virtual/site1/fst/dev/*random
| crw-r--r-- 1 root root 1, 9 Jun 16 18:29 /home/virtual/site1/fst/dev/random
| crw-r--r-- 1 root root 1, 8 Jun 16 18:29 /home/virtual/site1/fst/dev/urandom
In the table above, the major and minor numbers are in bold red text, the minor number for random is '9', the minor number for urandom is '8'. These are incorrect, the minor number for random should be '8' and the minor number for 'urandom' should be '9'
|| Ensim Pro, Ensim Basic
|| 3.5.10+, 3.7.x, 4.x
|| Fedora, Red Hat 7.3
Solution is to remove the device nodes and rebuild, then reboot the server.
- For each affected site, remove dev/urandom and dev/random. Example for site1:
rm -f /home/virtual/site1/fst/dev/urandom
rm -f /home/virtual/site1/fst/dev/random
- Recreate the nodes. Example for site1:
mknod /home/virtual/site1/fst/dev/urandom -m 644 c 1 9
mknod /home/virtual/site1/fst/dev/random -m 644 c 1 8
- Reboot your server to clear processes that may be blocked. Alternatively, you may be able to simply kill the offending processes, you will need to identify the processes using 'ps' command. Instructions for identifying the processes are beyond the scope of this KB article.
Below is a script you can use to fix these nodes for a specific site. This is a bash script that will fix siteNNN. You pass to it the siteNNN as argument and it will repair.
--- cut here ---
rm -f /home/virtual/$SITE/fst/dev/urandom
rm -f /home/virtual/$SITE/fst/dev/random
mknod /home/virtual/$SITE/fst/dev/urandom -m 644 c 1 9
mknod /home/virtual/$SITE/fst/dev/random -m 644 c 1 8
--- cut here ---
It first removes the old device nodes, then adds them back with correct major and minor values.
If you want to run on all sites at once, put the script into a file such as 'fixrandomnodes.sh', make it executable and then use sitelookup command to iterate through all sites.
chmod +x fixrandomnodes.sh
for site in $(sitelookup -a site_handle); do ./fixrandomnodes.sh $site ; done