-
Notifications
You must be signed in to change notification settings - Fork 47
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
Getting ECONNRESET Error: socket hang up error #75
Comments
+1 |
@alok2k5ingh Here's an alternate solution using the
|
I've hit this issue when attempting publish to splunkcloud as well. I found the removing the port from the url here splunk-javascript-logging/splunklogger.js Line 440 in c3795ab
Here is the current line: requestOptions.url = this.config.protocol + "://" + this.config.host + ":" + this.config.port + this.config.path; Changing it to this resolved the issue for me: requestOptions.url = this.config.protocol + "://" + this.config.host + this.config.path; This is just a hack. Ideally there would be a configuration option to allow the URL to be explicitly passed without a port |
This issue is because the library is pulling the URL apart and looking for the pieces it needs to reconstruct it when making a request. The problem is, if it doesn't find a piece it will replace it with the default value. In this case, the default port is 8088.
will fix the issue you're having. The problem is from these lines: splunk-javascript-logging/splunklogger.js Line 235 in c3795ab
splunk-javascript-logging/splunklogger.js Line 257 in c3795ab
|
Trying to implement the same example as mentioned in the README file but getting the error:
ECONNRESET Error: socket hang up error
Have checkup the token and splunk HEC endpoint, it's working.
Can someone please help
Tried on:
Node version: v14.17.6
"dependencies": {
"splunk-logging": "^0.11.1"
}
The text was updated successfully, but these errors were encountered: