[ https://issues.apache.org/jira/browse/THRIFT-3156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Batte updated THRIFT-3156: ------------------------------- Attachment: thrift-jira-evidence.zip > Node TLS: server executes processing logic two full times > --------------------------------------------------------- > > Key: THRIFT-3156 > URL: https://issues.apache.org/jira/browse/THRIFT-3156 > Project: Thrift > Issue Type: Bug > Environment: OS X w/ Node.js > Reporter: John Batte > Attachments: thrift-jira-evidence.zip > > > h4. Using attached {{thrift-jira-evidence.zip}} > {code} > $ unzip thrift-jira-evidence.zip > $ cd thrift-jira-evidence > {code} > *Note*: you'll need a total of three certs: {{ca.crt}}, {{server.crt}}, and > {{server.key}}. These have not been provided in the evidence. > h4. Server side reproduce steps > # {{cd server}} > # Copy {{ca.crt}} to {{config/ssl/ca.crt}} > # Copy {{server.crt}} to {{config/ssl/server.crt}} > # Copy {{server.key}} to {{config/ssl/server.key}} > # {{npm install}} > # {{NODE_DEBUG="tls" npm start}} > h5. Server output after server start > {code} > > thrift-tls-experiment@0.0.0 start /your/path/to/server > > node ./src/node/index.js > Thrift service now listening on port 9797 > {code} > h4. Client side reproduce steps > # {{cd client}} > # Copy {{ca.crt}} to {{config/ssl/ca.crt}} > # {{npm install}} > # {{NODE_DEBUG="tls" npm start}} > h5. Client output after client start > {code} > > thrift-tls-experiment@0.0.0 start /your/path/to/client > > node ./src/node/index.js > Creating connection host: localhost port: 9797 > Creating client > Sending: Hello, World! > TLS 15599: secure established > Response received! > Killing connection > Success! Hello, World! >> !dlroW ,olleH > {code} > h5. Server output after client start > {code} > TLS 15547: onhandshakestart > TLS 15547: onhandshakedone > TLS 15547: secure established > Mapping to specific processor call > Trace: Inside process_reverse > at TermReverserProcessor.process_reverse > (/your/path/to/server/src/node/contracts/TermReverser.js:196:11) > at TermReverserProcessor.process > (/your/path/to/server/src/node/contracts/TermReverser.js:183:39) > at /your/path/to/server/node_modules/thrift/lib/thrift/server.js:55:21 > at TLSSocket.<anonymous> > (/your/path/to/server/node_modules/thrift/lib/thrift/transport.js:63:7) > at TLSSocket.emit (events.js:107:17) > at readableAddChunk (_stream_readable.js:163:16) > at TLSSocket.Readable.push (_stream_readable.js:126:10) > at TCP.onread (net.js:529:20) > Reversing: Hello, World! call count 1 > Mapping to specific processor call > Mapping to specific processor call > Trace: Inside process_reverse > at TermReverserProcessor.process_reverse > (/your/path/to/server/src/node/contracts/TermReverser.js:196:11) > at TermReverserProcessor.process > (/your/path/to/server/src/node/contracts/TermReverser.js:183:39) > at /your/path/to/server/node_modules/thrift/lib/thrift/server.js:55:21 > at TLSSocket.<anonymous> > (/your/path/to/server/node_modules/thrift/lib/thrift/transport.js:63:7) > at TLSSocket.emit (events.js:107:17) > at readableAddChunk (_stream_readable.js:163:16) > at TLSSocket.Readable.push (_stream_readable.js:126:10) > at TCP.onread (net.js:529:20) > Reversing: Hello, World! call count 2 > Mapping to specific processor call > {code} > *Conclusion*: something is resetting the stream position to zero _after > server-side processing is complete_, causing a second complete execution to > occur, even though the client only receives one response. This issue does not > occur with the equivalent code when TLS has been "turned off". My colleagues > and I are having difficulty locating the errant code. Any help is appreciated. -- This message was sent by Atlassian JIRA (v6.3.4#6332)