在Debian上部署的自包含asp.net-core无法启动,并且不显示错误消息

时间:2018-11-12 17:09:51

标签: asp.net-core .net-core debian

我试图在Debian机器上部署一个自包含的ASP.NET核心应用程序,但是当我启动可执行文件时,命令只是结束而没有任何消息:

~/Documents$ ./publishdeb/appExecutable
~/Documents$ 

我已经尝试使用sudo和chmod a+x -R publishdeb/,但是它没有任何改变。

如果我发布Windows 10版本并启动.exe,则该应用程序可以正常运行。

我在Debian 9和Debian 8.11上遇到了同样的问题。

使用的命令是dotnet publish -f netcoreapp2.1 -r debian-x64 -c Debug在debian 9上发布,dotnet publish -f netcoreapp2.1 -r debian.8-x64 -c Debug在Debian 8.11上发布。

在omajid的建议下,我做了一个strace -f,这给了我很多信息,这些信息可能会很大地被完全粘贴到这里。如果其中有有用的东西,这是前300行。

:~/Documents$ strace -f ./publishdeb/appExecutable
execve("./publishdeb/appExecutable", ["./publishdeb/appExecutable"], [/* 37 vars */]) = 0
brk(0)                                  = 0x129d000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdab7f81000
readlink("/proc/self/exe", "/home/dev/Documents/publishdeb/C"..., 4096) = 44
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/home/dev/Documents/publishdeb/netcoredeps/tls/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/dev/Documents/publishdeb/netcoredeps/tls/x86_64", 0x7ffca595aaa0) = -1 ENOENT (No such file or directory)
open("/home/dev/Documents/publishdeb/netcoredeps/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/dev/Documents/publishdeb/netcoredeps/tls", 0x7ffca595aaa0) = -1 ENOENT (No such file or directory)
open("/home/dev/Documents/publishdeb/netcoredeps/x86_64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/dev/Documents/publishdeb/netcoredeps/x86_64", 0x7ffca595aaa0) = -1 ENOENT (No such file or directory)
open("/home/dev/Documents/publishdeb/netcoredeps/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/dev/Documents/publishdeb/netcoredeps", 0x7ffca595aaa0) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=103192, ...}) = 0
mmap(NULL, 103192, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fdab7f67000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14664, ...}) = 0
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdab7b5f000
mprotect(0x7fdab7b62000, 2093056, PROT_NONE) = 0
mmap(0x7fdab7d61000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fdab7d61000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320n\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=137384, ...}) = 0
mmap(NULL, 2213008, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdab7942000
mprotect(0x7fdab795a000, 2093056, PROT_NONE) = 0
mmap(0x7fdab7b59000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fdab7b59000
mmap(0x7fdab7b5b000, 13456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdab7b5b000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\270\5\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1008120, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdab7f66000
mmap(NULL, 3188384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdab7637000
mprotect(0x7fdab7723000, 2097152, PROT_NONE) = 0
mmap(0x7fdab7923000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xec000) = 0x7fdab7923000
mmap(0x7fdab792d000, 83616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdab792d000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200U\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1051056, ...}) = 0
mmap(NULL, 3146072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdab7336000
mprotect(0x7fdab7436000, 2093056, PROT_NONE) = 0
mmap(0x7fdab7635000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xff000) = 0x7fdab7635000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=90096, ...}) = 0
mmap(NULL, 2185952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdab7120000
mprotect(0x7fdab7136000, 2093056, PROT_NONE) = 0
mmap(0x7fdab7335000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7fdab7335000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1738176, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdab7f65000
mmap(NULL, 3844640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdab6d75000
mprotect(0x7fdab6f16000, 2097152, PROT_NONE) = 0
mmap(0x7fdab7116000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0x7fdab7116000
mmap(0x7fdab711c000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdab711c000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdab7f64000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdab7f62000
arch_prctl(ARCH_SET_FS, 0x7fdab7f62740) = 0
mprotect(0x7fdab7116000, 16384, PROT_READ) = 0
mprotect(0x7fdab7635000, 4096, PROT_READ) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdab7f61000
mprotect(0x7fdab7923000, 32768, PROT_READ) = 0
mprotect(0x7fdab7b59000, 4096, PROT_READ) = 0
mprotect(0x7fdab7d61000, 4096, PROT_READ) = 0
mprotect(0x618000, 4096, PROT_READ)     = 0
mprotect(0x7fdab7f83000, 4096, PROT_READ) = 0
munmap(0x7fdab7f67000, 103192)          = 0
set_tid_address(0x7fdab7f62a10)         = 8766
set_robust_list(0x7fdab7f62a20, 24)     = 0
rt_sigaction(SIGRTMIN, {0x7fdab79489b0, [], SA_RESTORER|SA_SIGINFO, 0x7fdab7951890}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7fdab7948a40, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fdab7951890}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
futex(0x7fdab793fb0c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7fdab793fb18, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(0)                                  = 0x129d000
brk(0x12be000)                          = 0x12be000
lstat("/proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
lstat("/proc/self", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
readlink("/proc/self", "8766", 4095)    = 4
lstat("/proc/8766", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
lstat("/proc/8766/exe", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
readlink("/proc/8766/exe", "/home/dev/Documents/publishdeb/C"..., 4095) = 44
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev/Documents", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev/Documents/publishdeb", {st_mode=S_IFDIR|0777, st_size=32768, ...}) = 0
lstat("/home/dev/Documents/publishdeb/appExecutable", {st_mode=S_IFREG|0777, st_size=106912, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev/Documents", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev/Documents/publishdeb", {st_mode=S_IFDIR|0777, st_size=32768, ...}) = 0
lstat("/home/dev/Documents/publishdeb/appExecutable.dll", {st_mode=S_IFREG|0777, st_size=48640, ...}) = 0
stat("/home/dev/Documents/publishdeb/libhostfxr.so", {st_mode=S_IFREG|0777, st_size=692128, ...}) = 0
futex(0x7fdab7d620c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/home/dev/Documents/publishdeb/libhostfxr.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\341\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0777, st_size=692128, ...}) = 0
mmap(NULL, 2787168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdab6acc000
mprotect(0x7fdab6b73000, 2097152, PROT_NONE) = 0
mmap(0x7fdab6d73000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa7000) = 0x7fdab6d73000
close(3)                                = 0
mprotect(0x7fdab6d73000, 4096, PROT_READ) = 0
stat("/home/dev/Documents/publishdeb/libcoreclr.so", {st_mode=S_IFREG|0777, st_size=10235936, ...}) = 0
stat("/home/dev/Documents/publishdeb/appExecutable.deps.json", {st_mode=S_IFREG|0777, st_size=426901, ...}) = 0
stat("/home/dev/Documents/publishdeb/appExecutable.dll", {st_mode=S_IFREG|0777, st_size=48640, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev/Documents", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev/Documents/publishdeb", {st_mode=S_IFDIR|0777, st_size=32768, ...}) = 0
lstat("/home/dev/Documents/publishdeb/appExecutable.dll", {st_mode=S_IFREG|0777, st_size=48640, ...}) = 0
stat("/home/dev/Documents/publishdeb/appExecutable.runtimeconfig.dev.json", 0x7ffca595aad8) = -1 ENOENT (No such file or directory)
stat("/home/dev/Documents/publishdeb/appExecutable.runtimeconfig.json", {st_mode=S_IFREG|0777, st_size=98, ...}) = 0
open("/home/dev/Documents/publishdeb/appExecutable.runtimeconfig.json", O_RDONLY) = 3
read(3, "{\r\n  \"runtimeOptions\": {\r\n    \"c"..., 8191) = 98
read(3, "", 8191)                       = 0
close(3)                                = 0
stat("/home/dev/Documents/publishdeb/appExecutable.deps.json", {st_mode=S_IFREG|0777, st_size=426901, ...}) = 0
open("/home/dev/Documents/publishdeb/appExecutable.deps.json", O_RDONLY) = 3
read(3, "{\r\n  \"runtimeTarget\": {\r\n    \"na"..., 8191) = 8191
read(3, "\n          \"Microsoft.AspNetCore"..., 8191) = 8191
read(3, "\"Microsoft.AspNetCore.Authentica"..., 8191) = 8191
read(3, "ile\": {\r\n          \"lib/netstand"..., 8191) = 8191
read(3, "  \"Microsoft.Extensions.FileProv"..., 8191) = 8191
brk(0x12df000)                          = 0x12df000
read(3, ".1\",\r\n          \"Microsoft.Exten"..., 8191) = 8191
read(3, "s.WebSocketProtocol\": \"4.5.1\"\r\n "..., 8191) = 8191
read(3, " \"System.Data.SqlClient\": \"4.5.1"..., 8191) = 8191
read(3, "crosoft.Extensions.Identity.Core"..., 8191) = 8191
read(3, "Microsoft.IdentityModel.Tokens.S"..., 8191) = 8191
brk(0x1300000)                          = 0x1300000
read(3, "{},\r\n          \"ref/netcoreapp2."..., 8191) = 8191
read(3, "     }\r\n      },\r\n      \"Pomelo."..., 8191) = 8191
read(3, " \"dependencies\": {\r\n          \"M"..., 8191) = 8191
read(3, "  \"System.IO.FileSystem.Primitiv"..., 8191) = 8191
read(3, "yptography.Primitives\": \"4.3.0\","..., 8191) = 8191
brk(0x1321000)                          = 0x1321000
read(3, "\n          \"System.Runtime\": \"4."..., 8191) = 8191
read(3, "crosoft.NETCore.Targets\": \"2.0.0"..., 8191) = 8191
read(3, "2.1.2\",\r\n          \"Microsoft.As"..., 8191) = 8191
read(3, "e.DataProtection\": \"2.1.1\",\r\n   "..., 8191) = 8191
read(3, " \"2.1.1\"\r\n        },\r\n        \"r"..., 8191) = 8191
brk(0x1342000)                          = 0x1342000
read(3, "  \"dependencies\": {\r\n          \""..., 8191) = 8191
read(3, "ng.Abstractions\": \"2.1.1\",\r\n    "..., 8191) = 8191
read(3, "\n        }\r\n      },\r\n      \"Mic"..., 8191) = 8191
read(3, "mblyVersion\": \"2.1.1.0\",\r\n      "..., 8191) = 8191
read(3, "    \"Microsoft.CodeAnalysis.Work"..., 8191) = 8191
brk(0x1363000)                          = 0x1363000
read(3, "ons.Configuration.FileExtensions"..., 8191) = 8191
read(3, "Extensions.Identity.Stores/2.1.3"..., 8191) = 8191
read(3, ": {\r\n          \"Microsoft.Identi"..., 8191) = 8191
read(3, "         \"assemblyVersion\": \"4.1"..., 8191) = 8191
read(3, " \"0.0.0.0\"\r\n          },\r\n      "..., 8191) = 8191
brk(0x1384000)                          = 0x1384000
read(3, "oreapp2.1/System.Net.WebSockets."..., 8191) = 8191
read(3, "\": {\r\n            \"assemblyVersi"..., 8191) = 8191
read(3, "soft.NETCore.DotNetAppHost/2.1.5"..., 8191) = 8191
read(3, "ndencies\": {\r\n          \"Microso"..., 8191) = 8191
read(3, "        \"runtime.native.System.D"..., 8191) = 8191
brk(0x13a5000)                          = 0x13a5000
read(3, "     \"System.Linq.Queryable/4.0."..., 8191) = 8191
read(3, "\"4.3.0\"\r\n        }\r\n      },\r\n  "..., 8191) = 8191
read(3, "  },\r\n        \"runtime\": {\r\n    "..., 8191) = 8191
read(3, "soft.aspnetcore.antiforgery.2.1."..., 8191) = 8191
brk(0x13c6000)                          = 0x13c6000
read(3, "ge\",\r\n      \"serviceable\": true,"..., 8191) = 8191
read(3, "/2.1.1\": {\r\n      \"type\": \"packa"..., 8191) = 8191
read(3, "7kZvWAK9wRG7emnTIia5O6R1Q==\",\r\n "..., 8191) = 8191
read(3, "m/uhPIiaws4m+Mv6ezGB0wIajvGCsHc/"..., 8191) = 8191
read(3, "/2.1.2\",\r\n      \"hashPath\": \"mic"..., 8191) = 8191
brk(0x13e7000)                          = 0x13e7000
read(3, "osoft.extensions.hosting.2.1.1.n"..., 8191) = 8191
read(3, ".0.nupkg.sha512\"\r\n    },\r\n    \"M"..., 8191) = 8191
read(3, " \"sha512\": \"sha512-st47PosZSHrjE"..., 8191) = 8191
read(3, "e\",\r\n      \"serviceable\": true,\r"..., 8191) = 8191
read(3, "r/3.0.0\": {\r\n      \"type\": \"pack"..., 8191) = 8191
brk(0x1408000)                          = 0x1408000
read(3, ".Tools/4.3.0\": {\r\n      \"type\": "..., 8191) = 8191
read(3, ".sha512\"\r\n    },\r\n    \"System.Re"..., 8191) = 8191
read(3, "ckage\",\r\n      \"serviceable\": tr"..., 8191) = 8191
read(3, "mlSerializer/4.3.0\": {\r\n      \"t"..., 8191) = 969
read(3, "", 8191)                       = 0
close(3)                                = 0
stat("opt/coreservicing", 0x7ffca595b278) = -1 ENOENT (No such file or directory)
stat("pkgs/runtime.linux-x64.Microsoft.NETCore.DotNetHostPolicy/2.1.5/runtimes/linux-x64/native/libhostpolicy.so", 0x7ffca595b1f8) = -1 ENOENT (No such file or directory)
stat("/home/dev/Documents/publishdeb/libhostpolicy.so", {st_mode=S_IFREG|0777, st_size=712624, ...}) = 0
stat("/home/dev/Documents/publishdeb/libhostpolicy.so", {st_mode=S_IFREG|0777, st_size=712624, ...}) = 0
open("/home/dev/Documents/publishdeb/libhostpolicy.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3403\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0777, st_size=712624, ...}) = 0
mmap(NULL, 2807904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdab681e000
mprotect(0x7fdab68ca000, 2097152, PROT_NONE) = 0
mmap(0x7fdab6aca000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xac000) = 0x7fdab6aca000
close(3)                                = 0
mprotect(0x7fdab6aca000, 4096, PROT_READ) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev/Documents", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/dev/Documents/publishdeb", {st_mode=S_IFDIR|0777, st_size=32768, ...}) = 0
lstat("/home/dev/Documents/publishdeb/appExecutable.dll", {st_mode=S_IFREG|0777, st_size=48640, ...}) = 0
brk(0x1399000)                          = 0x1399000
stat("opt/coreservicing", 0x7ffca595b0c8) = -1 ENOENT (No such file or directory)
stat("/home/dev/Documents/publishdeb/appExecutable.deps.json", {st_mode=S_IFREG|0777, st_size=426901, ...}) = 0
open("/home/dev/Documents/publishdeb/appExecutable.deps.json", O_RDONLY) = 3
read(3, "{\r\n  \"runtimeTarget\": {\r\n    \"na"..., 8191) = 8191
read(3, "\n          \"Microsoft.AspNetCore"..., 8191) = 8191
read(3, "\"Microsoft.AspNetCore.Authentica"..., 8191) = 8191
read(3, "ile\": {\r\n          \"lib/netstand"..., 8191) = 8191
read(3, "  \"Microsoft.Extensions.FileProv"..., 8191) = 8191
read(3, ".1\",\r\n          \"Microsoft.Exten"..., 8191) = 8191
read(3, "s.WebSocketProtocol\": \"4.5.1\"\r\n "..., 8191) = 8191
read(3, " \"System.Data.SqlClient\": \"4.5.1"..., 8191) = 8191
read(3, "crosoft.Extensions.Identity.Core"..., 8191) = 8191
read(3, "Microsoft.IdentityModel.Tokens.S"..., 8191) = 8191
read(3, "{},\r\n          \"ref/netcoreapp2."..., 8191) = 8191
read(3, "     }\r\n      },\r\n      \"Pomelo."..., 8191) = 8191
read(3, " \"dependencies\": {\r\n          \"M"..., 8191) = 8191
read(3, "  \"System.IO.FileSystem.Primitiv"..., 8191) = 8191
read(3, "yptography.Primitives\": \"4.3.0\","..., 8191) = 8191
read(3, "\n          \"System.Runtime\": \"4."..., 8191) = 8191
read(3, "crosoft.NETCore.Targets\": \"2.0.0"..., 8191) = 8191
read(3, "2.1.2\",\r\n          \"Microsoft.As"..., 8191) = 8191
read(3, "e.DataProtection\": \"2.1.1\",\r\n   "..., 8191) = 8191
read(3, " \"2.1.1\"\r\n        },\r\n        \"r"..., 8191) = 8191
read(3, "  \"dependencies\": {\r\n          \""..., 8191) = 8191
read(3, "ng.Abstractions\": \"2.1.1\",\r\n    "..., 8191) = 8191
read(3, "\n        }\r\n      },\r\n      \"Mic"..., 8191) = 8191
read(3, "mblyVersion\": \"2.1.1.0\",\r\n      "..., 8191) = 8191
read(3, "    \"Microsoft.CodeAnalysis.Work"..., 8191) = 8191
read(3, "ons.Configuration.FileExtensions"..., 8191) = 8191
read(3, "Extensions.Identity.Stores/2.1.3"..., 8191) = 8191
read(3, ": {\r\n          \"Microsoft.Identi"..., 8191) = 8191
read(3, "         \"assemblyVersion\": \"4.1"..., 8191) = 8191
read(3, " \"0.0.0.0\"\r\n          },\r\n      "..., 8191) = 8191
read(3, "oreapp2.1/System.Net.WebSockets."..., 8191) = 8191
read(3, "\": {\r\n            \"assemblyVersi"..., 8191) = 8191
read(3, "soft.NETCore.DotNetAppHost/2.1.5"..., 8191) = 8191
read(3, "ndencies\": {\r\n          \"Microso"..., 8191) = 8191
read(3, "        \"runtime.native.System.D"..., 8191) = 8191
read(3, "     \"System.Linq.Queryable/4.0."..., 8191) = 8191
read(3, "\"4.3.0\"\r\n        }\r\n      },\r\n  "..., 8191) = 8191
brk(0x13ba000)                          = 0x13ba000
read(3, "  },\r\n        \"runtime\": {\r\n    "..., 8191) = 8191
read(3, "soft.aspnetcore.antiforgery.2.1."..., 8191) = 8191
read(3, "ge\",\r\n      \"serviceable\": true,"..., 8191) = 8191
read(3, "/2.1.1\": {\r\n      \"type\": \"packa"..., 8191) = 8191
read(3, "7kZvWAK9wRG7emnTIia5O6R1Q==\",\r\n "..., 8191) = 8191
brk(0x13db000)                          = 0x13db000
read(3, "m/uhPIiaws4m+Mv6ezGB0wIajvGCsHc/"..., 8191) = 8191
read(3, "/2.1.2\",\r\n      \"hashPath\": \"mic"..., 8191) = 8191
read(3, "osoft.extensions.hosting.2.1.1.n"..., 8191) = 8191
read(3, ".0.nupkg.sha512\"\r\n    },\r\n    \"M"..., 8191) = 8191
read(3, " \"sha512\": \"sha512-st47PosZSHrjE"..., 8191) = 8191
brk(0x13fc000)                          = 0x13fc000
read(3, "e\",\r\n      \"serviceable\": true,\r"..., 8191) = 8191
read(3, "r/3.0.0\": {\r\n      \"type\": \"pack"..., 8191) = 8191
read(3, ".Tools/4.3.0\": {\r\n      \"type\": "..., 8191) = 8191
read(3, ".sha512\"\r\n    },\r\n    \"System.Re"..., 8191) = 8191
read(3, "ckage\",\r\n      \"serviceable\": tr"..., 8191) = 8191
brk(0x141d000)                          = 0x141d000
read(3, "mlSerializer/4.3.0\": {\r\n      \"t"..., 8191) = 969
read(3, "", 8191)                       = 0
brk(0x1445000)                          = 0x1445000
close(3)                                = 0
stat("/home/dev/Documents/publishdeb/appExecutable.dll", {st_mode=S_IFREG|0777, st_size=48640, ...}) = 0
stat("/home/dev/Documents/publishdeb/System.Net.Http.Formatting.dll", {st_mode=S_IFREG|0777, st_size=184968, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Antiforgery.dll", {st_mode=S_IFREG|0777, st_size=54264, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.Abstractions.dll", {st_mode=S_IFREG|0777, st_size=29176, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.Cookies.dll", {st_mode=S_IFREG|0777, st_size=49536, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.Core.dll", {st_mode=S_IFREG|0777, st_size=37880, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.Facebook.dll", {st_mode=S_IFREG|0777, st_size=28032, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.Google.dll", {st_mode=S_IFREG|0777, st_size=29568, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.JwtBearer.dll", {st_mode=S_IFREG|0777, st_size=38272, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.MicrosoftAccount.dll", {st_mode=S_IFREG|0777, st_size=26496, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.OAuth.dll", {st_mode=S_IFREG|0777, st_size=43904, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.OpenIdConnect.dll", {st_mode=S_IFREG|0777, st_size=91008, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.Twitter.dll", {st_mode=S_IFREG|0777, st_size=46464, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.WsFederation.dll", {st_mode=S_IFREG|0777, st_size=46464, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authentication.dll", {st_mode=S_IFREG|0777, st_size=63872, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authorization.Policy.dll", {st_mode=S_IFREG|0777, st_size=21888, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Authorization.dll", {st_mode=S_IFREG|0777, st_size=41344, ...}) = 0
stat("/home/dev/Documents/publishdeb/Microsoft.AspNetCore.Connections.Abstractions.dll", {st_mode=S_IFREG|0777, st_size=34176, ...}) = 0

1 个答案:

答案 0 :(得分:0)

问题不是来自Debian或.NetCore 2.1,而是来自我的代码。

在程序的初始化步骤中,我提取了appsettings.json文件以填充ConfigurationBuilder

var baseConfig = new ConfigurationBuilder()
                .SetBasePath(Directory.GetCurrentDirectory())
                .AddJsonFile("appsettings.json")
                .Build();

但是Directory.GetCurrentDirectory()给出了从中启动程序的目录,而不是程序集所在的目录。因此它找不到appsettings.json文件,并且崩溃了。

没有消息或日志是由于以下事实造成的:在此步骤中,serilog记录器尚未初始化,无法发送任何内容。 Console.WriteLine有效,所以我应该先这样做。

为避免此问题,我使用了AppDomain.CurrentDomain.BaseDirectory而不是Directory.GetCurrentDirectory()