could not write data to host: Connection refused in write()