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-94884

hkguile's questions

Martin Hope
hkguile
Asked: 2015-09-20 22:40:00 +0800 CST

Fail2ban 启动失败,出现几条错误消息

  • 0

我已经fail2ban为我的 CentOS 6 安装了,但是当它启动时,我收到错误消息

Failed to start server : Starting fail2ban: WARNING 'ignoreregex' 
not defined in 'Definition'. Using default one: '' ERROR No file(s) 
found for glob /var/log/mail.log ERROR Failed during configuration: 
Have not found any log file for sasl-iptables jail [FAILED]

有没有人如何解决它?

linux
  • 1 个回答
  • 213 Views
Martin Hope
hkguile
Asked: 2014-11-11 00:08:56 +0800 CST

起搏器无法启动 drbd 资源

  • 1

这是 crm 配置显示

[root@node1 /]# crm configure show
node node1
node node1.mycluster.org
node node2
node node2.mycluster.org
primitive Apache apache \
        params configfile="/etc/httpd/conf/httpd.conf" \
        op monitor interval=30s \
        op start timeout=40s interval=0 \
        op stop timeout=60s interval=0 \
        meta target-role=Started
primitive drbd_res ocf:linbit:drbd \
        params drbd_resource=data \
        op monitor interval=29s role=Master \
        op monitor interval=31s role=Slave
primitive failover_ip IPaddr2 \
        params ip=192.168.1.100 cidr_netmask=32 \
        op monitor interval=30s \
        meta target-role=Started
primitive fs_res Filesystem \
        params device="/dev/drbd0" directory="/data" fstype=ext4
ms drbd_master_slave drbd_res \
        meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true target-role=Started
location cli-ban-Apache-on-node2.mycluster.org Apache role=Started -inf: node2.mycluster.org
location cli-ban-drbd_res-on-node1.mycluster.org drbd_res role=Started -inf: node1.mycluster.org
colocation apache_ip_colo inf: Apache failover_ip
colocation fs_drbd_colo inf: fs_res drbd_master_slave:Master
order apache_after_ip Mandatory: failover_ip Apache
order fs_after_drbd Mandatory: drbd_master_slave:promote fs_res:start
property cib-bootstrap-options: \
        dc-version=1.1.10-14.el6_5.3-368c726 \
        cluster-infrastructure="classic openais (with plugin)" \
        expected-quorum-votes=2 \
        stonith-enabled=false \
        no-quorum-policy=ignore

node1 之前:crm 资源启动 drbd_res

[root@node2 /]# service drbd status
drbd driver loaded OK; device status:
version: 8.3.16 (api:88/proto:86-97)
GIT-hash: a798fa7e274428a357657fb52f0ecf40192c1985 build by phil@Build64R6, 2013-09-27 16:00:43
m:res   cs         ro                 ds                 p  mounted  fstype
0:data  Connected  Secondary/Primary  UpToDate/UpToDate  C

node1之后:crm资源启动drbd_res

 [root@node1 /]# crm resource start drbd_res
    [root@node1 /]# crm status
    Last updated: Thu Nov  6 18:04:43 2014
    Last change: Thu Nov  6 17:51:37 2014 via cibadmin on node1.mycluster.org
    Stack: classic openais (with plugin)
    Current DC: node1.mycluster.org - partition with quorum
    Version: 1.1.10-14.el6_5.3-368c726
    4 Nodes configured, 2 expected votes
    5 Resources configured


    Online: [ node1.mycluster.org node2.mycluster.org ]
    OFFLINE: [ node1 node2 ]

     failover_ip    (ocf::heartbeat:IPaddr2):       Started node1.mycluster.org
     Master/Slave Set: drbd_master_slave [drbd_res]
         Masters: [ node2.mycluster.org ]
         Stopped: [ node1 node1.mycluster.org node2 ]
     fs_res (ocf::heartbeat:Filesystem):    Started node2.mycluster.org
     Apache (ocf::heartbeat:apache):        Started node1.mycluster.org

    Failed actions:
        drbd_res_monitor_29000 on node1.mycluster.org 'ok' (0): call=42, status=complete, last-rc-change='Thu Nov  6 16:02:12 2014', queued=0ms, exec=0ms
        drbd_res_promote_0 on node2.mycluster.org 'unknown error' (1): call=909, status=Timed Out, last-rc-change='Thu Nov  6 15:25:36 2014', queued=20002ms, exec=0ms

它使我在 node2 上的 drbd 关闭,我无法将 node2 设置为辅助...

[root@node2 /]# service drbd status
drbd driver loaded OK; device status:
version: 8.3.16 (api:88/proto:86-97)
GIT-hash: a798fa7e274428a357657fb52f0ecf40192c1985 build by phil@Build64R6, 2013-09-27 16:00:43
m:res   cs          ro               ds                 p       mounted  fstype
0:data  StandAlone  Primary/Unknown  UpToDate/DUnknown  r-----  ext4

我有什么问题吗?

high-availability
  • 2 个回答
  • 2940 Views
Martin Hope
hkguile
Asked: 2014-11-09 06:57:44 +0800 CST

如何使域在cloudflare后面接收电子邮件?

  • 4

我有一个托管多个域(centos + postfix + dovcot)的网络服务器,我的一个域的 dns 托管在 cloudflare(即 abcd.com)上,但是当我使用 gmail 向 [email protected] 发送电子邮件时, [email protected] 将无法接收电子邮件。这是我在 cloudflare 中设置的 MX 记录:

Type   Name   Value                                       TTL          Active
mx     mail   handled by mail.abcd.com with priority10    Automatic     
cname  mail   is an alias of abcd.com                     Automatic    grey cloud

任何人都知道如何让域接收电子邮件?

postfix email-server cloudflare
  • 1 个回答
  • 8321 Views
Martin Hope
hkguile
Asked: 2014-11-05 22:38:59 +0800 CST

nginx 的起搏器配置资源

  • 1

我正在尝试使用 virtualbox 由两个 vm 构建集群我遵循本教程 http://www.tokiwinter.com/clustering-with-drbd-corosync-and-pacemaker/

并输入如下命令

[root@node1 data]# crm configure primitive nginx_res ocf:heartbeat:nginx params configfile=/etc/nginx/nginx.conf httpd=/usr/sbin/nginx op monitor interval=60s timout=10s op start timeout=40s op stop timeout=60s
   error: unpack_resources:     Resource start-up disabled since no STONITH resources have been defined
   error: unpack_resources:     Either configure some or disable STONITH with the stonith-enabled option
   error: unpack_resources:     NOTE: Clusters with shared data need STONITH to ensure data integrity
Errors found during check: config not valid
ERROR: ocf:heartbeat:nginx: got no meta-data, does this RA exist?
ERROR: ocf:heartbeat:nginx: got no meta-data, does this RA exist?
ERROR: ocf:heartbeat:nginx: no such resource agent
Do you still want to commit (y/n)?

这些错误消息是否正常?按是后如何恢复?命令会做什么?

------更新-----

[root@node2 ~]# crm ra list ocf heartbeat
CTDB            Delay           Dummy           Filesystem      IPaddr
IPaddr2         IPsrcaddr       LVM             MailTo          Route
SendArp         Squid           VirtualDomain   Xinetd          apache
conntrackd      dhcpd           ethmonitor      exportfs        mysql
named           nfsserver       pgsql           postfix         rsyncd
symlink         
high-availability
  • 1 个回答
  • 6408 Views
Martin Hope
hkguile
Asked: 2014-11-04 22:26:33 +0800 CST

corosync 起搏器 crm 状态显示 DC:无和离线

  • 2

我是 corosync 和起搏器的新手,并尝试使用 vm node1 和 node2 构建集群。这是 /etc/corosync/corosync.conf

# Please read the corosync.conf.5 manual page
compatibility: whitetank

totem {
    version: 2
    secauth: off
    interface {
        member {
            memberaddr: 192.168.1.101
        }
        member {
            memberaddr: 192.168.1.102
        }
        ringnumber: 0
        bindnetaddr: 192.168.1.100
        mcastport: 5405
        ttl: 1
    }
    transport: udpu
}

logging {
    fileline: off
    to_logfile: yes
    to_syslog: yes
    #logfile: /var/log/cluster/corosync.log
    debug: off
    timestamp: on
    logger_subsys {
        subsys: AMF
        debug: off
    }
}

客户关系管理状态:

[root@node1 ~]# crm status
Last updated: Wed Oct 29 04:41:37 2014
Last change: Wed Oct 29 01:29:10 2014 via crmd on node1
Stack: classic openais (with plugin)
Current DC: NONE
1 Nodes configured, 2 expected votes
0 Resources configured


Node node1: UNCLEAN (offline)

我遵循本教程http://www.tokiwinter.com/clustering-with-drbd-corosync-and-pacemaker/,但我的状态似乎我的设置不成功

有人可以帮忙吗?

- - - - - - -更新 - - - - - - - -

corosync-1.4.1-17.e16_5.1.86_64
pacemaker-1.1.10-14.el6_5.3.x86_64

[root@node1 ~]# cat /etc/hosts
127.0.0.1    node1 localhost
::1        localhost6.localdomain6 localhost6
192.168.1.101    node1.mycluster.org node1
192.168.1.102   node2.mycluster.org node2
[root@node1 ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=node1
pacemaker
  • 2 个回答
  • 16441 Views
Martin Hope
hkguile
Asked: 2014-11-03 23:32:18 +0800 CST

drbd 不同步挂载点

  • 1

我正在尝试在虚拟机上使用 centoOS 6.3 学习 drbd,我配置了两个 vm,node1 和 node2,我将文件复制到挂载点 /data,即 node1 的 /dev/drbd0,但不反映到node2的/数据

这是配置

# You can find an example in  /usr/share/doc/drbd.../drbd.conf.example

#include "drbd.d/global_common.conf";
#include "drbd.d/*.res";

global {
    # do not participate in online usage survey
    usage-count no;
}

resource data {

    # write IO is reported as completed if it has reached both local
    # and remote disk
    protocol C;

    net {
        # set up peer authentication
        cram-hmac-alg sha1;
        shared-secret "s3cr3tp@ss";
        # default value 32 - increase as required
        max-buffers 512;
        # highest number of data blocks between two write barriers
        max-epoch-size 512;
        # size of the TCP socket send buffer - can tweak or set to 0 to
        # allow kernel to autotune
        sndbuf-size 0;
    }

    startup {
        # wait for connection timeout - boot process blocked
        # until DRBD resources are connected
        wfc-timeout 30;
        # WFC timeout if peer was outdated
        outdated-wfc-timeout 20;
        # WFC timeout if this node was in a degraded cluster (i.e. only had one
        # node left)
        degr-wfc-timeout 30;
    }

    disk {
        # the next two are for safety - detach on I/O error
        # and set up fencing - resource-only will attempt to
        # reach the other node and fence via the fence-peer
        # handler
         #on-io-error detach;
         #fencing resource-only;
        # no-disk-flushes; # if we had battery-backed RAID
        # no-md-flushes; # if we had battery-backed RAID
        # ramp up the resync rate
        # resync-rate 10M;
    }
    handlers {
        # specify the two fencing handlers
        # see: http://www.drbd.org/users-guide-8.4/s-pacemaker-fencing.html
        fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
        after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh";
    }
    # first node
    on node1 {
        # DRBD device
        device /dev/drbd0;
        # backing store device
        disk /dev/sdb;
        # IP address of node, and port to listen on
        address 192.168.1.101:7789;
        # use internal meta data (don't create a filesystem before
        # you create metadata!)
        meta-disk internal;
    }
    # second node
    on node2 {
        # DRBD debice
        device /dev/drbd0;
        # backing store device
        disk /dev/sdb;
        # IP address of node, and port to listen on
        address 192.168.1.102:7789;
        # use internal meta data (don't create a filesystem before
        # you create metadata!)
        meta-disk internal;
    }
}

这是猫 /proc/drbd

cat: /proc/data: No such file or directory
[root@node1 /]# cat /proc/drbd
version: 8.3.16 (api:88/proto:86-97)
GIT-hash: a798fa7e274428a357657fb52f0ecf40192c1985 build by phil@Build64R6, 2013-09-27 16:00:43
 0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r-----
    ns:543648 nr:0 dw:265088 dr:280613 al:107 bm:25 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:7848864
    [>...................] sync'ed:  6.5% (7664/8188)M
    finish: 7:47:11 speed: 272 (524) K/sec

我将一个文件复制到节点 1 中的 /data,但我在节点 2 的 /date 中找不到该文件,有人可以帮忙吗?

node1 上的 drbd 状态

[root@node1 /]# service drbd status
drbd driver loaded OK; device status:
version: 8.3.16 (api:88/proto:86-97)
GIT-hash: a798fa7e274428a357657fb52f0ecf40192c1985 build by phil@Build64R6, 2013-09-27 16:00:43
m:res   cs          ro                 ds                     p  mounted  fstype
0:data  SyncSource  Primary/Secondary  UpToDate/Inconsistent  C  /data    ext3
...     sync'ed:    8.1%               (7536/8188)M
drbd
  • 2 个回答
  • 3304 Views
Martin Hope
hkguile
Asked: 2014-11-03 18:31:41 +0800 CST

drbd 无法启动 Can not load the drbd module

  • 2

我正在尝试在虚拟机上使用 centoOS 6.3 学习 drbd,我配置了两个虚拟机,节点 1 是原始的,节点 2 是从节点 1 克隆的,但我无法启动“服务 drbd 启动”出现错误message 'starting DRBD resources: Can not load the drbd module',而node 2可以启动命令,这里是配置

[root@localhost db]# cat /etc/drbd.conf

# You can find an example in  /usr/share/doc/drbd.../drbd.conf.example

    #include "drbd.d/global_common.conf";
    #include "drbd.d/*.res";

    global {
        # do not participate in online usage survey
        usage-count no;
    }

    resource data {

        # write IO is reported as completed if it has reached both local
        # and remote disk
        protocol C;

        net {
            # set up peer authentication
            cram-hmac-alg sha1;
            shared-secret "s3cr3tp@ss";
            # default value 32 - increase as required
            max-buffers 512;
            # highest number of data blocks between two write barriers
            max-epoch-size 512;
            # size of the TCP socket send buffer - can tweak or set to 0 to
            # allow kernel to autotune
            sndbuf-size 0;
        }

        startup {
            # wait for connection timeout - boot process blocked
            # until DRBD resources are connected
            wfc-timeout 30;
            # WFC timeout if peer was outdated
            outdated-wfc-timeout 20;
            # WFC timeout if this node was in a degraded cluster (i.e. only had one
            # node left)
            degr-wfc-timeout 30;
        }

        disk {
            # the next two are for safety - detach on I/O error
            # and set up fencing - resource-only will attempt to
            # reach the other node and fence via the fence-peer
            # handler
            on-io-error detach;
            fencing resource-only;
            # no-disk-flushes; # if we had battery-backed RAID
            # no-md-flushes; # if we had battery-backed RAID
            # ramp up the resync rate
            # resync-rate 10M;
        }
        handlers {
            # specify the two fencing handlers
            # see: http://www.drbd.org/users-guide-8.4/s-pacemaker-fencing.html
            fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
            after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh";
        }
        # first node
        on node1.mycluster.org {
            # DRBD device
            device /dev/drbd0;
            # backing store device
            disk /dev/sdb;
            # IP address of node, and port to listen on
            address 192.168.1.101:7789;
            # use internal meta data (don't create a filesystem before
            # you create metadata!)
            meta-disk internal;
        }
        # second node
        on node2.mycluster.org {
            # DRBD debice
            device /dev/drbd0;
            # backing store device
            disk /dev/sdb;
            # IP address of node, and port to listen on
            address 192.168.1.102:7789;
            # use internal meta data (don't create a filesystem before
            # you create metadata!)
            meta-disk internal;
        }
    }

有谁知道是什么问题?

drbd
  • 1 个回答
  • 9294 Views
Martin Hope
hkguile
Asked: 2012-12-24 20:08:06 +0800 CST

通过 ip 地址查看的 Web 服务器的默认网站

  • 2

我安装了 centos + webmin + virtualmin。Web 服务器托管多个网站。

例如:domainA.myftp.org
domainB.myftp.org
domainC.myftp.org

所有域共享相同的 IP 地址

但是当我直接输入公网IP地址123.123.123.123时,浏览器会显示domainA.myftp.org

在哪里可以设置一个ip地址的网站目录?这是一个 DNS 或 Apache 虚拟主机或其他问题?有谁知道?

apache-2.2
  • 3 个回答
  • 3611 Views
Martin Hope
hkguile
Asked: 2012-12-07 21:38:45 +0800 CST

Web 配置中基本身份验证的语法

  • 1

我想给一个目录加个密码保护,结果只找到下面没有密码的代码

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <directoryBrowse enabled="true" />
    </system.webServer>
    <system.web>
        <authentication mode="Windows" />
        <authorization>
            <allow users="test" />
        </authorization>
    </system.web>
</configuration>

如何为用户“test”添加密码?

谢谢

iis
  • 1 个回答
  • 4494 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