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

artfulrobot's questions

Martin Hope
artfulrobot
Asked: 2023-08-24 22:01:07 +0800 CST

Exim 对 DKIM 验证出现误报

  • 6

我使用 exim4 的邮件服务器有一个 ACL 来检查 DKIM 签名。它接受所有内容,但会记录失败并写入包含结果的标头。

我正在从另一台服务器发送邮件,我相信该服务器正确添加了 DKIM 签名。(例如,我已将邮件发送到 gmail 和 Outlook 地址,检查了标头,这两个系统都给了 DKIM 通过。)但是我的邮件服务器说bodyhash_mismatch。

我的邮件服务器并不总是说 DKIM 失败。

这是一封电子邮件。我已经更改了域:

  • example.org这是主要组织的域;它用在From:标头中,是签名者域。公钥在 DNS 中发布。
  • sender.example.org这是发送电子邮件、创建 DKIM 标头的服务器。这是返回路径标头。
  • receive.example.org这是我的邮件服务器的域,正在其中验证 DKIM。这是X-dkim-check添加标题的地方,下面的文本domain=来自$dkim_cur_signer
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.receiver.example.org
    by mail.receiver.example.org with LMTP
    id t8rHGepc52SOVA8ADCPZSA
    (envelope-from <[email protected]>)
    for <[email protected]>; Thu, 24 Aug 2023 14:36:42 +0100
Received: from sender-rdns.example.org ([1.2.3.4] helo=sender.example.org)
    by mail.receiver.example.org with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
    (Exim 4.94.2)
    (envelope-from <[email protected]>)
    id 1qZAVv-004DMU-00
    for [email protected]; Thu, 24 Aug 2023 14:36:42 +0100
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
    d=example.org; s=220151210; h=Sender:Message-Id:Subject:From:To:Date:
    Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
    Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
    :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
    List-Subscribe:List-Post:List-Owner:List-Archive;
    bh=ecGWgWCJeWxJFeM0urOVWP+KOlqqvsQYKOpYUP8nk7I=; b=GTY2HZVje81tRJ0/xKFNUk5d7/
    9wE7CGtwmz2APM5VTDKY6q+qIbwhCRNzc6IWZ4j0Y9FOtnuVBeNR1I5xbOuqPaf62MYQZJFjLQ3/J
    PNpOpS3i1Yd3NCZUs1iB/Q8N+ii73FrvD5k1AA8F5yzJhVeaposgbkvU5vv1s/KgqTIA=;
Received: from localhost ([127.0.0.1] helo=sender.example.org)
    by sender.example.org with esmtp (Exim 4.96)
    (envelope-from <[email protected]>)
    id 1qZAVt-001EhO-2k
    for [email protected];
    Thu, 24 Aug 2023 14:36:41 +0100
Date: Thu, 24 Aug 2023 14:36:41 +0100
To: [email protected]
From: [email protected]
Subject: test Thu, 24 Aug 2023 14:36:41 +0100
Message-Id: <[email protected]>
X-Mailer: swaks v20201014.0 jetmore.org/john/code/swaks/
Sender: [email protected]
X-dkim-check: DKIM test failed: (domain=example.org), signature is bad.

This is a test mailing

如何调试为什么 exim onreceiver.example.org认为签名不好?

(我注意到 DKIM 签名包含许多不存在的标头。这可能是一个原因吗?)

编辑:添加详细信息:

  • 签名 exim:4.96-15+deb12u1。
  • 接收exim:4.94.2-7~bpo10+1
exim
  • 1 个回答
  • 46 Views
Martin Hope
artfulrobot
Asked: 2023-08-01 15:14:13 +0800 CST

如何使用 Firewalld 创建陷阱

  • 5

我想使用firewalld设置以下逻辑

  1. 当主机尝试通过端口 22 从 Internet 访问服务器时:
    1. 丢弃和
    2. 将他们的 IP 添加到名为“trap”的 ipset(24 小时超时)
  2. 当 IP 位于“陷阱”列表中的主机尝试连接到任何端口时:DROP。

我读过很多文档页面,但不知道如何实现上面的 1.2。

firewalld
  • 1 个回答
  • 27 Views
Martin Hope
artfulrobot
Asked: 2022-01-07 09:56:14 +0800 CST

什么可能导致 twitterbot 需要 6 秒来下载小图像资源?

  • 0

很多(大多数)时间 twitter 对某些图像发出 http 请求,响应时间(由 nginx 在日志中记录)需要 6 秒。然而,其他网站(例如 facebook),有时还有 twitter,通常会在 0.2 秒或更短的时间内获得响应。

并不是响应时间“只是慢”,而是响应时间几乎总是接近 6 秒。就像那将是模态响应时间。

Twitter 说这可能是路由问题,我应该尝试在另一个域上托管图像(大概它们意味着在另一个 IP 上),但我不相信。

有一些关于时间的事情让我觉得还有其他事情发生。

我检查了 robots.txt(这不会影响响应时间);我没有在 nginx 中实现任何速率限制;也不是 twitterbot 真的在打击网站,请求之间通常有几分钟的时间!

我注意到的唯一奇怪的事情是,twitter 有时会同时对同一资源发出两个请求。例如

{"rsTime":"2022-01-05T23:07:49+00:00","rsStatus":"200","rqIp":"x.x.x.x","rq":"GET /sites/default/files/share-images/node-3211-202112151443.jpg HTTP/1.1","rqUser":"","rqRef":"","rqUA":"Twitterbot/1.0","rsB":"196275","rsTook":"6.604","phpTook":""}

{"rsTime":"2022-01-05T23:07:49+00:00","rsStatus":"200","rqIp":"x.x.x.x","rq":"GET /sites/default/files/share-images/node-3211-202112151443.jpg HTTP/1.1","rqUser":"","rqRef":"","rqUA":"Twitterbot/1.0","rsB":"196275","rsTook":"6.605","phpTook":""}

如果有帮助,这里是请求的标头:

HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: max-age=2592000
Connection: keep-alive
Content-Length: 343376
Content-Type: image/jpeg
Date: Thu, 06 Jan 2022 17:45:21 GMT
ETag: "619d2951-53d50"
Expires: Sat, 05 Feb 2022 17:45:21 GMT
Keep-Alive: timeout=10
Last-Modified: Tue, 23 Nov 2021 17:48:01 GMT
Server: nginx

我相信这是 nginx 配置的相关部分:

sendfile on;             
tcp_nopush on;           
tcp_nodelay on;          
types_hash_max_size 2048;
server_tokens off;
client_body_timeout 60;                                
client_header_timeout 60;                   
keepalive_timeout 10 10;                               
send_timeout 60;                                       
reset_timedout_connection on;                          
expires 30d;
open_file_cache max=3000 inactive=120s;                           
open_file_cache_valid 45s;
open_file_cache_min_uses 2;
open_file_cache_errors off;

编辑:tcpdump 数据,如评论中所建议

当我在 twitter 上发布链接时,我使用 tcpdump 在 mysite 和 twitter 的站点之间转储 https 数据。Twitter 发出了 2 个 http 请求:一个用于页面(0.18 秒),一个用于图像(6.67 秒)。

我对 tcpdump 完全陌生,所以不确定我在寻找什么。

07.301756 IP theirsite.36652 > mysite.https: Flags [SEW], seq 350223635, win 65535, options [mss 1460,sackOK,TS val 3744650926 ecr 0,nop,wscale 8], length 0
07.301814 IP mysite.https > theirsite.36652: Flags [S.E], seq 3699217149, ack 350223636, win 65160, options [mss 1460,sackOK,TS val 3624184444 ecr 3744650926,nop,wscale 7], length 0
07.400999 IP theirsite.36652 > mysite.https: Flags [.], ack 1, win 256, options [nop,nop,TS val 3744651026 ecr 3624184444], length 0
07.401067 IP theirsite.36652 > mysite.https: Flags [P.], seq 1:153, ack 1, win 256, options [nop,nop,TS val 3744651026 ecr 3624184444], length 152
07.401084 IP mysite.https > theirsite.36652: Flags [.E], ack 153, win 508, options [nop,nop,TS val 3624184543 ecr 3744651026], length 0
07.401638 IP mysite.https > theirsite.36652: Flags [.E], seq 1:2897, ack 153, win 508, options [nop,nop,TS val 3624184543 ecr 3744651026], length 2896
07.401676 IP mysite.https > theirsite.36652: Flags [P.E], seq 2897:4097, ack 153, win 508, options [nop,nop,TS val 3624184543 ecr 3744651026], length 1200
07.403373 IP mysite.https > theirsite.36652: Flags [P.E], seq 4097:4433, ack 153, win 508, options [nop,nop,TS val 3624184545 ecr 3744651026], length 336
07.500676 IP theirsite.36652 > mysite.https: Flags [.E], ack 4097, win 288, options [nop,nop,TS val 3744651125 ecr 3624184543], length 0
07.502402 IP theirsite.36652 > mysite.https: Flags [.E], ack 4433, win 300, options [nop,nop,TS val 3744651127 ecr 3624184545], length 0
07.503493 IP theirsite.36652 > mysite.https: Flags [P.EW], seq 153:246, ack 4433, win 300, options [nop,nop,TS val 3744651128 ecr 3624184545], length 93
07.503519 IP mysite.https > theirsite.36652: Flags [.E], ack 246, win 508, options [nop,nop,TS val 3624184645 ecr 3744651128], length 0
07.503926 IP mysite.https > theirsite.36652: Flags [P.EW], seq 4433:4691, ack 246, win 508, options [nop,nop,TS val 3624184646 ecr 3744651128], length 258
07.603028 IP theirsite.36652 > mysite.https: Flags [.E], ack 4691, win 311, options [nop,nop,TS val 3744651228 ecr 3624184646], length 0
07.603159 IP theirsite.36652 > mysite.https: Flags [P.EW], seq 246:595, ack 4691, win 311, options [nop,nop,TS val 3744651228 ecr 3624184646], length 349
07.603188 IP mysite.https > theirsite.36652: Flags [.E], ack 595, win 506, options [nop,nop,TS val 3624184745 ecr 3744651228], length 0
07.792960 IP mysite.https > theirsite.36652: Flags [.EW], seq 4691:6139, ack 595, win 506, options [nop,nop,TS val 3624184935 ecr 3744651228], length 1448
07.892024 IP theirsite.36652 > mysite.https: Flags [.E], ack 6139, win 322, options [nop,nop,TS val 3744651517 ecr 3624184935], length 0
07.892047 IP mysite.https > theirsite.36652: Flags [.EW], seq 6139:7587, ack 595, win 506, options [nop,nop,TS val 3624185034 ecr 3744651517], length 1448
07.990993 IP theirsite.36652 > mysite.https: Flags [.E], ack 7587, win 334, options [nop,nop,TS val 3744651616 ecr 3624185034], length 0
07.991014 IP mysite.https > theirsite.36652: Flags [.EW], seq 7587:9035, ack 595, win 506, options [nop,nop,TS val 3624185133 ecr 3744651616], length 1448
08.090023 IP theirsite.36652 > mysite.https: Flags [.E], ack 9035, win 345, options [nop,nop,TS val 3744651715 ecr 3624185133], length 0
08.090053 IP mysite.https > theirsite.36652: Flags [.EW], seq 9035:10483, ack 595, win 506, options [nop,nop,TS val 3624185232 ecr 3744651715], length 1448
08.189127 IP theirsite.36652 > mysite.https: Flags [.E], ack 10483, win 356, options [nop,nop,TS val 3744651814 ecr 3624185232], length 0
08.189150 IP mysite.https > theirsite.36652: Flags [.EW], seq 10483:11931, ack 595, win 506, options [nop,nop,TS val 3624185331 ecr 3744651814], length 1448
08.288177 IP theirsite.36652 > mysite.https: Flags [.E], ack 11931, win 368, options [nop,nop,TS val 3744651913 ecr 3624185331], length 0
08.288219 IP mysite.https > theirsite.36652: Flags [.EW], seq 11931:13379, ack 595, win 506, options [nop,nop,TS val 3624185430 ecr 3744651913], length 1448
08.387287 IP theirsite.36652 > mysite.https: Flags [.E], ack 13379, win 379, options [nop,nop,TS val 3744652012 ecr 3624185430], length 0
08.387316 IP mysite.https > theirsite.36652: Flags [.EW], seq 13379:14827, ack 595, win 506, options [nop,nop,TS val 3624185529 ecr 3744652012], length 1448
08.486350 IP theirsite.36652 > mysite.https: Flags [.E], ack 14827, win 390, options [nop,nop,TS val 3744652111 ecr 3624185529], length 0
08.486372 IP mysite.https > theirsite.36652: Flags [P.EW], seq 14827:16256, ack 595, win 506, options [nop,nop,TS val 3624185628 ecr 3744652111], length 1429
08.585430 IP theirsite.36652 > mysite.https: Flags [.E], ack 16256, win 402, options [nop,nop,TS val 3744652210 ecr 3624185628], length 0
11.555117 IP theirsite.37999 > mysite.https: Flags [SEW], seq 1059140554, win 65535, options [mss 1460,sackOK,TS val 2940663245 ecr 0,nop,wscale 8], length 0
11.555147 IP mysite.https > theirsite.37999: Flags [S.E], seq 4137859394, ack 1059140555, win 65160, options [mss 1460,sackOK,TS val 3624188697 ecr 2940663245,nop,wscale 7], length 0
11.654266 IP theirsite.37999 > mysite.https: Flags [.], ack 1, win 256, options [nop,nop,TS val 2940663345 ecr 3624188697], length 0
11.654320 IP theirsite.37999 > mysite.https: Flags [P.], seq 1:153, ack 1, win 256, options [nop,nop,TS val 2940663345 ecr 3624188697], length 152
11.654336 IP mysite.https > theirsite.37999: Flags [.E], ack 153, win 508, options [nop,nop,TS val 3624188796 ecr 2940663345], length 0
11.654658 IP mysite.https > theirsite.37999: Flags [.E], seq 1:2897, ack 153, win 508, options [nop,nop,TS val 3624188796 ecr 2940663345], length 2896
11.654676 IP mysite.https > theirsite.37999: Flags [P.E], seq 2897:4097, ack 153, win 508, options [nop,nop,TS val 3624188796 ecr 2940663345], length 1200
11.656243 IP mysite.https > theirsite.37999: Flags [P.E], seq 4097:4433, ack 153, win 508, options [nop,nop,TS val 3624188798 ecr 2940663345], length 336
11.753727 IP theirsite.37999 > mysite.https: Flags [.E], ack 4097, win 288, options [nop,nop,TS val 2940663444 ecr 3624188796], length 0
11.755266 IP theirsite.37999 > mysite.https: Flags [.E], ack 4433, win 300, options [nop,nop,TS val 2940663446 ecr 3624188798], length 0
11.756355 IP theirsite.37999 > mysite.https: Flags [P.EW], seq 153:246, ack 4433, win 300, options [nop,nop,TS val 2940663447 ecr 3624188798], length 93
11.756399 IP mysite.https > theirsite.37999: Flags [.E], ack 246, win 508, options [nop,nop,TS val 3624188898 ecr 2940663447], length 0
11.756842 IP mysite.https > theirsite.37999: Flags [P.EW], seq 4433:4691, ack 246, win 508, options [nop,nop,TS val 3624188899 ecr 2940663447], length 258
11.855874 IP theirsite.37999 > mysite.https: Flags [.E], ack 4691, win 311, options [nop,nop,TS val 2940663546 ecr 3624188899], length 0
11.856034 IP theirsite.37999 > mysite.https: Flags [P.EW], seq 246:627, ack 4691, win 311, options [nop,nop,TS val 2940663546 ecr 3624188899], length 381
11.856057 IP mysite.https > theirsite.37999: Flags [.E], ack 627, win 506, options [nop,nop,TS val 3624188998 ecr 2940663546], length 0
11.856303 IP mysite.https > theirsite.37999: Flags [.EW], seq 4691:6139, ack 627, win 506, options [nop,nop,TS val 3624188998 ecr 2940663546], length 1448
11.955431 IP theirsite.37999 > mysite.https: Flags [.E], ack 6139, win 322, options [nop,nop,TS val 2940663646 ecr 3624188998], length 0
11.955505 IP mysite.https > theirsite.37999: Flags [.EW], seq 6139:7587, ack 627, win 506, options [nop,nop,TS val 3624189097 ecr 2940663646], length 1448
12.054716 IP theirsite.37999 > mysite.https: Flags [.E], ack 7587, win 334, options [nop,nop,TS val 2940663745 ecr 3624189097], length 0
12.054805 IP mysite.https > theirsite.37999: Flags [.EW], seq 7587:9035, ack 627, win 506, options [nop,nop,TS val 3624189197 ecr 2940663745], length 1448
12.153874 IP theirsite.37999 > mysite.https: Flags [.E], ack 9035, win 345, options [nop,nop,TS val 2940663844 ecr 3624189197], length 0
12.153924 IP mysite.https > theirsite.37999: Flags [.EW], seq 9035:10483, ack 627, win 506, options [nop,nop,TS val 3624189296 ecr 2940663844], length 1448
12.253082 IP theirsite.37999 > mysite.https: Flags [.E], ack 10483, win 356, options [nop,nop,TS val 2940663943 ecr 3624189296], length 0
12.253134 IP mysite.https > theirsite.37999: Flags [.EW], seq 10483:11931, ack 627, win 506, options [nop,nop,TS val 3624189395 ecr 2940663943], length 1448
12.352340 IP theirsite.37999 > mysite.https: Flags [.E], ack 11931, win 368, options [nop,nop,TS val 2940664043 ecr 3624189395], length 0
12.352409 IP mysite.https > theirsite.37999: Flags [.EW], seq 11931:13379, ack 627, win 506, options [nop,nop,TS val 3624189494 ecr 2940664043], length 1448
12.451567 IP theirsite.37999 > mysite.https: Flags [.E], ack 13379, win 379, options [nop,nop,TS val 2940664142 ecr 3624189494], length 0
12.451615 IP mysite.https > theirsite.37999: Flags [.EW], seq 13379:14827, ack 627, win 506, options [nop,nop,TS val 3624189593 ecr 2940664142], length 1448
12.550697 IP theirsite.37999 > mysite.https: Flags [.E], ack 14827, win 390, options [nop,nop,TS val 2940664241 ecr 3624189593], length 0
12.550736 IP mysite.https > theirsite.37999: Flags [.EW], seq 14827:16275, ack 627, win 506, options [nop,nop,TS val 3624189693 ecr 2940664241], length 1448
12.649774 IP theirsite.37999 > mysite.https: Flags [.E], ack 16275, win 402, options [nop,nop,TS val 2940664340 ecr 3624189693], length 0
12.649810 IP mysite.https > theirsite.37999: Flags [.EW], seq 16275:17723, ack 627, win 506, options [nop,nop,TS val 3624189792 ecr 2940664340], length 1448
12.748972 IP theirsite.37999 > mysite.https: Flags [.E], ack 17723, win 413, options [nop,nop,TS val 2940664439 ecr 3624189792], length 0
12.749025 IP mysite.https > theirsite.37999: Flags [.EW], seq 17723:19171, ack 627, win 506, options [nop,nop,TS val 3624189891 ecr 2940664439], length 1448
12.848133 IP theirsite.37999 > mysite.https: Flags [.E], ack 19171, win 424, options [nop,nop,TS val 2940664538 ecr 3624189891], length 0
12.848171 IP mysite.https > theirsite.37999: Flags [.EW], seq 19171:20619, ack 627, win 506, options [nop,nop,TS val 3624189990 ecr 2940664538], length 1448
12.947232 IP theirsite.37999 > mysite.https: Flags [.E], ack 20619, win 436, options [nop,nop,TS val 2940664637 ecr 3624189990], length 0
12.947273 IP mysite.https > theirsite.37999: Flags [.EW], seq 20619:22067, ack 627, win 506, options [nop,nop,TS val 3624190089 ecr 2940664637], length 1448
13.046357 IP theirsite.37999 > mysite.https: Flags [.E], ack 22067, win 447, options [nop,nop,TS val 2940664737 ecr 3624190089], length 0
13.046386 IP mysite.https > theirsite.37999: Flags [.EW], seq 22067:23515, ack 627, win 506, options [nop,nop,TS val 3624190188 ecr 2940664737], length 1448
13.145398 IP theirsite.37999 > mysite.https: Flags [.E], ack 23515, win 458, options [nop,nop,TS val 2940664836 ecr 3624190188], length 0
13.145426 IP mysite.https > theirsite.37999: Flags [.EW], seq 23515:24963, ack 627, win 506, options [nop,nop,TS val 3624190287 ecr 2940664836], length 1448
13.244504 IP theirsite.37999 > mysite.https: Flags [.E], ack 24963, win 469, options [nop,nop,TS val 2940664935 ecr 3624190287], length 0
13.244532 IP mysite.https > theirsite.37999: Flags [.EW], seq 24963:26411, ack 627, win 506, options [nop,nop,TS val 3624190386 ecr 2940664935], length 1448
13.343650 IP theirsite.37999 > mysite.https: Flags [.E], ack 26411, win 481, options [nop,nop,TS val 2940665034 ecr 3624190386], length 0
13.343716 IP mysite.https > theirsite.37999: Flags [.EW], seq 26411:27859, ack 627, win 506, options [nop,nop,TS val 3624190486 ecr 2940665034], length 1448
13.442769 IP theirsite.37999 > mysite.https: Flags [.E], ack 27859, win 492, options [nop,nop,TS val 2940665133 ecr 3624190486], length 0
13.442795 IP mysite.https > theirsite.37999: Flags [.EW], seq 27859:29307, ack 627, win 506, options [nop,nop,TS val 3624190585 ecr 2940665133], length 1448
13.541819 IP theirsite.37999 > mysite.https: Flags [.E], ack 29307, win 503, options [nop,nop,TS val 2940665232 ecr 3624190585], length 0
13.541880 IP mysite.https > theirsite.37999: Flags [.EW], seq 29307:30755, ack 627, win 506, options [nop,nop,TS val 3624190684 ecr 2940665232], length 1448
13.640911 IP theirsite.37999 > mysite.https: Flags [.E], ack 30755, win 515, options [nop,nop,TS val 2940665331 ecr 3624190684], length 0
13.640976 IP mysite.https > theirsite.37999: Flags [.EW], seq 30755:32203, ack 627, win 506, options [nop,nop,TS val 3624190783 ecr 2940665331], length 1448
13.740069 IP theirsite.37999 > mysite.https: Flags [.E], ack 32203, win 526, options [nop,nop,TS val 2940665430 ecr 3624190783], length 0
13.740153 IP mysite.https > theirsite.37999: Flags [.EW], seq 32203:33651, ack 627, win 506, options [nop,nop,TS val 3624190882 ecr 2940665430], length 1448
13.839252 IP theirsite.37999 > mysite.https: Flags [.E], ack 33651, win 537, options [nop,nop,TS val 2940665530 ecr 3624190882], length 0
13.839316 IP mysite.https > theirsite.37999: Flags [.EW], seq 33651:35099, ack 627, win 506, options [nop,nop,TS val 3624190981 ecr 2940665530], length 1448
13.938391 IP theirsite.37999 > mysite.https: Flags [.E], ack 35099, win 549, options [nop,nop,TS val 2940665629 ecr 3624190981], length 0
13.938444 IP mysite.https > theirsite.37999: Flags [.EW], seq 35099:36547, ack 627, win 506, options [nop,nop,TS val 3624191080 ecr 2940665629], length 1448
14.037553 IP theirsite.37999 > mysite.https: Flags [.E], ack 36547, win 560, options [nop,nop,TS val 2940665728 ecr 3624191080], length 0
14.037618 IP mysite.https > theirsite.37999: Flags [.EW], seq 36547:37995, ack 627, win 506, options [nop,nop,TS val 3624191179 ecr 2940665728], length 1448
14.137132 IP theirsite.37999 > mysite.https: Flags [.E], ack 37995, win 571, options [nop,nop,TS val 2940665827 ecr 3624191179], length 0
14.137200 IP mysite.https > theirsite.37999: Flags [.EW], seq 37995:39443, ack 627, win 506, options [nop,nop,TS val 3624191279 ecr 2940665827], length 1448
14.236282 IP theirsite.37999 > mysite.https: Flags [.E], ack 39443, win 583, options [nop,nop,TS val 2940665927 ecr 3624191279], length 0
14.236354 IP mysite.https > theirsite.37999: Flags [.EW], seq 39443:40891, ack 627, win 506, options [nop,nop,TS val 3624191378 ecr 2940665927], length 1448
14.335398 IP theirsite.37999 > mysite.https: Flags [.E], ack 40891, win 594, options [nop,nop,TS val 2940666026 ecr 3624191378], length 0
14.335459 IP mysite.https > theirsite.37999: Flags [.EW], seq 40891:42339, ack 627, win 506, options [nop,nop,TS val 3624191477 ecr 2940666026], length 1448
14.434551 IP theirsite.37999 > mysite.https: Flags [.E], ack 42339, win 605, options [nop,nop,TS val 2940666125 ecr 3624191477], length 0
14.434616 IP mysite.https > theirsite.37999: Flags [.EW], seq 42339:43787, ack 627, win 506, options [nop,nop,TS val 3624191576 ecr 2940666125], length 1448
14.533722 IP theirsite.37999 > mysite.https: Flags [.E], ack 43787, win 617, options [nop,nop,TS val 2940666224 ecr 3624191576], length 0
14.533789 IP mysite.https > theirsite.37999: Flags [.EW], seq 43787:45235, ack 627, win 506, options [nop,nop,TS val 3624191676 ecr 2940666224], length 1448
14.632926 IP theirsite.37999 > mysite.https: Flags [.E], ack 45235, win 628, options [nop,nop,TS val 2940666323 ecr 3624191676], length 0
14.632993 IP mysite.https > theirsite.37999: Flags [.EW], seq 45235:46683, ack 627, win 506, options [nop,nop,TS val 3624191775 ecr 2940666323], length 1448
14.732801 IP theirsite.37999 > mysite.https: Flags [.E], ack 46683, win 639, options [nop,nop,TS val 2940666422 ecr 3624191775], length 0
14.732857 IP mysite.https > theirsite.37999: Flags [.EW], seq 46683:48131, ack 627, win 506, options [nop,nop,TS val 3624191875 ecr 2940666422], length 1448
14.831963 IP theirsite.37999 > mysite.https: Flags [.E], ack 48131, win 650, options [nop,nop,TS val 2940666522 ecr 3624191875], length 0
14.832026 IP mysite.https > theirsite.37999: Flags [.EW], seq 48131:49579, ack 627, win 506, options [nop,nop,TS val 3624191974 ecr 2940666522], length 1448
14.931211 IP theirsite.37999 > mysite.https: Flags [.E], ack 49579, win 662, options [nop,nop,TS val 2940666621 ecr 3624191974], length 0
14.931297 IP mysite.https > theirsite.37999: Flags [.EW], seq 49579:51027, ack 627, win 506, options [nop,nop,TS val 3624192073 ecr 2940666621], length 1448
15.030409 IP theirsite.37999 > mysite.https: Flags [.E], ack 51027, win 673, options [nop,nop,TS val 2940666721 ecr 3624192073], length 0
15.030478 IP mysite.https > theirsite.37999: Flags [.EW], seq 51027:52475, ack 627, win 506, options [nop,nop,TS val 3624192172 ecr 2940666721], length 1448
15.129575 IP theirsite.37999 > mysite.https: Flags [.E], ack 52475, win 684, options [nop,nop,TS val 2940666820 ecr 3624192172], length 0
15.129632 IP mysite.https > theirsite.37999: Flags [.EW], seq 52475:53923, ack 627, win 506, options [nop,nop,TS val 3624192271 ecr 2940666820], length 1448
15.228699 IP theirsite.37999 > mysite.https: Flags [.E], ack 53923, win 696, options [nop,nop,TS val 2940666919 ecr 3624192271], length 0
15.228766 IP mysite.https > theirsite.37999: Flags [.EW], seq 53923:55371, ack 627, win 506, options [nop,nop,TS val 3624192371 ecr 2940666919], length 1448
15.327877 IP theirsite.37999 > mysite.https: Flags [.E], ack 55371, win 707, options [nop,nop,TS val 2940667018 ecr 3624192371], length 0
15.327942 IP mysite.https > theirsite.37999: Flags [.EW], seq 55371:56819, ack 627, win 506, options [nop,nop,TS val 3624192470 ecr 2940667018], length 1448
15.427060 IP theirsite.37999 > mysite.https: Flags [.E], ack 56819, win 718, options [nop,nop,TS val 2940667117 ecr 3624192470], length 0
15.427128 IP mysite.https > theirsite.37999: Flags [.EW], seq 56819:58267, ack 627, win 506, options [nop,nop,TS val 3624192569 ecr 2940667117], length 1448
15.526297 IP theirsite.37999 > mysite.https: Flags [.E], ack 58267, win 730, options [nop,nop,TS val 2940667217 ecr 3624192569], length 0
15.526368 IP mysite.https > theirsite.37999: Flags [.EW], seq 58267:59715, ack 627, win 506, options [nop,nop,TS val 3624192668 ecr 2940667217], length 1448
15.625481 IP theirsite.37999 > mysite.https: Flags [.E], ack 59715, win 741, options [nop,nop,TS val 2940667316 ecr 3624192668], length 0
15.625552 IP mysite.https > theirsite.37999: Flags [.EW], seq 59715:61163, ack 627, win 506, options [nop,nop,TS val 3624192767 ecr 2940667316], length 1448
15.724607 IP theirsite.37999 > mysite.https: Flags [.E], ack 61163, win 752, options [nop,nop,TS val 2940667415 ecr 3624192767], length 0
15.724650 IP mysite.https > theirsite.37999: Flags [.EW], seq 61163:62611, ack 627, win 506, options [nop,nop,TS val 3624192866 ecr 2940667415], length 1448
15.823665 IP theirsite.37999 > mysite.https: Flags [.E], ack 62611, win 764, options [nop,nop,TS val 2940667514 ecr 3624192866], length 0
15.823717 IP mysite.https > theirsite.37999: Flags [.EW], seq 62611:64059, ack 627, win 506, options [nop,nop,TS val 3624192966 ecr 2940667514], length 1448
15.922871 IP theirsite.37999 > mysite.https: Flags [.E], ack 64059, win 775, options [nop,nop,TS val 2940667613 ecr 3624192966], length 0
15.922946 IP mysite.https > theirsite.37999: Flags [.EW], seq 64059:65507, ack 627, win 506, options [nop,nop,TS val 3624193065 ecr 2940667613], length 1448
16.022042 IP theirsite.37999 > mysite.https: Flags [.E], ack 65507, win 786, options [nop,nop,TS val 2940667712 ecr 3624193065], length 0
16.022113 IP mysite.https > theirsite.37999: Flags [.EW], seq 65507:66955, ack 627, win 506, options [nop,nop,TS val 3624193164 ecr 2940667712], length 1448
16.121191 IP theirsite.37999 > mysite.https: Flags [.E], ack 66955, win 798, options [nop,nop,TS val 2940667811 ecr 3624193164], length 0
16.121223 IP mysite.https > theirsite.37999: Flags [.EW], seq 66955:68403, ack 627, win 506, options [nop,nop,TS val 3624193263 ecr 2940667811], length 1448
16.220324 IP theirsite.37999 > mysite.https: Flags [.E], ack 68403, win 809, options [nop,nop,TS val 2940667911 ecr 3624193263], length 0
16.220371 IP mysite.https > theirsite.37999: Flags [.EW], seq 68403:69851, ack 627, win 506, options [nop,nop,TS val 3624193362 ecr 2940667911], length 1448
nginx
  • 0 个回答
  • 71 Views
Martin Hope
artfulrobot
Asked: 2020-06-10 23:14:58 +0800 CST

MariaDB 内存使用量超过配置大小

  • 3

我注意到我跟踪到 MariaDB 的系统内存使用百分比(由 sar 报告)稳步增加。这似乎与数据库负载无关:这种增加与查询数量的增加不匹配。

内存使用图

我有以下尺寸配置:

key_buffer_size         =  400000000                                                                                  
innodb_buffer_pool_size = 1210612736 

总共有 1.5GB,但现在在 RSS 内存上已达到 2.3GB。

为什么越来越贪心?我可以让它更好地坚持它的极限吗?或者它可能坚持 InnoDB 的限制,但正在将内存用于其他用途,如果是这样,有没有办法理解这一点,以便我可以调整配置以将总内存使用量保持在一定水平?或者它可能就像 Linux 内核一样,只是在空闲时使用所有空闲内存进行缓存,但在需要时很乐意放弃它?

我在 Debian 10 (Buster) 上使用 MariaDB 10.3.22。工作负载是一个网络服务器(所以我需要为其他进程保留一些内存:nginx+php)。如果需要,很高兴发布更多配置。

mysql memory-usage debian-buster mariadb
  • 4 个回答
  • 6078 Views
Martin Hope
artfulrobot
Asked: 2020-04-03 06:41:37 +0800 CST

是否可以在 MariaDB 中查询 Time > N 的进程列表?

  • 0

在 MariaDB (+ MySQL) 中,您可以SHOW PROCESSLIST获取队列/运行中的查询列表。有用的东西之一是Time字段。

我发现我有一些可怕的查询被触发,并且在任何人的兴趣转移后很久就坐在那里消耗资源。

我希望能够执行“SHOW PROCESSLIST WHERE Time > 3600”来查找实时且已运行一个多小时的查询,但这是语法错误。

我也试过SELECT * FROM (SHOW PROCESSLIST) x WHERE Time > 3600无济于事。

有办法吗?(显然,在一个理想的世界中,我能够找出导致这些狡猾查询的原因!)

我在 MariaDB 10.1.41

mysql mariadb
  • 1 个回答
  • 705 Views
Martin Hope
artfulrobot
Asked: 2019-06-07 05:42:54 +0800 CST

nginx:是否可以在 fastcgi_read_timeout 中使用映射变量

  • 0

我正在尝试这样做:

map $request_uri $php_timeout {
  default 60s;
  "~^/slow/process/(?:1|two|three)" 120s;
}

...

fastcgi_read_timeout $php_timeout;

但nignx -t给出一个错误:

nginx: [emerg] "fastcgi_read_timeout" 指令在 /etc/nginx/... 中的值无效

这根本不可能吗?文档并没有说它不是(或它是)。

NB。如果不清楚,我有几个 URL 最好由一组需要不同超时的正则表达式测试来描述。我可以为所有这些编写单独的位置块,但这会变得混乱。

nginx
  • 1 个回答
  • 303 Views
Martin Hope
artfulrobot
Asked: 2018-07-25 08:23:45 +0800 CST

如何在路由器中设置变量以在 SMTP 传输中获取

  • 1

在 exim4 中,我有一个重定向路由器,它更改了一些标头,包括From:标头。

dkim_domain如果给出、dkim_selector和dkim_private_key参数,我的 SMTP 传输将对邮件进行 DKIM 签名。这些来自宏,例如在传输中:

dkim_domain = DKIM_DOMAIN

其中DKIM_DOMAIN宏定义为

DKIM_DOMAIN = ${lc:${domain:$h_from:}}

这都是“正常的”。但问题是我的路由器正在使用headers_add更改 From 标头,但正因为如此:

这意味着在传输配置中对字符串扩展中的标题行的引用不会“看到”添加的标题行。

来源 - 见headers_add

传输总是寻找原始的From 标头,而不是重写的标头。

如何更改宏以某种方式以路由器可能影响的方式查找域?我什至无法在路由器中设置自定义传输,因为它是重定向路由器。

exim
  • 1 个回答
  • 623 Views
Martin Hope
artfulrobot
Asked: 2017-03-03 09:25:54 +0800 CST

如果 From 标头中的友好名称与子字符串匹配,则 Exim ACL 将被删除

  • 1

我收到了一种特别可怕的垃圾邮件,可以通过 From 标头中的纯文本名称轻松识别。

基本上格式是这样的:

From: "foo" <[email protected]>

我想编写一个 ACL 数据条件来检查是否foo在 From 标头中。你会怎么做?

我相信它会进入DATA ACL部分。

exim
  • 2 个回答
  • 2465 Views
Martin Hope
artfulrobot
Asked: 2016-05-04 01:31:15 +0800 CST

syslog 中的 SIGRTMIN+24 是什么?

  • 15

我的 Debian 8 vm 有很多这样的 systemd 日志:

Apr 28 23:02:09 foo systemd[22305]: Starting Shutdown.
Apr 28 23:02:09 foo systemd[22305]: Reached target Shutdown.
Apr 28 23:02:09 foo systemd[22305]: Starting Exit the Session...
Apr 28 23:02:09 foo systemd[22305]: Received SIGRTMIN+24 from PID 22461 (kill).
Apr 28 23:02:10 foo systemd[22469]: Starting Paths.
Apr 28 23:02:10 foo systemd[22469]: Reached target Paths.
Apr 28 23:02:10 foo systemd[22469]: Starting Timers.

即很多Starting Shutdown行和SIGRTMIN+24。

文档说:

SIGRTMIN+24:立即退出管理器(仅适用于 --user 实例)。

这里的“关机”是什么意思?我不认为这意味着关闭整个机器 - 没有重新启动的迹象。那么它只是出于某种原因重新启动 systemd 吗?什么会导致这种情况?

使困惑!

systemd
  • 1 个回答
  • 28050 Views
Martin Hope
artfulrobot
Asked: 2016-02-10 02:41:07 +0800 CST

systemd 的 journalctl:如何按消息过滤?

  • 14

journalctl看起来像是一个查看日志的好工具,但我被困在一个简单的问题上:我想查看所有包含短语的 cron 消息update-ipsets。

我当然可以

journalctl -u cron.service | grep update-ipsets

但是你失去了 journalctl 输出的所有其他好处(颜色编码、自动分页、实时视图等)

我试过了:

journalctl -u cron.service MESSAGE=update-ipsets
journalctl -u cron.service "MESSAGE=*update-ipsets*"
journalctl -u cron.service "MESSAGE=.*update-ipsets.*"
journalctl -u cron.service "MESSAGE=/.*update-ipsets.*/"

而且您不想通过点击tab后进行试验MESSAGE=- 挂起 (zsh/Debian Jessie) shell 并且Ctrl-C也没有帮助!

我有点不敢相信它没有内置这个基本功能,所以我确定我一定错过了什么?

谢谢。

systemd
  • 3 个回答
  • 32791 Views
Martin Hope
artfulrobot
Asked: 2016-01-07 02:03:55 +0800 CST

systemd:未能使我们成为子收割者:参数无效。SSH

  • 1

自从升级到引入 systemd 的 Debian 8 (Jessie) 后,我的系统日志错误中出现了这篇文章的标题。

远程 ssh 登录开始

10:33:51 pap1 systemd[1]: Starting user-0.slice.
10:33:51 pap1 systemd[1]: Created slice user-0.slice.
10:33:51 pap1 systemd[1]: Starting User Manager for UID 0...
10:33:51 pap1 systemd[1]: Starting Session 23 of user root.
10:33:51 pap1 systemd[1]: Started Session 23 of user root.
10:33:51 pap1 systemd[12228]: Failed to make us a subreaper: Invalid argument
10:33:51 pap1 systemd[12228]: Perhaps the kernel version is too old (< 3.4?)
10:33:51 pap1 systemd[12228]: Starting Paths.
10:33:51 pap1 systemd[12228]: Reached target Paths.
10:33:51 pap1 systemd[12228]: Starting Timers.
10:33:51 pap1 systemd[12228]: Reached target Timers.
10:33:51 pap1 systemd[12228]: Starting Sockets.
10:33:51 pap1 systemd[12228]: Reached target Sockets.
10:33:51 pap1 systemd[12228]: Starting Basic System.
10:33:51 pap1 systemd[12228]: Reached target Basic System.
10:33:51 pap1 systemd[12228]: Starting Default.
10:33:51 pap1 systemd[12228]: Reached target Default.
10:33:51 pap1 systemd[12228]: Startup finished in 19ms.
10:33:51 pap1 systemd[1]: Started User Manager for UID 0.

客户端正常连接,客户端没有错误。

现在退出远程 ssh 客户端后...

10:33:55 pap1 systemd[1]: Stopping User Manager for UID 0...
10:33:55 pap1 systemd[12228]: Stopping Default.
10:33:55 pap1 systemd[12228]: Stopped target Default.
10:33:55 pap1 systemd[12228]: Stopping Basic System.
10:33:55 pap1 systemd[12228]: Stopped target Basic System.
10:33:55 pap1 systemd[12228]: Stopping Paths.
10:33:55 pap1 systemd[12228]: Stopped target Paths.
10:33:55 pap1 systemd[12228]: Stopping Timers.
10:33:55 pap1 systemd[12228]: Stopped target Timers.
10:33:55 pap1 systemd[12228]: Stopping Sockets.
10:33:55 pap1 systemd[12228]: Stopped target Sockets.
10:33:55 pap1 systemd[12228]: Starting Shutdown.
10:33:55 pap1 systemd[12228]: Reached target Shutdown.
10:33:55 pap1 systemd[12228]: Starting Exit the Session...
10:33:55 pap1 systemd[12228]: Received SIGRTMIN+24 from PID 12248 (kill).
10:33:55 pap1 systemd[1]: Stopped User Manager for UID 0.
10:33:55 pap1 systemd[1]: Stopping user-0.slice.
10:33:55 pap1 systemd[1]: Removed slice user-0.slice.

系统详情

我正在运行的内核是当前的 Debian 内核,3.16.0-4-686-pae(即 >3.4)。

任何想法这个问题是什么,是否严重,我能阻止它吗?

ssh
  • 1 个回答
  • 698 Views
Martin Hope
artfulrobot
Asked: 2015-11-10 16:32:35 +0800 CST

apache 2.4 访问被拒绝兼容

  • 0

我最近从 2.2 升级到 2.4,但在虚拟主机上拒绝访问时遇到了问题。错误日志是

[access_compat:error] [pid 27948] [client 1.2.3.4:5] AH01797: client denied by server configuration: /var/www/mysite

现在在我的apache2.conf我目前有

<Directory />
  Options FollowSymLinks
  AllowOverride None
  Require all denied
</Directory>

<Directory /var/www/>
  Options Indexes FollowSymLinks
  AllowOverride None
  Require all granted
</Directory>

在我的虚拟主机文件中,我有

<Directory /var/www/mysite>
  Require all granted
</Directory>

但是访问我的网站会出现拒绝访问错误。

在我的虚拟主机配置<Directory>部分。

我现在需要 auth compat 模块,因为有很多.htaccess文件依赖它,但是当我正确使用较新的Require all语法时,我不明白为什么在服务器配置级别需要它?

什么有效

如果我将以下内容放在我的虚拟主机的目录部分,它就可以工作。

Order deny,allow

把它拿走(让所有必需的都被授予)它再次失败。它就像 compat 模块默认为Order allow,deny但据我所知没有这样的声明(不是 in apache.conf, not in conf-enabled/*, not in sites-enabled/*default*)。

Apache 文档没有说明 compat 和较新的 authz 模块如何协同工作(他们网站上的评论指出了这一点)。我已经在其他 6 台服务器上实施了更改,没有任何问题。我已经处理了确保 .conf 位于配置文件末尾的问题。我已经运行了 apache2ctl configtest,我已经运行了 apache2ctl -S 来查看 vhosts 配置;都好。

为什么需要旧的兼容订单声明?/ 为什么兼容的东西显然会覆盖较新的配置?

apache-2.4
  • 2 个回答
  • 2347 Views
Martin Hope
artfulrobot
Asked: 2015-04-21 01:44:01 +0800 CST

MariaDB 是 MySQL 的安全替代品吗?

  • 32

多年来,我一直在我的 Debian 稳定服务器上使用 MariaDB,“一种增强的 MySQL 替代品”,因为它提高了性能。

但是我注意到它似乎滞后于 MySQL 中的安全更新。例如,DSA 3229-1列出了几个漏洞,这些漏洞似乎没有在 Debian 稳定mariadb包中进行修补。

这是安全与速度的权衡吗?MariaDB 是否普遍落后于安全更新,或者这只是一次性的?

mysql
  • 1 个回答
  • 4232 Views
Martin Hope
artfulrobot
Asked: 2015-04-15 09:07:25 +0800 CST

如何在 Windows 7 上启动特定服务之前复制文件目录

  • 3

我有一个 Windows 7 桌面和一个运行 SSH 和 Samba 服务的 Linux 服务器。

Windows 机器有一个文件目录,需要与 Linux 服务器上的副本同步。

Windows机器有一个服务在运行的时候使用了这组文件,我需要在这个服务运行之前复制这些文件,以保证复制的文件的完整性。

这些文件很大(数百 MB),理想情况下我想使用 rsync 来提高这个过程的效率。我相信我可以用cygwin做到这一点。

那么有没有办法制作一个以特定用户身份运行的脚本(我猜是BAT文件),但在另一个特定服务之前(例如在机器上打开,但在建立网络之后)并将数据同步到服务器的 samba 共享或(更好)通过 ssh。

在 Linux 环境中这将相当容易,但我不是 Windows 专家。

linux
  • 1 个回答
  • 40 Views
Martin Hope
artfulrobot
Asked: 2015-03-27 02:56:05 +0800 CST

cron使用什么shell?

  • 6

cron 从 crontabs 运行 shell 命令。

但是刚刚被 zsh 和 bash 之间的差异所吸引,我现在担心我不知道使用哪个 shell cron 来解释 crontab 命令?显然,cron 条目仅指向脚本文件的简单情况由#!/path/to/interpreter第一行的

我看了看,/etc/cron*看不到任何可能允许设置或更改的内容?

debian
  • 2 个回答
  • 7244 Views
Martin Hope
artfulrobot
Asked: 2015-02-13 02:19:36 +0800 CST

如何在预算内防止服务器丢失

  • 23

我是一家预算不多的小公司,为慈善机构和非营利客户提供网站和数据库。

我有一些 Debian Linux VPS 服务器,并确保我每天备份到与托管服务的 VPS 不同的 VPS。

最近,我的一家托管公司告诉我,两个驱动器同时发生故障,因此数据永远丢失了。事情发生了,他们说对不起,他们还能做什么?但这让我想知道在发生硬件或其他与主机相关的故障时,基本上重新启动 VPS 的经济有效的方法。

目前我将不得不

  1. 启动一个新的 VPS
  2. 将最后一天的备份(包括数据库、Web 根目录和特定于网站的配置)放到 VPS 上,然后像上次一样进行配置等。
  3. 更新 DNS 并等待它传播。

这可能需要一天左右的时间才能实现,DNS 传播是一个很大的未知数,尽管我将 TTL 设置得非常低(小时左右)。

一些主机提供可用于将设置复制到新 VPS 的快照,但仍然有 IP,这在主机公司彻底取消/暂停帐户的情况下无济于事(我一直在阅读有关此某些托管服务提供商的行为,这让我感到害怕!我没有做任何垃圾邮件/狡猾的事情,并密切关注安全性,但我意识到他们确实有能力这样做,我非常规避风险)。

这与选择信誉良好的主机相结合,是我能做到的最好的,而无需使用极其昂贵的解决方案吗?

vps
  • 5 个回答
  • 1650 Views
Martin Hope
artfulrobot
Asked: 2013-11-19 02:04:27 +0800 CST

如何有效地维护最新的快照 tar 存档?

  • 1

我有一个很大的文件目录,我想维护一个压缩的 tar 存档,我可以通过 http 提供服务器,其中包含每天更新一次的所有文件。

许多文件不会每天更改,我希望避免每天花费数小时的处理器时间来压缩相同的文件。

tar“无法更新压缩档案”,所以tar uj无济于事。

有没有聪明的方法来做到这一点?

backup
  • 2 个回答
  • 419 Views
Martin Hope
artfulrobot
Asked: 2013-11-05 08:51:25 +0800 CST

我可以将 exim 配置为将新邮件发送到 Maildir cur/ 而不是 new/ 吗?

  • 2

我想设置一个 Exim4 传递驱动程序或者一个 .forward/filter 文件,将某些邮件直接传递到 MailDir 的“cur”目录,而不是“new”目录。

这可能吗?

背景/原因/想法:我正在尝试为某些电子邮件实施一种方法,以避免被“推送”。通过这种方式,不重要的(由过滤规则确定,例如从列表中确定)电子邮件可以发送到收件箱,而无需员工收到推送通知。我相信 cur/ 目录中的文件只会在正常轮询时到达,而不会被典型的推送实现拾取。

exim
  • 1 个回答
  • 701 Views
Martin Hope
artfulrobot
Asked: 2013-10-08 00:51:01 +0800 CST

如何避免mysqldump警告“跳过表mysql.event的数据”

  • 10

最近在我的 LAMP 网络服务器上将 Debian 升级到Wheezy后,mysqldump 发出警告:

-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.

事件似乎很特别。mysqldump 的手册页:

   *   --events, -E

       Include Event Scheduler events for the dumped databases in the output.

我尝试添加--skip-events以告诉 mysqldump 这明确是我想要的行为(虽然我不知道为什么......)但它仍然会产生警告。

我如何 (a) 阻止它发出此警告,或(b) 以其他方式包括这张尴尬的桌子,如果它是我应该保留的东西。

debian
  • 2 个回答
  • 20945 Views
Martin Hope
artfulrobot
Asked: 2013-08-17 00:56:19 +0800 CST

(Debian) Linux 中的重复分区表

  • 0

软件 RAID 阵列中的磁盘出现故障,我正在尝试更换它。我之前已经顺利完成了这项工作,但这次我在尝试复制分区表时遇到了错误。

我正在使用这个命令:

sfdisk -l /dev/sda | sfdisk /dev/sdb

并得到这个错误:

sfdisk: unrecognized input: 121601 cylinders, 255 heads, 63 sectors/track

阅读sfdisk 手册页,我无法诚实地看到这个命令是如何工作的,但它在过去曾多次工作过。

问题:如何将确切的分区表复制到第二个磁盘,以便我可以将其用作 RAID 成员?我不喜欢 sfdisk,这只是之前完成的工作。

如果有帮助,这里有一些细节

sfdisk -l /dev/sda

Disk /dev/sda: 121601 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+   3646    3647-  29294496   fd  Linux raid autodetect
/dev/sda2       3647  121600  117954  947465505    5  Extended
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty
/dev/sda5       3647+  27961   24315- 195310206   fd  Linux raid autodetect
/dev/sda6      27962+  40119   12158-  97659103+  fd  Linux raid autodetect
/dev/sda7     120628+ 121600     973-   7815591   fd  Linux raid autodetect
/dev/sda8     119655+ 120627     973-   7815591   fd  Linux raid autodetect
/dev/sda9      40120+ 119654   79535- 638864856   fd  Linux raid autodetect

sfdisk -l /dev/sdb

Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+ 121600  121601- 976760001   83  Linux
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty

还尝试了该选项的管道-d,但这告诉我:

   Device Boot    Start       End   #sectors  Id  System
/dev/sdb1   *        63  58589054   58588992  fd  Linux raid autodetect
/dev/sdb2      58589055 1953520064 1894931010   5  Extended
/dev/sdb3             0         -          0   0  Empty
/dev/sdb4             0         -          0   0  Empty
/dev/sdb5      58589118 449209529  390620412  fd  Linux raid autodetect
/dev/sdb6     449209593 644527799  195318207  fd  Linux raid autodetect
/dev/sdb7     1937888883 1953520064   15631182  fd  Linux raid autodetect
/dev/sdb8     1922257638 1937888819   15631182  fd  Linux raid autodetect
/dev/sdb9     644527863 1922257574 1277729712  fd  Linux raid autodetect
Warning: partition 7 does not start at a cylinder boundary

sfdisk: I don't like these partitions - nothing changed.
(If you really want this, use the --force option.)

partition7 是否有可能从 sda 的圆柱边界开始,但不会在 sdb 上?我应该修复这个(分开?)还是强制它?

linux
  • 2 个回答
  • 1515 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