Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sharness: t0235-cli-request failure #2528

Closed
ghost opened this issue Apr 4, 2016 · 3 comments
Closed

sharness: t0235-cli-request failure #2528

ghost opened this issue Apr 4, 2016 · 3 comments
Labels
topic/test failure Topic test failure

Comments

@ghost
Copy link

ghost commented Apr 4, 2016

Passed on TeamCity, failed on CircleCI: https://circleci.com/gh/ipfs/go-ipfs/3348

*** t0235-cli-request.sh ***
./t0235-cli-request.sh
# TEST_VERBOSE=1
# TEST_NO_FUSE=1
# TEST_EXPENSIVE=1
# TEST_OS=LINUX
expecting success: 
        export IPFS_PATH="$(pwd)/.ipfs" &&
        ipfs init -b=1024 > /dev/null

ok 1 - ipfs init succeeds

expecting success: 
        mkdir mountdir ipfs ipns &&
        test_config_set Mounts.IPFS "$(pwd)/ipfs" &&
        test_config_set Mounts.IPNS "$(pwd)/ipns" &&
        test_config_set Addresses.API "/ip4/127.0.0.1/tcp/0" &&
        test_config_set Addresses.Gateway "/ip4/127.0.0.1/tcp/0" &&
        test_config_set --json Addresses.Swarm "[
  \"/ip4/0.0.0.0/tcp/0\"
]" &&
        ipfs bootstrap rm --all ||
        test_fsh cat "\"$IPFS_PATH/config\""

ipfs config  "Mounts.IPFS" "/home/ubuntu/.go_workspace/src/github.com/ipfs/go-ipfs/test/sharness/trash directory.t0235-cli-request.sh/ipfs"
ipfs config  "Mounts.IPNS" "/home/ubuntu/.go_workspace/src/github.com/ipfs/go-ipfs/test/sharness/trash directory.t0235-cli-request.sh/ipns"
ipfs config  "Addresses.API" "/ip4/127.0.0.1/tcp/0"
ipfs config  "Addresses.Gateway" "/ip4/127.0.0.1/tcp/0"
ipfs config --json "Addresses.Swarm" "[
  "/ip4/0.0.0.0/tcp/0"
]"
/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx
/ip4/104.236.176.52/tcp/4001/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z
/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM
/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64
/ip4/128.199.219.111/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu
/ip4/162.243.248.213/tcp/4001/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm
/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd
/ip4/178.62.61.185/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3pNLQpmmEk35v6wYtsMGLzSr5QBU3
ok 2 - prepare config -- mounting and bootstrap rm

expecting success: 
        ipfs daemon $args >actual_daemon 2>daemon_err &

ok 3 - 'ipfs daemon' succeeds

expecting success: 
        test_wait_for_file 20 100ms "$IPFS_PATH/api"

ok 4 - api file shows up

expecting success: 
        API_MADDR=$(cat "$IPFS_PATH/api") &&
        API_ADDR=$(convert_tcp_maddr $API_MADDR) &&
        API_PORT=$(port_from_maddr $API_MADDR) &&

        GWAY_MADDR=$(sed -n "s/^Gateway (.*) server listening on //p" "$daemon_output") &&
        GWAY_ADDR=$(convert_tcp_maddr $GWAY_MADDR) &&
        GWAY_PORT=$(port_from_maddr $GWAY_MADDR)

ok 5 - set up address variables

expecting success: 
        ipfs swarm addrs local > addrs_out &&
        SWARM_MADDR=$(grep "127.0.0.1" addrs_out) &&
        SWARM_PORT=$(port_from_maddr $SWARM_MADDR)

ok 6 - set swarm address vars

expecting success: 
        IPFS_PID=$! &&
        pollEndpoint -ep=/version -host=$API_MADDR -v -tout=1s -tries=60 2>poll_apierr > poll_apiout ||
        test_fsh cat actual_daemon || test_fsh cat daemon_err || test_fsh cat poll_apierr || test_fsh cat poll_apiout

ok 7 - 'ipfs daemon' is ready

expecting success: 
    go-sleep 0.5s | nc -l 5005 > nc_out &
    ipfs cat /ipfs/Qmabcdef --api /ip4/127.0.0.1/tcp/5005 || true

Error: api not running
ok 8 - can make http request against nc server

expecting success: 
    test_expect_code 1 grep multipart nc_out

ok 9 - output does not contain multipart info

expecting success: 
    grep "POST /api/v0/cat" nc_out

not ok 10 - request looks good
#   
#       grep "POST /api/v0/cat" nc_out
#   

expecting success: 
    test_expect_code 1 grep "api=/ip4" nc_out

ok 11 - api flag does not appear in request

expecting success: 
        kill -0 $IPFS_PID

ok 12 - 'ipfs daemon' is still running

expecting success: 
        test_kill_repeat_10_sec $IPFS_PID

ok 13 - 'ipfs daemon' can be killed

# failed 1 among 13 test(s)
1..13
make[1]: *** [t0235-cli-request.sh] Error 1
make: *** [test_sharness_expensive] Error 2
@ghost ghost added the topic/test failure Topic test failure label Apr 4, 2016
@ghost ghost mentioned this issue Apr 4, 2016
1 task
@whyrusleeping
Copy link
Member

This look like netcat got into a port conflict.

@kevina
Copy link
Contributor

kevina commented Sep 25, 2016

I am having the same problem. For right now #2634 disable this test as it fails on my local machine.

@whyrusleeping
Copy link
Member

I remember this being an issue with netcat. We havent seen it in a while, assuming it was fixed because we kill netcat better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/test failure Topic test failure
Projects
None yet
Development

No branches or pull requests

2 participants