uber-node / tcurl

A command line utility to talk to tchannel servers
MIT License
36 stars 7 forks source link

Getting null pointer error on hostPortParts initialization #123

Closed Ryan-Yu closed 8 years ago

Ryan-Yu commented 8 years ago

Inconsistently getting this error about 25% of the time, my request works the other 75% of the time.

ryu@appdocker67-sjc1:~$ tcurl --timeout 1000 -p 127.0.0.1:`cat /var/cache/udocker/syrup/.tchannel-health-port-syrup` -t syrup.thrift syrup Syrup::fetch '{"request":{"shareToken":"AN8r_xKhcV"}}' | jq .

/usr/lib/node_modules/tcurl/node_modules/tchannel/trace/agent.js:64
    var hostPortParts = options.remoteName.split(':');
                                           ^
TypeError: Cannot call method 'split' of null
    at Agent.setupNewSpan (/usr/lib/node_modules/tcurl/node_modules/tchannel/trace/agent.js:64:44)
    at TChannelInRequest.setupTracing (/usr/lib/node_modules/tcurl/node_modules/tchannel/in_request.js:110:32)
    at new TChannelInRequest (/usr/lib/node_modules/tcurl/node_modules/tchannel/in_request.js:70:14)
    at TChannelV2Handler.buildInRequest (/usr/lib/node_modules/tcurl/node_modules/tchannel/v2/handler.js:910:15)
    at TChannelV2Handler.handleCallRequest (/usr/lib/node_modules/tcurl/node_modules/tchannel/v2/handler.js:270:20)
    at TChannelV2Handler.handleEagerFrame (/usr/lib/node_modules/tcurl/node_modules/tchannel/v2/handler.js:194:25)
    at TChannelConnection.handleReadFrame (/usr/lib/node_modules/tcurl/node_modules/tchannel/connection.js:382:18)
    at ReadMachine.handleReadFrame [as emit] (/usr/lib/node_modules/tcurl/node_modules/tchannel/connection.js:212:14)
    at ReadMachine.seek (/usr/lib/node_modules/tcurl/node_modules/tchannel/node_modules/bufrw/stream/read_machine.js:120:14)
    at ReadMachine.handleChunk (/usr/lib/node_modules/tcurl/node_modules/tchannel/node_modules/bufrw/stream/read_machine.js:67:28)

RPC room indicated that this might be the issue:

https://github.com/uber/tchannel-node/blob/7b419d922aec0944a65962af8170cb318b0dff03/channel.js#L521 event hasn't fired before it tries to setup a tracer.

prashantv commented 8 years ago

Closing, as this has a more useful error now:

AssertionError: port required