in sandbox mode: bfs client can not put file to bfs
- Dominant language
- C++
- Stars
- 2.8k
- Forks
- 551
- PR merge metrics
- No merged PRs in 30d
Description
## 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**".
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the sandbox failure with ./bfs_client put bfs_client / using the default /etc/hosts entries, then read src/sofa/pbrpc/rpc_byte_stream.h, src/rpc/rpc_client.h, and src/sdk/file_impl.cc around the logged connection and AddBlock paths. Done means the client can put a file in sandbox mode without requiring the ::1 entry to be removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100