title: RPC: Unable to receive; errno = Connection refused
body: <p>I am trying to do a simple Sun RPC program which is a phonebook. It sends and receives commands like adding or removing someone to server and server responds back with a message.</p>
  
  <p>When I run the both programs(Server and Client) after the first command it closes unexpectedly and got this error</p>
  
  <pre><code>RPC: Unable to receive; errno = Connection refused
  </code></pre>
  
  <p>I already checked and <code>rpcbind</code> and <code>portmap</code> is installed.</p>
  
  <p>And here is my <code>rpcinfo</code> output:</p>
  
  <pre><code>   program version netid     address                service    owner
      100000    4    tcp6      ::.0.111               portmapper superuser
      100000    3    tcp6      ::.0.111               portmapper superuser
      100000    4    udp6      ::.0.111               portmapper superuser
      100000    3    udp6      ::.0.111               portmapper superuser
      100000    4    tcp       0.0.0.0.0.111          portmapper superuser
      100000    3    tcp       0.0.0.0.0.111          portmapper superuser
      100000    2    tcp       0.0.0.0.0.111          portmapper superuser
      100000    4    udp       0.0.0.0.0.111          portmapper superuser
      100000    3    udp       0.0.0.0.0.111          portmapper superuser
      100000    2    udp       0.0.0.0.0.111          portmapper superuser
      100000    4    local     /run/rpcbind.sock      portmapper superuser
      100000    3    local     /run/rpcbind.sock      portmapper superuser
   553523285    1    udp       0.0.0.0.3.222          -          superuser
   553523285    1    tcp       0.0.0.0.3.223          -          superuser
  </code></pre>
  
  <p>The server procedures run normal, I put printf in server side and it shows the server is running but cannot send message back to the client!</p>