1
当我尝试查找核心转储文件时,我查看了类似的主题,但似乎没有一个解决方案适合我。有人可以帮我调试吗?我的应用程序在日志尾部生成输出,表明由于核心转储而失败,但该文件未在任何地方生成,并且该信息未保留在日志文件中。
Linux系统:
NAME="Red Hat Enterprise Linux Server" VERSION="7.8 (Maipo)" ID="rhel" ID_LIKE="fedora" 如前所述,我从给定的链接尝试了多种方法:
极限值
ulimit -c
unlimited
cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c %d %P %E
Run Code Online (Sandbox Code Playgroud)
我检查时发现文件夹 ap 不存在
我还尝试使用以 /tmp 开头的字符串修改 /proc/sys/kernel/core_pattern
echo "/tmp/cores/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
/proc/sys/kernel/core_pattern: Read-only file system
Run Code Online (Sandbox Code Playgroud)
如果我以 root 身份运行,这会起作用吗,因为我目前没有该访问权限?
我运行应用程序的目录中也不存在核心转储文件。
我也尝试在整个系统上查找:
find / -name 'core*'
find / -name '*apport*'
Run Code Online (Sandbox Code Playgroud)
我还检查了不同的文件夹:
ls /var/cache/abrt
ls: cannot access /var/cache/abrt: No such file or directory
ls /var/crash
ls: cannot access /var/crash: No such file or directory
ls /var/spool/abrt
ls: …
Run Code Online (Sandbox Code Playgroud) 我为 SSH 连接配置了密钥对。它可以工作,但当然需要密码。
ssh user1@10.7.175.143
Run Code Online (Sandbox Code Playgroud)
所以现在我尝试使用我安装的 sshpass 登录。我尝试过使用-p
财产,但也尝试过使用-f
财产,但没有任何效果 - 它只是挂起。
verbose 在客户端提供这些信息
sshpass -v -p "pass" ssh user1@10.7.175.143
SSHPASS searching for password prompt using match "assword"
SSHPASS read:
SSHPASS read: Enter passphrase for key '/home/user1/.ssh/id_rsa':
Run Code Online (Sandbox Code Playgroud)
在服务器端我可以在日志中看到这些信息:
Accepted key RSA SHA256:V/V29pA2Ps5k/lBgz2R5XFP6vaaaOUN5hj0hca+j8TI found at __PROGRAMDATA__/ssh/administrators_authoriz
ed_keys:1
debug3: mm_answer_keyallowed: publickey authentication test: RSA key is allowed
debug3: mm_request_send: entering, type 23
debug3: send packet: type 60 [preauth]
debug2: userauth_pubkey: authenticated 0 pkalg rsa-sha2-256 [preauth]
debug3: user_specific_delay: user specific delay …
Run Code Online (Sandbox Code Playgroud)