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

Unable to manage mappings via proxy #6

Open
nicolai86 opened this issue May 9, 2016 · 7 comments
Open

Unable to manage mappings via proxy #6

nicolai86 opened this issue May 9, 2016 · 7 comments

Comments

@nicolai86
Copy link

nicolai86 commented May 9, 2016

POST/ PUT requests fail when using aws-es-kibana:

_http_outgoing.js:346
    throw new Error('Can\'t set headers after they are sent.');
    ^

Error: Can't set headers after they are sent.
    at ClientRequest.OutgoingMessage.setHeader (_http_outgoing.js:346:11)
    at ProxyServer.<anonymous> (/usr/local/lib/node_modules/aws-es-kibana/index.js:112:14)
    at ProxyServer.emit (/usr/local/lib/node_modules/aws-es-kibana/node_modules/eventemitter3/index.js:119:35)
    at ClientRequest.<anonymous> (/usr/local/lib/node_modules/aws-es-kibana/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js:115:27)
    at emitOne (events.js:101:20)
    at ClientRequest.emit (events.js:188:7)
    at tickOnSocket (_http_client.js:541:7)
    at onSocketNT (_http_client.js:553:5)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)

triggered by PUTting a mapping with curl

@santthosh
Copy link
Owner

@nicolai86 Is this still happening with the latest version, can you please advise?

@jlsalvador
Copy link

Yep (v1.0.5).

_http_outgoing.js:367
    throw new Error('Can\'t set headers after they are sent.');
    ^

Error: Can't set headers after they are sent.
    at ClientRequest.setHeader (_http_outgoing.js:367:11)
    at ProxyServer.<anonymous> (/usr/lib/node_modules/aws-es-kibana/index.js:137:14)
    at ProxyServer.emit (/usr/lib/node_modules/aws-es-kibana/node_modules/eventemitter3/index.js:119:35)
    at ClientRequest.<anonymous> (/usr/lib/node_modules/aws-es-kibana/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js:125:27)
    at emitOne (events.js:101:20)
    at ClientRequest.emit (events.js:188:7)
    at tickOnSocket (_http_client.js:573:7)
    at onSocketNT (_http_client.js:585:5)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)

@nicolai86
Copy link
Author

@santthosh I abandoned this package for a golang based alternative which never showed similar issues.

@nicolai86
Copy link
Author

See https://gist.github.com/nicolai86/5ffe8905ab2c16cf0b3eb8f054bae456

@santthosh
Copy link
Owner

Nice @nicolai86! @jlsalvador will try to fix this ASAP

@bwalsh
Copy link

bwalsh commented Feb 5, 2017

+1 Running into the same problem

@valydia
Copy link

valydia commented May 9, 2017

+1

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

No branches or pull requests

5 participants