'how to rsyslog reads from a socket inside a jail environment

I have two sftp servers behind a loadbalancer where users log on in a chroot environment. Sometimes the user log in server1, sometimes in server 2. Also, there are a NFS shared between this two servers. My problem is, I have configured the rsyslog with a socket inside home in the NFS. But, it works only in one server. The two server can't share the same socket in /jailfs/$HOME/dev/log. I have tried to create more than one "../dev/log" in the $HOME, but seems like if I change the name "/dev/log" it doesn't work. If I restart the rsyslog service in the second server, it starts to work there, but stop to work in the first server. Follow my conf file inside /etc/rsyslog.d

template(name="DynFileuser1" type="string" string="/var/log/sftp/user1.log")

ruleset(name="user1"){
    if $programname == 'internal-sftp' then {
        action(type="omfile" dynaFile="DynFileuser1")
        stop
    }
}

input(type="imuxsock" Socket="/opt/sftp/PARTNERS/user1/dev/log" ruleset="user1")


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source