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

no httprequests for dotnet core app in docker container #23

Closed
nikki603 opened this issue Jun 30, 2016 · 8 comments
Closed

no httprequests for dotnet core app in docker container #23

nikki603 opened this issue Jun 30, 2016 · 8 comments

Comments

@nikki603
Copy link

I have a dotnet core RC2 application that is using serilog-sinks-splunk v2.0.0 to send all log entries to a Splunk server 6.3 Enterprise. When the application is running locally (not in a docker container), http requests are sent successfully. I can see them in Fiddler and my entries are viewable in Splunk. However when the same application is in a docker container, no I see no requests in Fiddler and nothing in Splunk. Has anyone had this problem?

@merbla
Copy link
Contributor

merbla commented Jun 30, 2016

@nikki603 I am getting https://github.com/serilog/serilog-docker working with the latest bits.

Will let you know how I go.

@merbla
Copy link
Contributor

merbla commented Jul 4, 2016

@nikki603 checkout the new 2.0.1 package or the docker example.

These are working now, so keen to see if you still have the issues.

@nikki603
Copy link
Author

nikki603 commented Jul 5, 2016

@merbla
I am using serilog-sinks-splunk v2.0.1 now and using the docker console sample. I changed the EventCollector splunkHost to my Splunk server:

var logger = new LoggerConfiguration()
            .MinimumLevel.Debug()
            .WriteTo.LiterateConsole()
            .WriteTo.EventCollector("https://10.16.16.68:8088/", "4AAAFB55-184F-4DC7-9383-59DC2D4B1DBF")
            .Enrich.WithProperty("App Name", "Serilog Console Docker Sample")
            .CreateLogger();

I am seeing the following errors:

HTTPS handshake to 10.16.16.68 (for #5) failed. System.Security.Authentication.AuthenticationException The remote certificate is invalid according to the validation procedure.

Also in Fiddler I see:
image

If I click yes, I can send events to my Splunk server. If I click No or do nothing, events fail to send. Since I have no control over my company's Splunk server, I think I need a client-side way to disable or ignore certificate validation. For example in the docker splunk driver I have an option 'splunk-insecureskipverify' that I set to true.

What do you think?

@merbla
Copy link
Contributor

merbla commented Jul 5, 2016

Does the SSL cert that you are using exist in the docker container?

@merbla
Copy link
Contributor

merbla commented Jul 5, 2016

The ability to ignore invalid certs has changed/ moved in dotnet core.

Perhaps try ignoring cert validation.

@nikki603
Copy link
Author

nikki603 commented Jul 6, 2016

Does the SSL cert that you are using exist in the docker container?

No

Perhaps try ignoring cert validation.

How? Wouldn't it need to be done when the HttpClient is created?

@merbla
Copy link
Contributor

merbla commented Jul 7, 2016

@nikki603 I think if we extend the configuration options similar to the Seq sink so we can allow for an override.

I have this Core running in prod fine with certs however they do exist on the docker container.

@nikki603
Copy link
Author

I did finally get the serilog-docker examples and my own application inside a Docker container to work with a Splunk server outside the container with SSL enabled. Thank you.

I would still like the option to ignore cert errors in the sink.

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