AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[gentoo](server)

Martin Hope
Sai Chaithanya
Asked: 2024-06-08 00:32:25 +0800 CST

syslog-ng 不记录信息级别日志

  • 5

我有以下 syslog-ng 配置

@version: 4.6
#
# Syslog-ng default configuration file for Gentoo Linux

# https://bugs.gentoo.org/426814
@include "scl.conf"

options {
    threaded(yes);
    chain_hostnames(no);

    # The default action of syslog-ng is to log a STATS line
    # to the file every 10 minutes.  That's pretty ugly after a while.
    # Change it to every 12 hours so you get a nice daily update of
    # how many messages syslog-ng missed (0).
    stats(freq(43200));
    # The default action of syslog-ng is to log a MARK line
    # to the file every 20 minutes.  That's seems high for most
    # people so turn it down to once an hour.  Set it to zero
    # if you don't want the functionality at all.
    mark_freq(3600);
};

source src { system(); internal(); };

destination messages { file("/var/log/messages"); };
destination kern { file("/var/log/kern.log"); };
destination auth { file("/var/log/auth.log"); };
destination mail { file("/var/log/mail.log"); };

filter kern_f { level(debug..emerg) and facility(kern); };
filter auth_f { level(debug..emerg) and facility(auth) and facility(authpriv); };
filter mail_f { level(debug..emerg) and facility(mail); };
filter default_f { level(debug..emerg) and not (facility(mail)) and not (facility(auth)) and not (facility(kern)); };

# By default messages are logged to tty12...
destination console_all { file("/dev/tty12"); };
# ...if you intend to use /dev/console for programs like xconsole
# you can comment out the destination line above that references /dev/tty12
# and uncomment the line below.
#destination console_all { file("/dev/console"); };

log { source(src); filter(default_f); destination(messages); };
log { source(src); filter(auth_f); destination(auth); };
log { source(src); filter(kern_f); destination(kern); };
log { source(src); filter(mail_f); destination(mail); };
log { source(src); destination(console_all); };

但是我的 kern.log 现在只显示以下日志:

Jun  7 21:48:03 ash kernel: Loading firmware: rtl_nic/rtl8168h-2.fw
Jun  7 21:48:03 ash kernel: Generic FE-GE Realtek PHY r8169-0-700:00: at
tached PHY driver (mii_bus:phy_addr=r8169-0-700:00, irq=MAC)
Jun  7 21:48:03 ash kernel: r8169 0000:07:00.0 enp7s0: Link is Down
Jun  7 21:48:03 ash kernel: warning: `grep' uses wireless extensions whi
ch will stop working for Wi-Fi 7 hardware; use nl80211
Jun  7 21:48:04 ash kernel: (udev-worker) (887) used greatest stack dept
h: 11720 bytes left
Jun  7 21:48:04 ash kernel: iwlwifi 0000:00:14.3: Registered PHC clock:
iwlwifi-PTP, with index: 0
Jun  7 21:48:07 ash kernel: wlp0s20f3: authenticate with **:**:**:**:**:** (local address=**:**:**:**:**:**)
Jun  7 21:48:07 ash kernel: wlp0s20f3: send auth to **:**:**:**:**:** (t
ry 1/3)
Jun  7 21:48:07 ash kernel: wlp0s20f3: authenticated
Jun  7 21:48:07 ash kernel: wlp0s20f3: associate with **:**:**:**:**:**
(try 1/3)
Jun  7 21:48:07 ash kernel: wlp0s20f3: RX AssocResp from **:**:**:**:**:** (capab=0x1111 status=0 aid=5)
Jun  7 21:48:07 ash kernel: wlp0s20f3: associated
Jun  7 21:48:13 ash kernel: Bluetooth: RFCOMM TTY layer initialized
Jun  7 21:48:13 ash kernel: Bluetooth: RFCOMM socket layer initialized
Jun  7 21:48:13 ash kernel: Bluetooth: RFCOMM ver 1.11

使用时sysklogd我曾经获取过所有的信息日志但是切换到后syslog-ng我没有看到这种情况发生?

发生这种情况有什么原因吗?

编辑1:

系统内核详细信息:

Linux ash 6.9.3-gentoo #1 SMP PREEMPT_DYNAMIC Mon Jun 3 21:46:01 IST 2024 x86_64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz GenuineIntel GNU/Linux

编辑2:

在 grub 配置中将默认内核日志级别更改为 6,启动后记录表明日志级别已明确设置:

dmesg -l info
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-6.9.3-gentoo root=PARTUUID=4a5f5d65-81be-e24d-bedc-aeb2f0b24295 ro loglevel=6 i8042.nopnp mmio_stale_data=full libata.noacpi=1 resume=PARTUUID=c302ea25-d8e2-064e-8ebd-c79276fad2cc drm.edid_firmware=edid/1920x1080_BOE08E8.bin nvidia-drm.modeset=1

但问题仍然存在,我没有看到任何与信息日志级别相对应的内核日志。

令人惊讶的是,日志级别实际上没有设置,

如果我执行cat /proc/sys/kernel/printk,我会看到以下输出,

1       4       1       7

上述输出中第一个整数表示的默认日志级别仍为 1。

gentoo
  • 2 个回答
  • 62 Views
Martin Hope
jbean223
Asked: 2022-04-20 20:08:43 +0800 CST

编写 Gentoo ebuilds:如何使用 flag-o-matic eclass 正确添加库

  • 0

我正在尝试编写一个 ebuild(我对编写 ebuilds 很陌生),我需要添加库 -ltinfo 来链接。

我的 ebuild 看起来像:

EAPI=8
inherit flag-o-matic
...
src_compile() {
    append-libs -ltinfo
    default
}

其他一切都几乎是默认的,但在出现日志中,我没有看到-ltinfo包含在库中,并且无法编译。

linux gentoo
  • 1 个回答
  • 35 Views
Martin Hope
Jens Björnhager
Asked: 2020-07-22 15:01:01 +0800 CST

Postfix: 由于 aliases.db 权限问题,postfix 服务启动时 newaliases 失败

  • 0

我最近开始将我的邮件服务器迁移到 systemd。

我有一个别名哈希图:

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases

启动服务时:

systemctl restart postfix

无论我设置什么权限,newalias 和 postalias 都会抱怨我的 aliases.db 权限:

● postfix.service - Postfix Mail Transport Agent
     Loaded: loaded (/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2020-07-22 00:36:08 CEST; 22ms ago
    Process: 299515 ExecStartPre=/usr/bin/newaliases (code=exited, status=1/FAILURE)
    Process: 299518 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
   Main PID: 299596 (master)
        CPU: 721ms
     CGroup: /system.slice/postfix.service
             ├─299596 /usr/libexec/postfix/master -w
             ├─299597 pickup -l -t unix -u
             └─299598 qmgr -l -t unix -u

jul 22 00:36:07 rulakir systemd[1]: Starting Postfix Mail Transport Agent...
jul 22 00:36:07 rulakir newaliases[299515]: postalias: fatal: open /etc/postfix/aliases.db: Read-only file system
jul 22 00:36:07 rulakir postfix/postalias[299515]: fatal: open /etc/postfix/aliases.db: Read-only file system
jul 22 00:36:08 rulakir postfix/postfix-script[299582]: warning: group or other writable: /etc/postfix/./aliases.db
jul 22 00:36:08 rulakir postfix/postfix-script[299594]: starting the Postfix mail system
jul 22 00:36:08 rulakir postfix/master[299596]: daemon started -- version 3.5.1, configuration /etc/postfix
jul 22 00:36:08 rulakir systemd[1]: Started Postfix Mail Transport Agent.

它抱怨它只读,但是如果我将组或所有者更改为后缀,它会抱怨它应该由 root 拥有和/或它具有写权限。我应该给aliases和什么权限aliases.db?

linux email postfix gentoo systemd
  • 1 个回答
  • 786 Views
Martin Hope
Kaizu
Asked: 2019-11-02 03:00:36 +0800 CST

ejabberd 有关于未定义函数的问题

  • 1

我的 Gentoo Hardened 服务器上的 XMPP 出现错误。它运行并说它正在运行,但是在尝试记录许多这些错误时出现了崩溃。

2019-11-01 10:56:54.748 [error] <0.563.0>@xmpp_idna:domain_utf8_to_ascii CRASH REPORT Process <0.563.0> with 0 neighbours exited with reason: call to undefined function xmpp_idna:domain_utf8_to_ascii(<<"XXXXXXXX">>) in p1_server:terminate/7 line 878 

我怀疑我必须安装依赖项或其他东西,或者 Gentoo ebuild 可能已损坏。

我最近将 ejabberd 从 18.03 更新到 18.09,这是它开始的时候。

我在这个系统上使用 dev-erlang/xmpp 1.4.2。

gentoo
  • 1 个回答
  • 95 Views
Martin Hope
Francis Booth
Asked: 2017-03-04 03:13:37 +0800 CST

来自主机的虚拟机的 IPv6 公共路由

  • 3

所以我有一个OVH的专用服务器。有了它,我得到了 /64 范围的 IPv6 地址和 1 个公共 IPv4 地址。我购买了第二个 IPv4 地址作为后备。

主机正在运行 Xen 管理程序,我已经设置了网桥

bridge name bridge id       STP enabled interfaces
br0     8000.0cc47ac4292c   no      eno3
                                    vif4.0
                                    vif4.0-emu
virbr0  8000.525400a2390a   yes     virbr0-nic

我能够让 VM 与 IPv4 和 IPv6 地址连接(尽管它只会使用 IPv6)但是作为测试,我将 VM 的 MAC 地址从为我的后备和繁荣列出的地址中更改,不再有 IPv6 连接,但一次我重新设置了 MAC 地址,它就像下雨一样正常工作。

主机ipv6路由表

2607:5300:61:45b::/64 dev br0  proto kernel  metric 256  pref medium
2607:5300:61:400::/56 dev eno3  proto kernel  metric 202  mtu 1500 pref medium
fe80::/64 dev eno3  proto kernel  metric 256  pref medium
fe80::/64 dev eno4  proto kernel  metric 256  pref medium
fe80::/64 dev br0  proto kernel  metric 256  pref medium
fe80::/64 dev vif4.0-emu  proto kernel  metric 256  pref medium
fe80::/64 dev vif4.0  proto kernel  metric 256  pref medium
ff00::/8 dev eno3  metric 256  pref medium
ff00::/8 dev eno4  metric 256  pref medium
ff00::/8 dev br0  metric 256  pref medium
ff00::/8 dev vif4.0-emu  metric 256  pref medium
ff00::/8 dev vif4.0  metric 256  pref medium
default via fe80::205:73ff:fea0:0 dev br0  metric 1024  pref medium

访客 ipv6 路由表

2607:5300:61:45b::/64 dev eth0  proto kernel  metric 256  pref medium
2607:5300:61:400::/56 dev eth0  proto kernel  metric 256  expires 2591946sec pref medium
fe80::/64 dev eth0  proto kernel  metric 256  pref medium
default via fe80::205:73ff:fea0:0 dev eth0  proto ra  metric 1024  expires 1746sec hoplimit 64 pref medium

理想情况下,我希望能够创建具有自己的可公开路由的 IPv6 地址的 VM,而不必为每个 VM 设置一个单独的备用 IPv4 地址。

顺便说一句,主机系统正在运行 Gentoo。

xen linux ipv6 gentoo ovh
  • 1 个回答
  • 1408 Views
Martin Hope
Salis
Asked: 2016-04-28 14:09:22 +0800 CST

即使协议列为可用,NFS 客户端也会失败并显示“不支持协议”

  • 2

我为 Proxmox 设置了一个 NFS 服务,以便在那里远程备份 VM 映像。由于某种原因,Proxmox 盒子无法连接到 NFS 服务器。我测试了与另一台服务器上的另一个 NFS 客户端的连接,它工作正常。我不确定出了什么问题,因为就客户端的命令而言,它确实支持这些连接类型(版本 3 和 4)。我不确定我在这里缺少什么。

为简单起见,将 IP 替换为 SERVER_IP 和 CLIENT_IP

坐骑列表:

root@client:~# showmount SERVER_IP -e
Export list for SERVER_IP:
/export/backups CLIENT_IP/32
/export         CLIENT_IP/32

支持的协议列表:

root@client:~# rpcinfo -p SERVER_IP | egrep "service|nfs"
   program vers proto   port  service
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs

尝试挂载远程导出:

root@client: mkdir -p /nfs/backups
root@client:~# mount SERVER_IP:/export/backups /nfs/backups -vv
mount.nfs: timeout set for Wed Apr 27 17:55:34 2016
mount.nfs: trying text-based options 'vers=4,addr=SERVER_IP,clientaddr=CLIENT_IP'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=SERVER_IP'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying SERVER_IP prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying SERVER_IP prog 100005 vers 3 prot UDP port 38873
mount.nfs: mount(2): Protocol not supported
mount.nfs: Protocol not supported

我/etc/exports在服务器上:

/export CLIENT_IP/32(rw,sync,no_subtree_check,sec=sys,fsid=0)
/export/backups CLIENT_IP/32(rw,sync,no_subtree_check,all_squash,anonuid=1010,anongid=1010)

/export/backups是mount --rbind /home/backups /export/backups。1010 是备份用户的 uid 和 gid。

中唯一编辑的设置/etc/conf.d/nfs:

OPTS_RPC_NFSD="8 -N 2 -V 3 -V 4 -V 4.1"

有没有人有任何想法?提前致谢。

linux nfs gentoo proxmox
  • 1 个回答
  • 24162 Views
Martin Hope
Shelvacu
Asked: 2016-04-22 15:56:13 +0800 CST

为什么我不应该在我启动的分区上使用条带化突袭?

  • 3

Gentoo 手册说:

您不应在引导的分区上使用任何形式的条带化,例如 RAID-0 或 RAID-5。

为什么是这样?我以前从未见过类似的警告。Grub 支持从 raid0 磁盘启动,只要编译了模块,内核就支持它。我还缺少什么吗?

编辑:Arch Linux关于raid 的部分没有特别提到关于striped raid 的内容。这个警告是针对 Gentoo 的吗?

raid boot gentoo
  • 1 个回答
  • 72 Views
Martin Hope
yshurik
Asked: 2015-10-02 12:15:21 +0800 CST

gentoo 上已安装软件包的列表以及所有使用标志

  • 1

在 gentoo 上获取我所有已安装软件包的列表并指示所有已使用/未使用的使用标志、版本等的技巧或可能性是什么?

运行emerge for update时看到的类似的东西,但是有没有一个选项可以看到我已经安装的内容与emerge显示的格式相同?

gentoo
  • 1 个回答
  • 1908 Views
Martin Hope
Eskat0n
Asked: 2012-09-26 20:22:54 +0800 CST

在 Gentoo Linux 启动时执行特定的 bash 脚本

  • 4

我拥有一个运行 Gentoo Linux 的 VDS,我很好奇如何在我的 VDS 启动时执行特定的 bash 脚本。

我只想在启动时启动 apache2 并运行两个瘦实例。

gentoo
  • 2 个回答
  • 3412 Views
Martin Hope
Samuel Husky
Asked: 2012-07-02 08:13:32 +0800 CST

在上网本对它执行 ping 之前,我无法从我网络上的任何机器连接到我的上网本

  • 2

我的上网本在我的本地网络上有一个相当奇怪的问题。当尝试从远程系统以任何方式连接到它时,它似乎没有找到它。但是,如果我让上网本 ping 尝试连接的机器,它似乎可以正常工作。

下面是从我的主 PC 到上网本的 ping 测试。

C:\Users\Sam>ping 192.168.8.102

Pinging 192.168.8.102 with 32 bytes of data:
Reply from 192.168.8.100: Destination host unreachable.
Reply from 192.168.8.100: Destination host unreachable.
Reply from 192.168.8.100: Destination host unreachable.
Reply from 192.168.8.100: Destination host unreachable.

Ping statistics for 192.168.8.102:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

现在从上网本 ping 我的主 PC

sam@malamute ~ $ ping 192.168.8.100
PING 192.168.8.100 (192.168.8.100) 56(84) bytes of data.
64 bytes from 192.168.8.100: icmp_req=1 ttl=128 time=2.46 ms
64 bytes from 192.168.8.100: icmp_req=2 ttl=128 time=0.835 ms
64 bytes from 192.168.8.100: icmp_req=3 ttl=128 time=1.60 ms
64 bytes from 192.168.8.100: icmp_req=4 ttl=128 time=1.32 ms
64 bytes from 192.168.8.100: icmp_req=5 ttl=128 time=1.34 ms
^C
--- 192.168.8.100 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4004ms
rtt min/avg/max/mdev = 0.835/1.514/2.460/0.536 ms

在上网本与主 PC 建立连接后,再次从主 PC 发出相同的 ping

C:\Users\Sam>ping 192.168.8.102

Pinging 192.168.8.102 with 32 bytes of data:
Reply from 192.168.8.102: bytes=32 time=1ms TTL=64
Reply from 192.168.8.102: bytes=32 time=1ms TTL=64
Reply from 192.168.8.102: bytes=32 time=1ms TTL=64
Reply from 192.168.8.102: bytes=32 time=1ms TTL=64

Ping statistics for 192.168.8.102:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 1ms, Average = 1ms

上网本正在运行 Gentoo,目前通过无线连接。

我的主 PC 运行的是 Windows 7,但是无论我在此网络上使用哪台 PC,我都会得到相同的结果。请从同一网络上的 CentOS 机器上查看此示例

[root@tiger ~]# ping 192.168.8.102
PING 192.168.8.102 (192.168.8.102) 56(84) bytes of data.
From 192.168.8.200 icmp_seq=2 Destination Host Unreachable
From 192.168.8.200 icmp_seq=3 Destination Host Unreachable
From 192.168.8.200 icmp_seq=4 Destination Host Unreachable

--- 192.168.8.102 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5000ms
, pipe 3

如果您需要更多信息或需要日志或配置文件,请告诉我,我们将不胜感激。

附加信息:

来自上网本的 TCP 转储没有响应。

从 USB 密钥启动到 Ubuntu 时,结果相同。

使用有线以太网连接时没有问题。

windows ping gentoo
  • 1 个回答
  • 390 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve