in sandbox mode: bfs client can not put file to bfs
The client log:
./bfs_client put bfs_client /
libsofa_pbrpc ERROR 2017/06/01-20:34:57.796539 7f93fe87c700 src/sofa/pbrpc/rpc_byte_stream.h:324] on_connect(): connect error: [::1]:8022: Connection refused
W 06/01 20:34:57.796672 137302 [./src/rpc/rpc_client.h:66] SendRequest to [::1]:8022 fail: RPC_ERROR_CONNECTION_CLOSED: init stream failed: Connection refused
W 06/01 20:34:57.796698 137302 [src/sdk/file_impl.cc:364] Chunkserver AddBlock fail: /bfs_client ret=0 status= kOK
The reason:
I have the default /etc/hosts setup as follows:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
When I comment out the second line in /etc/hosts, the system runs well.
I guess it is because the client attempts to connect with "[::1]" rather than "127.0.0.1", which can be found from the error log "connect error: [::1]:8022".