NO [UNAVAILABLE] UID FETCH Server error while fetching messages - imap

I'm using AfterLogic MailBee for downloading AOL messages via IMAP
I keep on getting error messages again and again, for years. I would like to solve this once and for all.
Here's a sample log. I can post a much longer one if necessary.
[13:04:57.83] [RECV] BODY[TEXT]<0> {71249}\r\n
[13:04:57.84] [RECV] --===============5885760849945711156==\r\nContent-Type: text/plain ... \r\n</body>\r\n</html>\r\n\r\n--===============5885760849945711156==--\r\n [Literal of length 71249.]
[13:04:57.86] [RECV] )\r\n [Total 79854 bytes received.]
[13:04:57.88] [RECV] MBN00000005 OK UID FETCH completed\r\n [Total 36 bytes received.]
[13:04:57.89] [INFO] Envelopes downloaded
[13:04:58.07] [INFO] Will download envelopes.
[13:04:58.08] [SEND] MBN00000006 UID FETCH 50971 (UID FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODYSTRUCTURE BODY.PEEK[HEADER] BODY.PEEK[TEXT]<0.2147483647>)\r\n
ERROR ON NEXT LINE:
[13:05:28.27] [RECV] MBN00000006 NO [UNAVAILABLE] UID FETCH Server error while fetching messages\r\n [Total 77 bytes received.]
[13:05:28.29] [INFO] Error: The server has responded with negative reply. The server responded: MBN00000006 NO [UNAVAILABLE] UID FETCH Server error while fetching messages.
[13:05:38.45] [INFO] Assembly version: 11.2.0 build 590 for .NET 4.5.
[13:05:38.45] [INFO] Will download list of sub-folders of "" folder matching "" condition.
[13:05:38.47] [SEND] MBN00000002 LIST "" "*"\r\n
I would like to point out that it's not consistent. It comes and goes. But it definitely happens a lot, just that in the end usually all emails come in.
Any help/ideas/pointers are most welcome
Thanks!
UPDATE - Log #2
Hi
Here's a fuller log. i truncate the huge uid list, for readability. also i replaced some private data such as emails etc with "AAAAA"
otherwise untouched
The error is at the end
Thanks again!
[12:50:06.74] [INFO] Assembly version: 11.2.0 build 590 for .NET 4.5.
[12:50:06.74] [INFO] Will download list of sub-folders of "" folder matching "" condition.
[12:50:06.77] [SEND] MBN00000002 LIST "" "*"\r\n
[12:50:07.31] [RECV] * LIST (\Archive \HasNoChildren) "/" "Archive"\r\n [Total 48 bytes received.]
[12:50:07.48] [RECV] * LIST (\Junk \HasNoChildren) "/" "Bulk Mail"\r\n [Total 47 bytes received.]
[12:50:07.49] [RECV] * LIST (\HasNoChildren) "/" "Deleted Items"\r\n [Total 45 bytes received.]
[12:50:07.49] [RECV] * LIST (\Drafts \HasNoChildren) "/" "Draft"\r\n [Total 45 bytes received.]
[12:50:07.49] [RECV] * LIST (\HasNoChildren) "/" "Inbox"\r\n [Total 37 bytes received.]
[12:50:07.50] [RECV] * LIST (\HasNoChildren) "/" "Junk E-mail"\r\n [Total 43 bytes received.]
[12:50:07.50] [RECV] * LIST (\HasChildren) "/" "Saved"\r\n [Total 35 bytes received.]
[12:50:07.51] [RECV] * LIST (\HasNoChildren) "/" "Saved/SavedIMs"\r\n [Total 46 bytes received.]
[12:50:07.51] [RECV] * LIST (\Sent \HasNoChildren) "/" "Sent"\r\n [Total 42 bytes received.]
[12:50:07.52] [RECV] * LIST (\HasNoChildren) "/" "Sent Items"\r\n [Total 42 bytes received.]
[12:50:07.52] [RECV] * LIST (\Trash \HasNoChildren) "/" "Trash"\r\n [Total 44 bytes received.]
[12:50:07.52] [RECV] MBN00000002 OK LIST completed\r\n [Total 31 bytes received.]
[12:50:07.53] [INFO] Folder list downloaded.
[12:50:09.03] [INFO] Select folder "Archive".
[12:50:09.04] [SEND] MBN00000003 EXAMINE "Archive"\r\n
[12:50:09.55] [RECV] * 0 EXISTS\r\n [Total 12 bytes received.]
[12:50:09.70] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:09.71] [RECV] * OK [UIDVALIDITY 1516594547] UIDs valid\r\n [Total 42 bytes received.]
[12:50:09.73] [RECV] * OK [UIDNEXT 60001] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:09.75] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:09.77] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:09.78] [RECV] * OK [HIGHESTMODSEQ 1]\r\n [Total 24 bytes received.]
[12:50:09.80] [RECV] MBN00000003 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:10.30] [INFO] Will perform search in the folder.
[12:50:10.30] [SEND] MBN00000004 UID SEARCH UID 1:*\r\n
[12:50:10.84] [RECV] * SEARCH \r\n [Total 11 bytes received.]
[12:50:10.90] [RECV] MBN00000004 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:10.91] [INFO] Search done.
[12:50:11.41] [INFO] Select folder "Draft".
[12:50:11.43] [SEND] MBN00000005 EXAMINE "Draft"\r\n
[12:50:11.96] [RECV] * 0 EXISTS\r\n [Total 12 bytes received.]
[12:50:12.00] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:12.01] [RECV] * OK [UIDVALIDITY 1516594546] UIDs valid\r\n [Total 42 bytes received.]
[12:50:12.01] [RECV] * OK [UIDNEXT 60083] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:12.02] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:12.02] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:12.02] [RECV] * OK [HIGHESTMODSEQ 165]\r\n [Total 26 bytes received.]
[12:50:12.03] [RECV] MBN00000005 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:14.67] [INFO] Will perform search in the folder.
[12:50:14.68] [SEND] MBN00000006 UID SEARCH UID 1:*\r\n
[12:50:15.16] [RECV] * SEARCH \r\n [Total 11 bytes received.]
[12:50:15.21] [RECV] MBN00000006 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:15.22] [INFO] Search done.
[12:50:18.40] [INFO] Select folder "Inbox".
[12:50:18.41] [SEND] MBN00000007 EXAMINE "Inbox"\r\n
[12:50:18.64] [RECV] * 29581 EXISTS\r\n [Total 16 bytes received.]
[12:50:18.78] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:18.79] [RECV] * OK [UIDVALIDITY 1516594546] UIDs valid\r\n [Total 42 bytes received.]
[12:50:18.79] [RECV] * OK [UIDNEXT 102412] Predicted next UID\r\n [Total 42 bytes received.]
[12:50:18.80] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:18.80] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:18.81] [RECV] * OK [HIGHESTMODSEQ 116489]\r\n [Total 29 bytes received.]
[12:50:18.81] [RECV] MBN00000007 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:20.28] [INFO] Will perform search in the folder.
[12:50:20.28] [SEND] MBN00000008 UID SEARCH UID 26614728:*\r\n
[12:50:20.53] [RECV] * SEARCH 102411 \r\n [Total 18 bytes received.]
[12:50:20.57] [RECV] MBN00000008 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:20.58] [INFO] Search done.
[12:50:21.12] [INFO] Select folder "Saved".
[12:50:21.37] [SEND] MBN00000009 EXAMINE "Saved"\r\n
[12:50:21.76] [RECV] * 2 EXISTS\r\n [Total 12 bytes received.]
[12:50:21.80] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:21.81] [RECV] * OK [UIDVALIDITY 1518399361] UIDs valid\r\n [Total 42 bytes received.]
[12:50:21.81] [RECV] * OK [UIDNEXT 60003] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:21.82] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:21.82] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:21.83] [RECV] * OK [HIGHESTMODSEQ 6]\r\n [Total 24 bytes received.]
[12:50:21.83] [RECV] MBN00000009 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:22.11] [INFO] Will perform search in the folder.
[12:50:22.12] [SEND] MBN00000010 UID SEARCH UID 26100440:*\r\n
[12:50:22.39] [RECV] * SEARCH 20002 \r\n [Total 17 bytes received.]
[12:50:22.44] [RECV] MBN00000010 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:22.44] [INFO] Search done.
[12:50:22.62] [INFO] Select folder "Saved/SavedIMs".
[12:50:22.63] [SEND] MBN00000011 EXAMINE "Saved/SavedIMs"\r\n
[12:50:22.91] [RECV] * 0 EXISTS\r\n [Total 12 bytes received.]
[12:50:22.91] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:22.92] [RECV] * OK [UIDVALIDITY 1518399361] UIDs valid\r\n [Total 42 bytes received.]
[12:50:22.92] [RECV] * OK [UIDNEXT 60001] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:22.93] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:22.93] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:22.94] [RECV] * OK [HIGHESTMODSEQ 1]\r\n [Total 24 bytes received.]
[12:50:22.95] [RECV] MBN00000011 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:23.20] [INFO] Will perform search in the folder.
[12:50:23.21] [SEND] MBN00000012 UID SEARCH UID 1:*\r\n
[12:50:23.56] [RECV] * SEARCH \r\n [Total 11 bytes received.]
[12:50:23.61] [RECV] MBN00000012 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:23.62] [INFO] Search done.
[12:50:23.91] [INFO] Select folder "Sent".
[12:50:23.91] [SEND] MBN00000013 EXAMINE "Sent"\r\n
[12:50:24.22] [RECV] * 8299 EXISTS\r\n [Total 15 bytes received.]
[12:50:24.27] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:24.27] [RECV] * OK [UIDVALIDITY 1516594546] UIDs valid\r\n [Total 42 bytes received.]
[12:50:24.28] [RECV] * OK [UIDNEXT 68846] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:24.28] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:24.28] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:24.29] [RECV] * OK [HIGHESTMODSEQ 17501]\r\n [Total 28 bytes received.]
[12:50:24.29] [RECV] MBN00000013 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:24.72] [INFO] Will perform search in the folder.
[12:50:24.91] [SEND] MBN00000014 UID SEARCH UID 26614726:*\r\n
[12:50:25.20] [RECV] * SEARCH 68845 \r\n [Total 17 bytes received.]
[12:50:25.41] [RECV] MBN00000014 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:25.42] [INFO] Search done.
[12:50:25.72] [INFO] Select folder "Sent Items".
[12:50:25.73] [SEND] MBN00000015 EXAMINE "Sent Items"\r\n
[12:50:26.11] [RECV] * 0 EXISTS\r\n [Total 12 bytes received.]
[12:50:26.15] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:26.16] [RECV] * OK [UIDVALIDITY 1518399361] UIDs valid\r\n [Total 42 bytes received.]
[12:50:26.16] [RECV] * OK [UIDNEXT 60001] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:26.16] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:26.17] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:26.17] [RECV] * OK [HIGHESTMODSEQ 1]\r\n [Total 24 bytes received.]
[12:50:26.18] [RECV] MBN00000015 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:26.87] [INFO] Will perform search in the folder.
[12:50:26.88] [SEND] MBN00000016 UID SEARCH UID 1:*\r\n
[12:50:27.13] [RECV] * SEARCH \r\n [Total 11 bytes received.]
[12:50:27.25] [RECV] MBN00000016 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:27.25] [INFO] Search done.
[12:50:47.78] [INFO] Assembly version: 11.2.0 build 590 for .NET 4.5.
[12:50:47.78] [INFO] Will download list of sub-folders of "" folder matching "" condition.
[12:50:47.79] [SEND] MBN00000002 LIST "" "*"\r\n
[12:50:48.31] [RECV] * LIST (\Archive \HasNoChildren) "/" "Archive"\r\n [Total 48 bytes received.]
[12:50:48.31] [RECV] * LIST (\Junk \HasNoChildren) "/" "Bulk Mail"\r\n [Total 47 bytes received.]
[12:50:48.32] [RECV] * LIST (\HasNoChildren) "/" "Deleted Items"\r\n [Total 45 bytes received.]
[12:50:48.33] [RECV] * LIST (\Drafts \HasNoChildren) "/" "Draft"\r\n [Total 45 bytes received.]
[12:50:48.34] [RECV] * LIST (\HasNoChildren) "/" "Inbox"\r\n [Total 37 bytes received.]
[12:50:48.35] [RECV] * LIST (\HasNoChildren) "/" "Junk E-mail"\r\n [Total 43 bytes received.]
[12:50:48.35] [RECV] * LIST (\HasChildren) "/" "Saved"\r\n [Total 35 bytes received.]
[12:50:48.36] [RECV] * LIST (\HasNoChildren) "/" "Saved/SavedIMs"\r\n [Total 46 bytes received.]
[12:50:48.36] [RECV] * LIST (\Sent \HasNoChildren) "/" "Sent"\r\n [Total 42 bytes received.]
[12:50:48.37] [RECV] * LIST (\HasNoChildren) "/" "Sent Items"\r\n [Total 42 bytes received.]
[12:50:48.37] [RECV] * LIST (\Trash \HasNoChildren) "/" "Trash"\r\n [Total 44 bytes received.]
[12:50:48.38] [RECV] MBN00000002 OK LIST completed\r\n [Total 31 bytes received.]
[12:50:48.38] [INFO] Folder list downloaded.
[12:50:50.63] [INFO] Select folder "Inbox".
[12:50:50.64] [SEND] MBN00000003 EXAMINE "Inbox"\r\n
[12:50:51.17] [RECV] * 29581 EXISTS\r\n [Total 16 bytes received.]
[12:50:51.21] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:51.22] [RECV] * OK [UIDVALIDITY 1516594546] UIDs valid\r\n [Total 42 bytes received.]
[12:50:51.23] [RECV] * OK [UIDNEXT 102412] Predicted next UID\r\n [Total 42 bytes received.]
[12:50:51.23] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:51.24] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:51.24] [RECV] * OK [HIGHESTMODSEQ 116489]\r\n [Total 29 bytes received.]
[12:50:51.25] [RECV] MBN00000003 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:53.51] [INFO] Will perform search in the folder.
[12:50:53.51] [SEND] MBN00000004 UID SEARCH ALL\r\n
[12:50:56.29] [RECV] * SEARCH 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 23 24 25 28 29 30 31 32 33 35 37 39 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 88 89 90 91 94 95 96 97 98 99 101 102 103 104 105 106 ........ 50941 50942 50943 50944 50945 50946 50948 50950 50951 50952 50953 50954 50956 50957 50958 50959 50960 50961 50962 50963 50964 50965 50966 50967 50968 50969 50970 50971 50972 50973 50974 50975 50976 50977 50978 50979 50980 50981 50982 50983 50984 50985 50986 50987 50988 50989 50990 50991 50992 50993 50994 50995 50996 ....... 102373 102374 102375 102376 102377 102378 102379 102380 102381 102382 102383 102384 102385 102386 102387 102388 102389 102390 102391 102392 102393 102394 102395 102396 102397 102398 102399 102400 102401 102402 102403 102404 102405 102406 102407 102408 102409 102410 102411 \r\n [Total 168437 bytes received.]
[12:50:56.30] [RECV] MBN00000004 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:56.32] [INFO] Search done.
[12:50:56.34] [INFO] Will download envelopes.
[12:50:56.34] [SEND] MBN00000005 UID FETCH 50946 (UID FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODYSTRUCTURE BODY.PEEK[HEADER] BODY.PEEK[TEXT]<0.2147483647>)\r\n
[12:50:57.45] [RECV] * 19977 FETCH (FLAGS (\Seen) UID 50946 INTERNALDATE "16-Oct-2018 17:00:37 +0000" RFC822.SIZE 79046 BODYSTRUCTURE (("text" "plain" ("charset" "utf-8") NIL NIL "quoted-printable" 11625 191 NIL NIL NIL NIL)("text" "html" ("charset" "utf-8") NIL NIL "quoted-printable" 59281 1080 NIL NIL NIL NIL) "alternative" ("boundary" "===============5885760849945711156==") NIL) ENVELOPE ("Tue, 16 Oct 2018 17:00:36 +0000 (UTC)" "$139.99 Dell i5 Quad Core PC" (("AAAAA" NIL "officesale" "AAAAA.com")) (("AAAAA" NIL "officesale" "AAAAA.com")) (("AAAAA" NIL "officesale" "AAAAA.com")) (("AAAAA" NIL "AAAAA" "aol.com")) NIL NIL NIL "<5IhE0ItQTeOlCUsfbIJlPA#ismtpd0049p1mdw1.AAAAA.net>") BODY[HEADER] {7820}\r\n
[12:50:57.45] [RECV] Return-Path: <bounces+6830976-236e-AAAAA=aol.com#send.ksd2.klav ... send.ksd2.AAAAA.com SPF : pass\r\nContent-Length: 69965\r\n\r\n [Literal of length 7820.]
[12:50:57.46] [RECV] BODY[TEXT]<0> {71249}\r\n
[12:50:57.46] [RECV] --===============5885760849945711156==\r\nContent-Type: text/plain ... \r\n</body>\r\n</html>\r\n\r\n--===============5885760849945711156==--\r\n [Literal of length 71249.]
[12:50:57.47] [RECV] )\r\n [Total 79854 bytes received.]
[12:50:57.58] [RECV] MBN00000005 OK UID FETCH completed\r\n [Total 36 bytes received.]
[12:50:57.59] [INFO] Envelopes downloaded
[12:50:58.03] [INFO] Will download envelopes.
[12:50:58.04] [SEND] MBN00000006 UID FETCH 50971 (UID FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODYSTRUCTURE BODY.PEEK[HEADER] BODY.PEEK[TEXT]<0.2147483647>)\r\n
[12:51:28.51] [RECV] MBN00000006 NO [UNAVAILABLE] UID FETCH Server error while fetching messages\r\n [Total 77 bytes received.]
[12:51:28.53] [INFO] Error: The server has responded with negative reply. The server responded: MBN00000006 NO [UNAVAILABLE] UID FETCH Server error while fetching messages.

Related

INFLUXDB : SELECT DATA FROM MEASUREMENT ORDERED BY TIME WHERE TIME = MAX(TIME)

I just now started with influx, Need help to get the data sorted by timestamp and the latest data by it.
select DB,AREA,sptotal,spfree,pctfree from ORA_SIZE GROUP BY DB order by time ;
name: ORA_SIZE
tags: DB=DB43B
time DB AREA sptotal spfree pctfree
---- -- ---- ------- ------ -------
1587919100011225116 DB43B DATA 442 303 68
1587919100011225116 DB43B SYSTEM 40 35 87
1587919088732608975 DB43B DATA 442 303 68
1587919088732608975 DB43B SYSTEM 40 35 87
Here, I want to retrieve only
1587919088732608975 DB43B DATA 442 303 68
1587919088732608975 DB43B SYSTEM 40 35 87
as they are the latest data based on time,
is there any query for this? Please advise.
Thanks,
You can use the Last Function to get the latest value of any field.
Example :
SELECT LAST(DB,AREA,sptotal,spfree,pctfree) FROM ORA_SIZE [WHERE_clause] [GROUP_BY_clause]
This query should return your desired data.
You can find the documentation here

Unable to set a flag to an email

I have a mail that I cannot mark as seen or deleted from my inbox. (I don't know how I managed to have it…) If it helps, the server is a Zimbra instance.
I tried to set the flags by hand, to be sure to catch any error message. So openssl s_client …, LOGIN command, and then:
. SELECT INBOX
* 11 EXISTS
* 0 RECENT
* OK [UNSEEN 8] mailbox contains unseen messages
* OK [UIDVALIDITY 1] UIDs are valid for this mailbox
* OK [UIDNEXT 220360] next expected UID is 220360
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk)
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded \*)] junk-related flags are not permanent
* OK [HIGHESTMODSEQ 425603] modseq tracked on this mailbox
. OK [READ-WRITE] SELECT completed
Very well. I'm in READ-WRITE mode. I check with another mail to be sure all is OK:
. FETCH 7 FLAGS
* 7 FETCH (FLAGS ())
. OK FETCH completed
. STORE 7 +FLAGS \Seen
* 7 FETCH (FLAGS (\Seen))
. OK STORE completed
Super! I marked this one as seen. But for the next one, with the same command, the \Seen flag is not set even if command succeeded:
. FETCH 8 FLAGS
* 8 FETCH (FLAGS ())
. OK FETCH completed
. STORE 8 +FLAGS \Seen
* 8 FETCH (FLAGS ())
. OK STORE completed
The same for the \Deleted flag. Is there a normal situation where, in READ-WRITE mode, I cannot put a flag on a mail? Or any test to check if something is wrong with my mailbox/mail?
EDIT, after arnt's suggestion:
I tried to copy this mail in another mailbox. The message is well copied, with another UID, is readable, and keeps the flags the former mail should have: for example, it has the \Deleted flag set when I select the mailbox (but it is not expunged, so I still can check that the copy succeeded).
. COPY 8 "TestMB"
. OK [COPYUID 411900 220324 220409] COPY completed
. SELECT "TextMB"
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 411900] UIDs are valid for this mailbox
* OK [UIDNEXT 220410] next expected UID is 220410
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk)
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded \*)] junk-related flags are not permanent
* OK [HIGHESTMODSEQ 425749] modseq tracked on this mailbox
. OK [READ-WRITE] SELECT completed
. FETCH 1:* (FLAGS UID BODY[HEADER.FIELDS (SUBJECT)])
* 1 FETCH (UID 220409 BODY[HEADER.FIELDS (SUBJECT)] {63}
Subject: Enligne_[...]
FLAGS (\Deleted \Seen))
. OK FETCH completed

Why is there something written in the data section of an ICMPv4 echo ping request?

(My question differs from this one.)I am connected to a AP in a wireless network and I've send a simple ping request to www.google.com. When I analyze the packet in wireshark, I can see, that there are 48 bytes written in the data section of ICMP. After 8 bytes of trash values, the values are sequentially increasing from 0x10 to 0x37.Is there any particular reason, why ICMPv4 fits values instead of just using a bunch of zeroes?
The hexdump of the ICMPv4 data section:
0030 09 d9 0d 00 00 00 00 00 10 11 12 13 14 15 .Ù............
0040 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 .......... !"#$%
0050 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 &'()*+,-./012345
0060 36 37 67
After 8 bytes of trash values
First of all, these are not trash values. In some implementations of ping, the 1st 8 bytes may represent a timestamp.
As #ross-jacobs mentioned, RFC 792 describes the ICMP Echo Request/Reply Packets. For clarity, these two packets are described, in relevant part, as follows:
Echo or Echo Reply Message
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identifier | Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data ...
+-+-+-+-+-
...
Description
The data received in the echo message must be returned in the echo
reply message.
Here you can see that the contents of the Data is not described at all; therefore an implementation is free to use whatever data it wishes, including none at all.
Now, since ping is a network test tool, one of the things it can help test is fragmentation/reassembly. Every ping implementation I'm aware of allows the user to specify the size of the payload, and if you exceed the MTU, you should see the ICMP packet fragmented/reassembled. If you examine the payload of the first fragment, you can tell where the second fragment should start just by looking at the sequence of bytes in the payload of the first fragment. If the data was all 0's, it wouldn't be possible to do this. Similarly, if an ICMP packet wasn't reassembled properly, not only would the checksum likely be wrong, but you would most likely be able to tell exactly where the reassembly failed due to a gap or other inconsistency in the payload. This is just one example of why a payload with a sequence of bytes instead of all 0's is more useful to the user.

Spring data neo4j -- tx.close() lasts too long

I'm trying to import data from the relational database into neo4j. The process goes like this (simplified a little bit):
while (!sarBatchService.isFinished()) {
logger.info("New batch started");
Date loadDeklFrom = sarBatchService.getStartDateForNewBatch();
Date loadDeklTo = sarBatchService
.getEndDateForNewBatch(loadDeklFrom); // = loadDeklFrom + 2 hours
logger.info("Dates calculated");
Date startTime = new Date();
List<Dek> deks = dekLoadManager
.loadAllDeks(loadDeklFrom, loadDeklTo); // loading data from the relational database (POINT A)
Date endLoadTime = new Date();
logger.info("Deks loaded");
GraphDatabase gdb = template.getGraphDatabase();
Transaction tx = gdb.beginTx();
logger.info("Transaction started!");
try {
for (Deks dek : deks) {
/* transform dek into nodes, and save
this nodes with Neo4jTemplate.save() */
}
logger.info("Deks saved");
Date endImportTime = new Date();
int aff = sarBatchService.insertBatchData(loadDeklFrom,
loadDeklTo, startTime, endLoadTime, endImportTime,
deks.size()); // (POINT B)
if (aff != 1) {
String msg = "Something went wrong",
throw new RuntimeException(msg);
}
logger.info("Batch data saved into relational database");
tx.success();
logger.info("Transaction marked as success.");
} catch (NoSuchFieldException | SecurityException
| IllegalArgumentException | IllegalAccessException
| NoSuchMethodException | InstantiationException
| InvocationTargetException e1) {
logger.error("Something bad happend :(");
logger.error(e1.getStackTrace().toString());
} finally {
logger.info("Closing transaction...");
tx.close(); // (POINT C)
logger.info("Transaction closed!");
logger.info("Need more work? " + !sarBatchService.isFinished());
}
}
So, data in the relational database has a timestamp which indicates when it's stored and I'm loading it in two hours by two hours time intervals (POINT A in the code). After that, I'm iterating through loaded data, transforming it into nodes (spring-data-neo4j nodes), storing in neo4j and storing informations about the current batch (POINT B) in the relational database. I'm logging almost every step to debug more easily.
The program successfully finishes 158 batches. The problem starts as the 159th batch starts. The program stops at the POINT C in the code (tx.close()) and waits there for 4 hours (which usually lasts a few seconds). After that continues normally.
I've tried running it on tomcat 7 with 10GB heap size and 4GB heap size. The result is the same (blocks on 159th batch). The maximum number of nodes in one transaction is between 10k and 15k (7k on average), and the 159th batch has less then 10k nodes.
The interesting part is that everything goes well if the data is loaded 4 by 4 hours or 12 by 12 hours. Also, if I restart Tomcat or execute only the 159th batch everything passes without problems.
I'm using spring 3.2.8 with spring-data-neo4j 3.0.2.
This is the neo4j's message.log:
...
2014-11-24 15:21:38.080+0000 WARN [o.n.k.EmbeddedGraphDatabase]: GC Monitor: Application threads blocked for an additional 418ms [total block time: 150.973s]
2014-11-24 15:21:45.722+0000 WARN [o.n.k.EmbeddedGraphDatabase]: GC Monitor: Application threads blocked for an additional 377ms [total block time: 151.35s]
...
2014-11-24 15:23:57.381+0000 WARN [o.n.k.EmbeddedGraphDatabase]: GC Monitor: Application threads blocked for an additional 392ms [total block time: 156.593s]
2014-11-24 15:24:06.758+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Rotating [/home/pravila/data/neo4j/nioneo_logical.log.1] # version=22 to /home/pravila/data/neo4j/nioneo_logical.log.2 from position 26214444
2014-11-24 15:24:06.763+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Rotate log first start entry # pos=24149878 out of [339=Start[339,xid=GlobalId[NEOKERNL|5889317606667601380|364|-1], BranchId[ 52 49 52 49 52 49 ],master=-1,me=-1,time=2014-11-24 15:23:13.021+0000/1416842593021,lastCommittedTxWhenTransactionStarted=267]]
2014-11-24 15:24:07.401+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Rotate: old log scanned, newLog # pos=2064582
2014-11-24 15:24:07.402+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Log rotated, newLog # pos=2064582, version 23 and last tx 267
2014-11-24 15:24:07.684+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Rotating [/home/pravila/data/neo4j/index/lucene.log.1] # version=6 to /home/pravila/data/neo4j/index/lucene.log.2 from position 26214408
2014-11-24 15:24:07.772+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Rotate log first start entry # pos=25902494 out of [134=Start[134,xid=GlobalId[NEOKERNL|5889317606667601380|364|-1], BranchId[ 49 54 50 51 55 52 ],master=-1,me=-1,time=2014-11-24 15:23:13.023+0000/1416842593023,lastCommittedTxWhenTransactionStarted=133]]
2014-11-24 15:24:07.871+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Rotate: old log scanned, newLog # pos=311930
2014-11-24 15:24:07.878+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Log rotated, newLog # pos=311930, version 7 and last tx 133
2014-11-24 15:24:10.919+0000 WARN [o.n.k.EmbeddedGraphDatabase]: GC Monitor: Application threads blocked for an additional 214ms [total block time: 156.807s]
2014-11-24 15:24:17.486+0000 WARN [o.n.k.EmbeddedGraphDatabase]: GC Monitor: Application threads blocked for an additional 405ms [total block time: 157.212s]
...
2014-11-24 15:25:28.692+0000 WARN [o.n.k.EmbeddedGraphDatabase]: GC Monitor: Application threads blocked for an additional 195ms [total block time: 159.316s]
2014-11-24 15:25:33.238+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Rotating [/home/pravila/data/neo4j/nioneo_logical.log.2] # version=23 to /home/pravila/data/neo4j/nioneo_logical.log.1 from position 26214459
2014-11-24 15:25:33.242+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Rotate log first start entry # pos=24835943 out of [349=Start[349,xid=GlobalId[NEOKERNL|-6436474643536791121|374|-1], BranchId[ 52 49 52 49 52 49 ],master=-1,me=-1,time=2014-11-24 15:25:27.038+0000/1416842727038,lastCommittedTxWhenTransactionStarted=277]]
2014-11-24 15:25:33.761+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Rotate: old log scanned, newLog # pos=1378532
2014-11-24 15:25:33.763+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Log rotated, newLog # pos=1378532, version 24 and last tx 277
2014-11-24 15:25:37.031+0000 WARN [o.n.k.EmbeddedGraphDatabase]: GC Monitor: Application threads blocked for an additional 148ms [total block time: 159.464s]
2014-11-24 15:25:45.891+0000 WARN [o.n.k.EmbeddedGraphDatabase]: GC Monitor: Application threads blocked for an additional 153ms [total block time: 159.617s]
....
2014-11-24 15:26:48.447+0000 WARN [o.n.k.EmbeddedGraphDatabase]: GC Monitor: Application threads blocked for an additional 221ms [total block time: 161.641s]
I don't know what's going on here...
Please help.
It very much looks like you have a leaking perhaps outer transaction there.
So that the inner transaction that you show actually finishes but the outer one continues to accumulate state. As Neo doesn't suspend outer transactions but purely nests them there will be no real commit until you hit the outer tx.success(); tx.close();
You should see it if you take thread dump when it blocks to see if it is actually stuck in commit.
after hours an hours of searching and testing I tried to rerun the whole batch with the 4 by 4 hours time interval. It also stopped after the 145th batch (transaction). The difference was that it threw an error (Too many opened files). I set the ulimit for opened files to unlimited and now it works. The only mystery is why the program didn't throw an error the first time.

IMAP getting UID List of selected folder

How can I retrieve the list of IMAP UIDs from the selected folder? I want to get the list of mail UIDs, so I am passing the 1150 UID FETCH FLAGS (\Seen \Flagged), but I am not able to retrieve the list: it gives me an error like BAD Command. So how I can retrieve the list of UID from the selected folder?
The easiest (and most compact) way to list all the UIDs in the currently-selected folder is via UID SEARCH ALL:
A001 UID SEARCH ALL
* SEARCH 288 291 292 293 295 323 324 325 326 327 385 387 472 474 641 720 748
A001 OK UID SEARCH completed
The errors in your UID FETCH request were leaving out the sequence-set and including a list of flags. If you rewrote it as
A002 UID FETCH 1:* (UID)
or
A002 UID FETCH 1:* (UID FLAGS)
it would work.

Resources