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
    • 最新
    • 标签
主页 / user-28829

Antonio's questions

Martin Hope
Antonio
Asked: 2013-11-10 09:10:37 +0800 CST

SElinux 进程在尝试设置布尔值时被杀死

  • 1

我有一个奇怪的问题。我不能让 apache 连接到我的 CentOC 6.4 机器上的数据库:

[root@centos6 ~]# setsebool -P httpd_can_network_connect on
Killed
[root@centos6 ~]# sestatus -b | grep httpd_can_network_connect
httpd_can_network_connect                   off
httpd_can_network_connect_cobbler           off
httpd_can_network_connect_db                off

我查看了日志文件,但没有日志消息:

tail -f /var/log/audit/audit.log

更新:

中有一些信息/var/log/messages:

Nov  9 19:07:16 centos6 kernel: setsebool invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0, oom_score_adj=0
Nov  9 19:07:16 centos6 kernel: setsebool cpuset=/ mems_allowed=0
Nov  9 19:07:16 centos6 kernel: Pid: 1660, comm: setsebool Not tainted 2.6.32-358.23.2.el6.x86_64 #1
Nov  9 19:07:16 centos6 kernel: Call Trace:
Nov  9 19:07:16 centos6 kernel: [<ffffffff810cb641>] ? cpuset_print_task_mems_allowed+0x91/0xb0
Nov  9 19:07:16 centos6 kernel: [<ffffffff8111ce40>] ? dump_header+0x90/0x1b0
Nov  9 19:07:16 centos6 kernel: [<ffffffff8111d2c2>] ? oom_kill_process+0x82/0x2a0
Nov  9 19:07:16 centos6 kernel: [<ffffffff8111d201>] ? select_bad_process+0xe1/0x120
Nov  9 19:07:16 centos6 kernel: [<ffffffff8111d700>] ? out_of_memory+0x220/0x3c0
Nov  9 19:07:16 centos6 kernel: [<ffffffff8112c3dc>] ? __alloc_pages_nodemask+0x8ac/0x8d0
Nov  9 19:07:16 centos6 kernel: [<ffffffff81160d6a>] ? alloc_pages_vma+0x9a/0x150
Nov  9 19:07:16 centos6 kernel: [<ffffffff81143f0b>] ? handle_pte_fault+0x76b/0xb50
Nov  9 19:07:16 centos6 kernel: [<ffffffff81228664>] ? task_has_capability+0xb4/0x110
Nov  9 19:07:16 centos6 kernel: [<ffffffff81004a49>] ? __raw_callee_save_xen_pmd_val+0x11/0x1e
Nov  9 19:07:16 centos6 kernel: [<ffffffff8114452a>] ? handle_mm_fault+0x23a/0x310
Nov  9 19:07:16 centos6 kernel: [<ffffffff811485b6>] ? vma_adjust+0x556/0x5e0
Nov  9 19:07:16 centos6 kernel: [<ffffffff810474e9>] ? __do_page_fault+0x139/0x480
Nov  9 19:07:16 centos6 kernel: [<ffffffff81148b8a>] ? vma_merge+0x29a/0x3e0
Nov  9 19:07:16 centos6 kernel: [<ffffffff81149fdc>] ? do_brk+0x26c/0x350
Nov  9 19:07:16 centos6 kernel: [<ffffffff8100ba1d>] ? retint_restore_args+0x5/0x6
Nov  9 19:07:16 centos6 kernel: [<ffffffff81513bfe>] ? do_page_fault+0x3e/0xa0
Nov  9 19:07:16 centos6 kernel: [<ffffffff81510fb5>] ? page_fault+0x25/0x30
Nov  9 19:07:16 centos6 kernel: Mem-Info:
Nov  9 19:07:16 centos6 kernel: Node 0 DMA per-cpu:
Nov  9 19:07:16 centos6 kernel: CPU    0: hi:    0, btch:   1 usd:   0
Nov  9 19:07:16 centos6 kernel: Node 0 DMA32 per-cpu:
Nov  9 19:07:16 centos6 kernel: CPU    0: hi:  186, btch:  31 usd:  30
Nov  9 19:07:16 centos6 kernel: active_anon:132249 inactive_anon:46 isolated_anon:0
Nov  9 19:07:16 centos6 kernel: active_file:56 inactive_file:59 isolated_file:0
Nov  9 19:07:16 centos6 kernel: unevictable:0 dirty:2 writeback:0 unstable:0
Nov  9 19:07:16 centos6 kernel: free:1369 slab_reclaimable:1774 slab_unreclaimable:11588
Nov  9 19:07:16 centos6 kernel: mapped:54 shmem:48 pagetables:1211 bounce:0
Nov  9 19:07:16 centos6 kernel: Node 0 DMA free:2440kB min:72kB low:88kB high:108kB active_anon:12156kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:14648kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:24kB slab_unreclaimable:8kB kernel_stack:0kB pagetables:16kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Nov  9 19:07:16 centos6 kernel: lowmem_reserve[]: 0 590 590 590
Nov  9 19:07:16 centos6 kernel: Node 0 DMA32 free:3036kB min:3072kB low:3840kB high:4608kB active_anon:516840kB inactive_anon:184kB active_file:224kB inactive_file:236kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:604988kB mlocked:0kB dirty:8kB writeback:0kB mapped:216kB shmem:192kB slab_reclaimable:7072kB slab_unreclaimable:46344kB kernel_stack:880kB pagetables:4828kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:128 all_unreclaimable? no
Nov  9 19:07:16 centos6 kernel: lowmem_reserve[]: 0 0 0 0
Nov  9 19:07:16 centos6 kernel: Node 0 DMA: 0*4kB 1*8kB 0*16kB 0*32kB 0*64kB 1*128kB 1*256kB 0*512kB 0*1024kB 1*2048kB 0*4096kB = 2440kB
Nov  9 19:07:16 centos6 kernel: Node 0 DMA32: 129*4kB 67*8kB 30*16kB 19*32kB 6*64kB 2*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3036kB
Nov  9 19:07:16 centos6 kernel: 182 total pagecache pages
Nov  9 19:07:16 centos6 kernel: 0 pages in swap cache
Nov  9 19:07:16 centos6 kernel: Swap cache stats: add 0, delete 0, find 0/0
Nov  9 19:07:16 centos6 kernel: Free swap  = 0kB
Nov  9 19:07:16 centos6 kernel: Total swap = 0kB
Nov  9 19:07:16 centos6 kernel: 157439 pages RAM
Nov  9 19:07:16 centos6 kernel: 6271 pages reserved
Nov  9 19:07:16 centos6 kernel: 2686 pages shared
Nov  9 19:07:16 centos6 kernel: 146395 pages non-shared
Nov  9 19:07:16 centos6 kernel: [ pid ]   uid  tgid total_vm      rss cpu oom_adj oom_score_adj name
Nov  9 19:07:16 centos6 kernel: [  271]     0   271     2798      231   0     -17         -1000 udevd
Nov  9 19:07:16 centos6 kernel: [  476]     0   476     2797      230   0     -17         -1000 udevd
Nov  9 19:07:16 centos6 kernel: [  718]     0   718     2279      122   0       0             0 dhclient
Nov  9 19:07:16 centos6 kernel: [  762]     0   762     6909       58   0     -17         -1000 auditd
Nov  9 19:07:16 centos6 kernel: [  787]     0   787    62270      147   0       0             0 rsyslogd
Nov  9 19:07:16 centos6 kernel: [  801]    25   801    40326     2655   0       0             0 named
Nov  9 19:07:16 centos6 kernel: [  850]     0   850    16563      172   0     -17         -1000 sshd
Nov  9 19:07:16 centos6 kernel: [  875]     0   875    23451      240   0       0             0 sshd
Nov  9 19:07:16 centos6 kernel: [  966]   498   966     4780       44   0       0             0 wrapper
Nov  9 19:07:16 centos6 kernel: [  968]   498   968   497404    40812   0       0             0 java
Nov  9 19:07:16 centos6 kernel: [ 1057]     0  1057    20216      225   0       0             0 master
Nov  9 19:07:16 centos6 kernel: [ 1064]    89  1064    20278      209   0       0             0 qmgr
Nov  9 19:07:16 centos6 kernel: [ 1071]     0  1071    27075      121   0       0             0 bash
Nov  9 19:07:16 centos6 kernel: [ 1111]     0  1111    24880      350   0       0             0 httpd
Nov  9 19:07:16 centos6 kernel: [ 1117]    48  1117    24913      351   0       0             0 httpd
Nov  9 19:07:16 centos6 kernel: [ 1118]    48  1118    24880      337   0       0             0 httpd
Nov  9 19:07:16 centos6 kernel: [ 1119]    48  1119    24880      337   0       0             0 httpd
Nov  9 19:07:16 centos6 kernel: [ 1120]    48  1120    24880      337   0       0             0 httpd
Nov  9 19:07:16 centos6 kernel: [ 1121]    48  1121    24880      337   0       0             0 httpd
Nov  9 19:07:16 centos6 kernel: [ 1122]    48  1122    24880      337   0       0             0 httpd
Nov  9 19:07:16 centos6 kernel: [ 1124]    48  1124    24880      337   0       0             0 httpd
Nov  9 19:07:16 centos6 kernel: [ 1125]    48  1125    24880      337   0       0             0 httpd
Nov  9 19:07:16 centos6 kernel: [ 1129]     0  1129    29313      151   0       0             0 crond
Nov  9 19:07:16 centos6 kernel: [ 1143]     0  1143     1018       22   0       0             0 agetty
Nov  9 19:07:16 centos6 kernel: [ 1146]     0  1146     1015       22   0       0             0 mingetty
Nov  9 19:07:16 centos6 kernel: [ 1514]     0  1514    23451      237   0       0             0 sshd
Nov  9 19:07:16 centos6 kernel: [ 1517]     0  1517    27075      113   0       0             0 bash
Nov  9 19:07:16 centos6 kernel: [ 1641]    89  1641    20236      218   0       0             0 pickup
Nov  9 19:07:16 centos6 kernel: [ 1659]     0  1659    25234       39   0       0             0 tail
Nov  9 19:07:16 centos6 kernel: [ 1660]     0  1660    89903    85712   0       0             0 setsebool
Nov  9 19:07:16 centos6 kernel: Out of memory: Kill process 1660 (setsebool) score 568 or sacrifice child
Nov  9 19:07:16 centos6 kernel: Killed process 1660, UID 0, (setsebool) total-vm:359612kB, anon-rss:342708kB, file-rss:140kB
centos
  • 1 个回答
  • 972 Views
Martin Hope
Antonio
Asked: 2013-02-12 07:15:19 +0800 CST

Selinux 在 CentOS 6.3 中阻止 wordpress

  • 1

我使用命令将 wordpress 3.5 安装到 CentOS 6.3:

yum install wordpress

并启动了 httpd。现在我可以在 apache 日志中看到以下错误:

PHP 致命错误:require_once(): 需要打开失败 '/usr/share/wordpress/wp-includes/class-simplepie.php' (include_path='.:/usr/share/pear:/usr/share/php')在第 4 行的 /usr/share/wordpress/wp-includes/class-feed.php 中,referer: http ://www.mycompany.com/wp-admin/

我想那是因为 SELinux:

ls -Z /usr/share/wordpress/wp-includes/class-simplepie.php 
lrwxrwxrwx. root root system_u:object_r:usr_t:s0 class-simplepie.php -> /usr/share/php/php-simplepie

ls -Z /usr/share/php/php-simplepie
-rw-r--r--. root root unconfined_u:object_r:user_home_t:s0 autoloader.php
drwxr-xr-x. root root unconfined_u:object_r:user_home_t:s0 SimplePie
-rw-r--r--. root root unconfined_u:object_r:user_home_t:s0 SimplePie.php

我想知道是否有办法让它在不禁用 SELinux 的情况下工作?

centos
  • 4 个回答
  • 2479 Views
Martin Hope
Antonio
Asked: 2013-01-21 10:59:26 +0800 CST

有没有办法在不禁用 SElinux 的情况下通过 SMB 共享通过 NFS 安装的文件系统?

  • 3

我有两个 CentOS 主机。第一个是 NAS,第二个是无盘 SMB 服务器。NAS 服务器通过 NFS 共享文件夹,并与 SMB 服务器建立安全的以太网连接。SMB 服务器将内容共享到 Intranet、WiFi 等。

当我运行这个命令时,我遇到了一些麻烦:

[root@smbserver ~]# chcon -t samba_share_t /mnt/distr/
chcon: failed to change context of `/mnt/distr/' to `system_u:object_r:samba_share_t:s0': Operation not supported

我尝试使用 /etc/fstab 中的选项挂载此共享:

nasserver:/mnt/distr /mnt/distr nfs context="system_u:object_r:samba_share_t:s0" 0 0

但这也于事无补。

有没有办法在不禁用 SElinux 的情况下通过 SMB 共享通过 NFS 安装的文件系统?

centos
  • 1 个回答
  • 1803 Views
Martin Hope
Antonio
Asked: 2012-09-17 01:39:32 +0800 CST

高负载下的 iSCSI 超时

  • 0

我有两台通过千兆以太网连接的服务器。一个是 iSCSI target,第二个是 initiator。当我mkfs.ext4在启动器上运行时,一段时间后磁盘 IO 在目标中严重减慢。在目标主机中,我可以在系统日志中看到以下内容:

Sep 14 09:40:03 sh11 tgtd: abort_task_set(1139) found 119668c 0
Sep 14 09:40:03 sh11 tgtd: abort_cmd(1115) found 119668c 6
Sep 14 09:40:03 sh11 tgtd: abort_task_set(1139) found 119668d 0
Sep 14 09:40:03 sh11 tgtd: abort_cmd(1115) found 119668d 6
Sep 14 09:40:03 sh11 tgtd: abort_task_set(1139) found 119668e 0
Sep 14 09:40:03 sh11 tgtd: abort_cmd(1115) found 119668e 6
Sep 14 09:40:03 sh11 tgtd: abort_task_set(1139) found 1196696 0
Sep 14 09:40:03 sh11 tgtd: abort_cmd(1115) found 1196696 6
Sep 14 09:40:03 sh11 tgtd: abort_task_set(1139) found 119669e 0
Sep 14 09:40:03 sh11 tgtd: abort_cmd(1115) found 119669e 6
Sep 14 09:40:04 sh11 tgtd: abort_task_set(1139) found 119669f 0
Sep 14 09:40:04 sh11 tgtd: abort_cmd(1115) found 119669f 6

平均负载增长到 12 甚至更多:

# uptime
 12:37:00 up 23 days, 13:25,  1 user,  load average: 12.00, 7.00, 4.00
  • 中央操作系统 6.3
  • tgtd 1.0.24
  • 英特尔奔腾 4 2.4GHz
  • 1Gb 内存
  • 2Tb WD Cavlar 绿色 SATA 2.0
#lspci
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 02)
00:01.0 PCI bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE Host-to-AGP Bridge (rev 02)
00:1d.0 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 02)
00:1d.2 USB controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 02)
00:1d.7 USB controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 82)
00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 02)
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV200 QW [Radeon 7500]
02:01.0 Ethernet controller: D-Link System Inc DGE-530T Gigabit Ethernet Adapter (rev 11) (rev 11)
02:02.0 RAID bus controller: VIA Technologies, Inc. VT6421 IDE/SATA Controller (rev 50)
02:03.0 RAID bus controller: VIA Technologies, Inc. VT6421 IDE/SATA Controller (rev 50)
02:04.0 RAID bus controller: Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller (rev 02)
02:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (CNR) Ethernet Controller (rev 82)

有没有办法调整目标主机以避免这些超时?

更新 失败磁盘显示以下值:

# smartctl -A /dev/sdb
smartctl 5.42 2011-10-20 r3458 [i686-linux-2.6.32-279.2.1.el6.i686] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED >     RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   167   167   021    Pre-fail  Always       -       6633
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       93
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   088   088   000    Old_age   Always       -       9444
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       91
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       64
193 Load_Cycle_Count        0x0032   001   001   000    Old_age   Always       -       722663
194 Temperature_Celsius     0x0022   104   092   000    Old_age   Always       -       46
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       1
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0
linux
  • 4 个回答
  • 2185 Views
Martin Hope
Antonio
Asked: 2010-04-06 09:17:21 +0800 CST

Gmail 中的数字签名和加密

  • 4

我只是想知道是否有办法使用 SSL 证书或 PGP 密钥来签署我的电子邮件。

目前我必须在 Outlook(或其他胖客户端)中设置 S/MIME 以通过 SMTP 发送签名邮件。它对我有用,但我正在寻找一种方法来使用 GMail 的网络界面来做同样的事情。

ssl pgp gmail g-suite digital-signatures
  • 2 个回答
  • 574 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