-
Notifications
You must be signed in to change notification settings - Fork 113
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
Exception: Unable to discover a target process #1552
Comments
Unfortunately, the sample as written only works for .NET 5+. I'll put out a PR to show how to do this for .NET Core 3.1 and link back here. The gist is that you need to mount the |
@jander-msft thanks! after upgrading to .net6 it works 😎. Yes a readme for 3.1 and/or warning in the example for this limitation would me great. I'll let you close this one when you PR lands |
You had to use the apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: sample
name: sample
spec:
revisionHistoryLimit: 1
selector:
matchLabels:
app: sample
replicas: 1
strategy:
rollingUpdate:
maxSurge: 50%
maxUnavailable: 25%
type: RollingUpdate
template:
labels:
app: sample
spec:
containers:
- name: sample
ports:
- containerPort: 80
env:
- name: DOTNET_DiagnosticPorts
value: /diag/port
volumeMounts:
- mountPath: /diag
name: diagvol
- mountPath: /dumps
name: dumpsvol
- mountPath: /tmp
name: tmpvol
- name: dotnet-monitor
image: mcr.microsoft.com/dotnet/monitor:6.0.0
args: [ "--no-auth" ]
imagePullPolicy: Always
ports:
- containerPort: 52323
env:
- name: DOTNETMONITOR_DiagnosticPort__ConnectionMode
value: Connect
- name: DOTNETMONITOR_DiagnosticPort__EndpointName
value: /diag/port
- name: DOTNETMONITOR_Storage__DumpTempFolder
value: /dumps
- name: DOTNETMONITOR_Urls
value: "http://+:52323"
volumeMounts:
- mountPath: /diag
name: diagvol
- mountPath: /dumps
name: dumpsvol
- mountPath: /tmp
name: tmpvol
resources:
requests:
cpu: 50m
memory: 32Mi
limits:
cpu: 250m
memory: 256Mi
volumes:
- name: diagvol
emptyDir: {}
- name: dumpsvol
emptyDir: {}
- name: tmpvol
emptyDir: {}
|
With .NET Core 3.1 out of support earlier this month, we will likely not invest in updating documentation for .NET Core 3.1 specific deployments. |
Description
Using this example https://github.com/dotnet/dotnet-monitor/blob/main/documentation/kubernetes.md i tried adding dotnetmonitor to one of our
dotnet 3.1
services but getting this error. I also tried removing thesecurityContext
with no change in behaviour. Our service do not useIHostedService
, it is just a console application. Do we need to make sure that there is some specific nuget package installed in the application?/metrics is empty
Result from /info
Logmessage on /logs, /livemetrics
Configuration
Regression?
Other information
The text was updated successfully, but these errors were encountered: