.net - dotnet-dump 在 Ubuntu 中失败,出现 "Writing dump failed (HRESULT: 0x80004005)"

标签 .net linux ubuntu .net-core

尽管我在 root 下运行 dotnet-dump,并且进程在 root 下运行(请参阅下面的服务描述),但似乎我缺乏一些权限。
我还尝试了 home、var 和 tmp 中的其他目录:所有相同的消息。

root@DSK06511:/home/monouser# dotnet-dump collect -p 10131 --diag -o /var/tmp/MyNodeDump/
Writing full to /var/tmp/MyNodeDump/
Writing dump failed (HRESULT: 0x80004005)

root@DSK06511:/tmp# dotnet-dump collect -p 10131 --diag -o /home/monorepo/tmp/
Writing full to /home/monouser/tmp/
Writing dump failed (HRESULT: 0x80004005)

服务文件:
root@DSK06511:/home/monouser# cat  /etc/systemd/system/MyNode.service
[Unit]
Description=MyNode

[Service]
Type=simple

User=root
Group=root

ExecStart=/home/monouser/.octopus/Applications/OctopusServer/Production/MyNode.Linux/4.0.1.907/MyNode --console

[Install]
WantedBy=multi-user.target

诊断信息:
dotnet-dump --version
3.1.120604+97218bff6a14e60360862529b09b687789cc1279
dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.201
 Commit:    b1768b4ae7

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.201/

Host (useful for support):
  Version: 3.1.3
  Commit:  4a9f85e9f8

.NET Core SDKs installed:
  3.1.201 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

操作系统版本 NAME="Ubuntu"VERSION="18.04.3 LTS (Bionic Beaver)"

他们有类似的问题here但是他们用 --output 解决了这个问题到/tmp 中的目录,这没有帮助

最佳答案

另外,我将描述 docker 的案例。
如果您使用 docker,启动具有权限的容器会有所帮助:docker run --cap-add=SYS_PTRACE -it ubuntu:18.04 /bin/bash https://github.com/dotnet/diagnostics/blob/master/documentation/FAQ.md#frequently-asked-questions

关于.net - dotnet-dump 在 Ubuntu 中失败,出现 "Writing dump failed (HRESULT: 0x80004005)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61412969/

相关文章:

.net - .NET 上 C# 的模拟工具

c# - 报表查看器字体仅在 WIndows 服务器计算机上变长

c# - 将 UserControl 添加到 WPF DataGrid 单元格

linux - 在linux中雇佣清除目录的问题

linux - 您将如何设计一个系统来保护 Linux 中的日志信息?

Django restframework Bootstrap 静态文件

mysql - Express.JS 应用程序与 mysql 服务器冲突

c - www-data 调用读取文件的程序

.net - 在控制台应用程序中使用 .NET BackgroundWorker 类

php - 如何在 ubuntu 14.04 上安装 php 5.3.10