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

m365Assessment.exe starts on a random port #65

Open
Somu76 opened this issue Aug 23, 2024 · 4 comments
Open

m365Assessment.exe starts on a random port #65

Somu76 opened this issue Aug 23, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@Somu76
Copy link

Somu76 commented Aug 23, 2024

Hi,
This is a follow up to #62 that I had opened earlier. Got pulled into other things at work, and did not have a chance to get back to debugging this further.

Started Microsoft365-assessment.exe
Typed 'list'
I now see two processes in task manager, with the new one appearing to be the one that is the gRPC server (has the arguments scanner 25010).
I get a 'tool did not start timely' error.
I then tried to look at what ports were open on my system, and noticed that while there was nothing listening on port 25010, the process identified above was listening on another port instead which seems to be randomly picked on every run on the exe.

So, seems like the server is listening on a random port while the client is expecting it to be listening on the configured port here.

have you guys seen this before? was trying to see if the logs offered any clues, but am not seeing anything in there, and log seems to actually indicate that the service started on the configured port.

@Somu76
Copy link
Author

Somu76 commented Aug 24, 2024

to add to above, I am seeing this on both Windows 10 workstation and Windows 2022 servers that I tried. AV Software being used is Trellix.

@jansenbe jansenbe self-assigned this Aug 30, 2024
@jansenbe jansenbe added the question Further information is requested label Aug 30, 2024
@jansenbe
Copy link
Contributor

jansenbe commented Aug 30, 2024

@Somu76 : We're not randomly picking ports, it's either the default (25010) or the port specified in the config file (https://pnp.github.io/pnpassessment/using-the-assessment-tool/configuration.html#using-a-different-port-than-25010). It's normal you see 2 processes, one is the "client", the other is the gRPC server that runs the actual assessment.

So far all "unsolvable" cases of 'tool did not start timely' are either due to an occupied port or due to proxy server requirements. Sometimes there's a company proxy required, sometimes locally installed security/AV software acts as proxy for all traffic, including localhost traffic to the gRPC server.

We do not support proxies with the Microsoft 365 Assessment tool, so if proxy is the limiting thing I would recommend moving to a machine that does not require one. Alternatively you can setup a temporary Azure VM and run the assessment from there

@Somu76
Copy link
Author

Somu76 commented Sep 5, 2024

@jansenbe thanks for the information. I was aware of that configuration and did try to use it to see if I could get around my problem but that did not help. This is what I did though, to get the assessments working from my machine:

  1. Ran 'microsoft365assessment.exe'
  2. Entered the 'list' command.
    This threw the timeout error, and in the task manager, I did see the process 'microsoft365-assessment.exe scanner 25010' started. When checking the listening processes using 'netstat -ano', I could see the PID for above listening on a different port than 25010.
  3. I then exited from the prompt. While this killed the client instance, the server instance stayed up.
  4. I then created a appsettings.json file with the port number noted above (the actual one it ended up listening on - this is random everytime it starts).
  5. I launched the assessment this time with the proper application/site/cert values, and it appeared to complete.

One thing I am noticing though is that everytime the assessment starts, it says that 'No running 365 assessment found, starting one...' and in the task manager, I can see new processes start up with the 'scanner ' parameter, and ending up listening on another port like before... I just kill them afterwards, since we appear to be using the first one to run the assessment anyways.

It is a workaround for now until I can figure out why the port assignment is behaving this way... we do not have a proxy in our environment, but the Trellix AV appears to have a Firewall component to its endpoint security, and I would need to check with our security team about disabling it...

@jansenbe
Copy link
Contributor

@Somu76 : thanks a ton for this detailed analysis! This will help other customers facing similar issues

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

No branches or pull requests

2 participants