So, first blog entry, a milestone! One that will never, ever be achieved again. So, it begins…
I am using distcc over ssh to compile source code and have been getting the following distracting warning messages:
distccd (tcp_cork_sock) Warning: setsockopt(corked=1) failed: Socket operation on non-socket
The warnings can be prevented by setting the environment variable DISTCC_TCP_CORK=“0” on the server. However, it’s not enough to add this to your shell’s startup script on each server. The client is remotely executing the command ‘distccd’, so files like .bash_profile are never read. There are a couple options that will either set an system-wide environment variable on the server or make sure it’s pushed over from the client:
- Setting DISTCC_TCP_CORK in /etc/environment on the server 
- Setting DISTCC_TCP_CORK in your shell’s startup script, followed by using SendEnv and AcceptEnv in ~/.ssh/config and /etc/ssh/sshd_config on the client and server respectively
- Setting DISTCC_TCP_CORK in ~/.ssh/environment client side and using PermitUserEnvironment in /etc/ssh/sshd_config server side 
The first is the least amount of work, but all three will require root privileges on the server side if you have to change anything. The end result, no more tcp_cork_sock warnings from distccd! However, after reading through distcc’s manpage, I’m still curious to know what sort of performance hit, if any, is incurred from disabling TCP corks.