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

Intermittent Issue #62

Closed
billdinger opened this issue Apr 7, 2020 · 4 comments
Closed

Intermittent Issue #62

billdinger opened this issue Apr 7, 2020 · 4 comments

Comments

@billdinger
Copy link

billdinger commented Apr 7, 2020

First off, thanks for this library so much it's very much appreciated. Getting this error intermittently when submitting logs to elk. TLDR is im getting timeouts and the error getting back from log4stash is misleading. It looks like this is fixed in master but master isn't pushed out to nuget?

System.NullReferenceException: Object reference not set to an instance of an object.
   at log4stash.WebElasticClient.CheckResponse(IRestResponse response) in d:\uriel\Programing\C#\log4stash\src\log4stash\ElasticClient\WebElasticClient.cs:line 206
   at log4stash.WebElasticClient.<SafeSendRequestAsync>d__d.MoveNext() in d:\uriel\Programing\C#\log4stash\src\log4stash\ElasticClient\WebElasticClient.cs:line 165

I went ahead and downloaded source and attached a debugger and this is what is actually coming through is the response is timing out per the rest client but the 2.2.1 code isn't checking for a null jsonResponse. It can't deserialize the timeout so that's null. It looks like this is fixed in the master branch. Any chance of getting a push of what's in master out to nuget?

image

I think what's happening is something with my corporate proxy causing requests to go through but not.. responses back. I'm investigating it but in case someone else runs into the issue check your server and make sure its sending a response back - the 2.2.1 code doesn't handle error (or timeouts) properly.

      <appender name="ElasticSearchAppender" type="log4stash.ElasticSearchAppender, log4stash">
        <Server>someserverhere</Server>
        <Port>5001</Port>
        <ElasticSearchTimeout>30000</ElasticSearchTimeout>
        <ElasticFilters>
          <Filter type="log4stash.Filters.RenameKeyFilter, log4stash">
            <Key>Message</Key>
            <RenameTo>message</RenameTo>
          </Filter>
        </ElasticFilters>
      </appender>
@urielha
Copy link
Owner

urielha commented Apr 10, 2020

Hi, thanks for the detailed issue :)
We just published a new version can try it and update if your issues was fixed?

@urielha
Copy link
Owner

urielha commented Apr 10, 2020

Also take a look at issue #55 I think they are related.
Bottom line - for that issue we had this 2.2.2 pre-relaese but you should be good with 2.3.0 too.

@billdinger
Copy link
Author

Fixed in 2.3.0 @urielha thanks so much! It now properly reports back connection timed out as expected with the error. Thanks so much =)

@urielha
Copy link
Owner

urielha commented Apr 28, 2020

Good to know :)

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

2 participants