-
Notifications
You must be signed in to change notification settings - Fork 311
Log status of port before starting server with SelfHostDeployer #993
Conversation
Sample of the output? |
|
||
private static bool UseNetstat() | ||
{ | ||
#if NET46 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
using System; | ||
using System.Diagnostics; | ||
#if NETSTANDARD1_3 | ||
using System.Runtime.InteropServices; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
{ | ||
if (!string.IsNullOrWhiteSpace(data.Data)) | ||
{ | ||
logger.LogWarning("portstatus: {0}", data.Data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to set linesLogged
here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stderr would indicate the lsof or netstat command failed to list port info or isn't available on the path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@natemcmaster: Looks like this is failing in our CI builds:
It's just a warning but it's noise in the logs |
I'm going to revert this. It was an attempt to figure out what was causing port conflicts in tests, but it didn't help enough. I think we'll have more success if use dynamic ports. |
I'm trying to make it easier to determine if EADDRINUSE errors in our integration tests are caused because the port truly is in use or because there is some libuv problem binding to addresses.
cref aspnet/Entropy#209