Can't connect to mongodb docker container from another container - mongodb

I have the following simplified design: a mongodb container and a "python-client" docker container, that is linked to the former. This is my simplified docker-compose.yml file:
mongodb:
build: "mongodb"
dockerfile: "Dockerfile"
hostname: "mongodb.local"
ports:
- "27017:27017"
client:
build: "client"
dockerfile: "Dockerfile"
hostname: "client.local"
links:
- "mongodb:mongodb"
environment:
- "MONGODB_URL=mongodb://admin:admin#mongodb:27017/admin"
- "MONGODB_DB=historictraffic"
I'm able to establish a successful connection using pymongo from my host using the mongodb://admin:admin#localhost:27017/admin connection string (pay attention to localhost):
$ ipython
from pymongo import MongoClient
mongo = MongoClient('mongodb://admin:admin#localhost:27017/admin')
db = mongo.test
col = db.test
col.insert_one({'x': 1})
# This works
But I can't connect from the client container. Apparently the link is correct:
/ # cat /etc/hosts
172.17.0.27 client.local client
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.26 historictraffic_mongodb_1 mongodb
172.17.0.26 mongodb mongodb historictraffic_mongodb_1
172.17.0.26 mongodb_1 mongodb historictraffic_mongodb_1
But when I do the same test, it fails:
/ # ipython
from pymongo import MongoClient
mongo = MongoClient('mongodb://admin:admin#mongodb:27017/admin')
db = mongo.test
col = db.test
col.insert_one({'x': 2})
---------------------------------------------------------------------------
ServerSelectionTimeoutError Traceback (most recent call last)
<ipython-input-5-c5d62e5590d5> in <module>()
----> 1 col.insert_one({'x': 2})
/usr/lib/python2.7/site-packages/pymongo/collection.pyc in insert_one(self, document)
464 if "_id" not in document:
465 document["_id"] = ObjectId()
--> 466 with self._socket_for_writes() as sock_info:
467 return InsertOneResult(self._insert(sock_info, document),
468 self.write_concern.acknowledged)
/usr/lib/python2.7/contextlib.pyc in __enter__(self)
15 def __enter__(self):
16 try:
---> 17 return self.gen.next()
18 except StopIteration:
19 raise RuntimeError("generator didn't yield")
/usr/lib/python2.7/site-packages/pymongo/mongo_client.pyc in _get_socket(self, selector)
661 #contextlib.contextmanager
662 def _get_socket(self, selector):
--> 663 server = self._get_topology().select_server(selector)
664 try:
665 with server.get_socket(self.__all_credentials) as sock_info:
/usr/lib/python2.7/site-packages/pymongo/topology.pyc in select_server(self, selector, server_selection_timeout, address)
119 return random.choice(self.select_servers(selector,
120 server_selection_timeout,
--> 121 address))
122
123 def select_server_by_address(self, address,
/usr/lib/python2.7/site-packages/pymongo/topology.pyc in select_servers(self, selector, server_selection_timeout, address)
95 if server_timeout == 0 or now > end_time:
96 raise ServerSelectionTimeoutError(
---> 97 self._error_message(selector))
98
99 self._ensure_opened()
ServerSelectionTimeoutError: mongodb:27017: [Errno 113] Host is unreachable
Does anyone know how to solve it? Thank you.

This failure is probably because mongo hasn't started up yet. You can retry the connection with a short delay between retries, and it should work after one or two attempts.

Related

Zookeeper znode delete

echo mntr | nc localhost 2181
zk_version 3.4.6-78--1, built on 12/06/2018 12:30 GMT
zk_avg_latency 319
zk_max_latency 13406
zk_min_latency 0
zk_packets_received 1847226
zk_packets_sent 1782230
zk_num_alive_connections 437
zk_outstanding_requests 0
zk_server_state follower
zk_znode_count 3188127
zk_watch_count 21
zk_ephemerals_count 27
zk_approximate_data_size 651278666
zk_open_file_descriptor_count 473
zk_max_file_descriptor_count 4096
zk_fsync_threshold_exceed_count 1
zk_znode_count 3188127
For me zk_znode_count looks very high
Please can anyone help me to how to list all zonode.
After checking znodes details h ave to decide to delete on based on what criteria....?
It would be help full because of my cluster service are always in acive/active or standby/standby mode.
Thanks in Adv,

SSL connect attempt failed because of handshake problems using Net::FTPSSL

I am trying to create a Perl script with Net::FTPSSL that move the files from the FTP server to actual server.
The script will run every X minutes / seconds to check if the customers uploaded something new on the FTP server and move it.
#!/usr/bin/perl -w
use strict;
use warnings;
use DateTime;
use Net::FTPSSL;
my $ftp;
sub connect_ftp {
$ftp = Net::FTPSSL->new('sftp.domain.com',
Encryption => EXP_CRYPT,
Debug => 1, DebugLogFile => "/usr/logs/ftpssl.log");
$ftp->login('username', 'password');
$ftp->binary();
}
sub copy_files {
my #folder_list;
my $folder;
#folder_list = $ftp->nlst();
foreach $folder (#folder_list) {
if ($folder ne "globa_username") {
$ftp->cwd($folder);
my #file_list;
my $video;
#file_list = $ftp->nlst();
foreach $video (#file_list) {
my $file_status;
my $result;
if ($video =~ /\.mp4$/i) {
if (!file_exist($video, $folder)) {
$file_status = $ftp->is_file($video);
if ($file_status > 0) {
$result = $ftp->get($video, "/usr/media/$folder/$video");
if (defined $result) {
#$ftp->delete($video);
}
}
}
}
}
}
$ftp->cdup();
}
#$ftp->quit();
}
sub file_exist {
my ($video, $folder) = #_;
return -f "/usr/media/$folder/$video";
}
connect_ftp();
for (;;) {
copy_files();
#sleep 60;
#sleep 30;
}
The script works fine until returns: **555 TLSv12: SSL connect attempt failed because of handshake problems**.
Net-FTPSSL Version: 0.42
IO-Socket-SSL Version: 1.94
Net-SSLeay Version: 1.55
IO-Socket-INET Version: 1.33
IO-Socket-INET6 might not be installed.
IO-Socket-IP Version: 0.21
IO Version: 1.25_06
Socket Version: 2.030
No IPv6 support available. You must 1st upgrade IO::Socket::SSL to support it!
Perl: 5.016003 [5.16.3], OS: linux
***** IPv6 not yet supported in Net::FTPSSL! *****
Server (port): sftp.domain.com (21)
Keys: (Debug), (Encryption), (DebugLogFile)
Values: (1), (E), (/usr/logs/ftpssl.log)
SKT <<< 220 (vsFTPd 3.0.2)
SKT >>> AUTH TLS
SKT <<< 234 Proceed with negotiation.
Object HASH Details ... (SSL:arguments - E)
SSL_hostname ==> sftp.domain.com
SSL_verify_mode ==> 0
SSL_version ==> TLSv12
Timeout ==> 120
Object Net::FTPSSL Details ... (sftp.domain.com:21 - E)
_FTPSSL_arguments ==> HASH(0x272cee8)
-- Croak ===> (undef)
-- Crypt ===> E
-- FixGetTs ===> 0
-- FixPutTs ===> 0
-- Host ===> sftp.domain.com
-- Pret ===> 0
-- Timeout ===> 120
-- buf_size ===> 10240
-- data_prot ===> P
-- dcsc_mode ===> 1
-- debug ===> 2
-- debug_extra ===> 0
-- debug_no_help ===> 0
-- ftpssl_filehandle ===> GLOB(0x2a6d8c8)
-- last_ftp_msg ===> 234 Proceed with negotiation.
-- myContext ===> HASH(0x2747d18)
-- SSL_ca_file ----> /etc/pki/tls/certs/ca-bundle.crt
-- SSL_reuse_ctx ----> IO::Socket::SSL::SSL_Context=HASH(0x2a8f1f0)
-- context ++++> 44543648
-- mySocketOpts ===> HASH(0x2746ec0)
-- PeerAddr ----> sftp.domain.com
-- PeerPort ----> 21
-- Proto ----> tcp
-- Timeout ----> 120
-- start_SSL_opts ===> HASH(0x272c840)
-- SSL_hostname ----> sftp.domain.com
-- SSL_verify_mode ----> 0
-- SSL_version ----> TLSv12
-- Timeout ----> 120
-- trace ===> 0
-- type ===> A
_SSL_arguments ==> HASH(0x2a8e770)
-- PeerAddr ===> 33.44.55.66
-- PeerPort ===> 21
-- Proto ===> tcp
-- SSL_ca_file ===> /etc/pki/tls/certs/ca-bundle.crt
-- SSL_cert_file ===> certs/client-cert.pem
-- SSL_check_crl ===> 0
-- SSL_honor_cipher_order ===> 0
-- SSL_hostname ===> sftp.domain.com
-- SSL_key_file ===> certs/client-key.pem
-- SSL_server ===> 0
-- SSL_use_cert ===> 0
-- SSL_verify_mode ===> 0
-- SSL_version ===> TLSv12
_SSL_ctx ==> IO::Socket::SSL::SSL_Context=HASH(0x2a8f1f0)
-- context ===> 44543648
_SSL_fileno ==> 4
_SSL_ioclass_upgraded ==> IO::Socket::INET
_SSL_last_err ==> SSL wants a read first
_SSL_object ==> 44657040
_SSL_opened ==> 1
io_socket_domain ==> 2
io_socket_proto ==> 6
io_socket_timeout ==> 120
io_socket_type ==> 1
************************************************************
>>> USER +++++++
<<< 331 Please specify the password.
>>> PASS *******
<<< 230 Login successful.
>>> HELP
<<< 214-The following commands are recognized.
<<< ABOR ACCT ALLO APPE CDUP CWD DELE EPRT EPSV FEAT HELP LIST MDTM MKD
<<< MODE NLST NOOP OPTS PASS PASV PORT PWD QUIT REIN REST RETR RMD RNFR
<<< RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD
<<< XPWD XRMD
<<< 214 Help OK.
>>> FEAT
<<< 211-Features:
<<< AUTH SSL
<<< AUTH TLS
<<< EPRT
<<< EPSV
<<< MDTM
<<< PASV
<<< PBSZ
<<< PROT
<<< REST STREAM
<<< SIZE
<<< TVFS
<<< UTF8
<<< 211 End
<<+ 111 Auto-adding OPTS Command!
>>> HELP SITE
<<< 214-The following commands are recognized.
<<< ABOR ACCT ALLO APPE CDUP CWD DELE EPRT EPSV FEAT HELP LIST MDTM MKD
<<< MODE NLST NOOP OPTS PASS PASV PORT PWD QUIT REIN REST RETR RMD RNFR
<<< RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD
<<< XPWD XRMD
<<< 214 Help OK.
>>> SITE HELP
<<< 214 CHMOD UMASK HELP
<<+ 214 The HELP command is supported.
>>> TYPE I
<<< 200 Switching to Binary mode.
<<< 200 Switching to Binary mode.
>>> PBSZ 0
<<< 200 PBSZ set to 0.
>>> PROT P
<<< 200 PROT now Private.
>>> PASV
<<< 227 Entering Passive Mode (33,44,55,66,20,207).
--- Host (33.44.55.66) Port (5327)
>>> NLST
<<< 150 Here comes the directory listing.
<<< 226 Directory send OK.
>>> CWD demo3
<<< 250 Directory successfully changed.
>>> PBSZ 0
<<< 200 PBSZ set to 0.
>>> PROT P
<<< 200 PROT now Private.
>>> PASV
<<< 227 Entering Passive Mode (33,44,55,66,20,144).
--- Host (33.44.55.66) Port (5264)
>>> NLST
<<< 150 Here comes the directory listing.
<<< 226 Directory send OK.
>>> CDUP
<<< 250 Directory successfully changed.
>>> CDUP
<<< 250 Directory successfully changed.
>>> CWD demo2
<<< 250 Directory successfully changed.
>>> PBSZ 0
<<< 200 PBSZ set to 0.
>>> PROT P
<<< 200 PROT now Private.
>>> PASV
<<< 227 Entering Passive Mode (33,44,55,66,20,179).
--- Host (33.44.55.66) Port (5299)
>>> NLST
<<< 150 Here comes the directory listing.
<<< 226 Directory send OK.
>>> CDUP
<<< 250 Directory successfully changed.
>>> CWD demo
<<< 250 Directory successfully changed.
>>> PBSZ 0
<<< 200 PBSZ set to 0.
>>> PROT P
<<< 200 PROT now Private.
>>> PASV
...
<<< 227 Entering Passive Mode (33,44,55,66,19,196).
--- Host (33.44.55.66) Port (5060)
>>> NLST
<<< 150 Here comes the directory listing.
<<+ 555 TLSv12: SSL connect attempt failed because of handshake problems
>>> PBSZ 0
<<+ 555 Unexpected EOF on Command Channel [0] (0, 1) ()
>>> PROT P
<<+ 555 Can't write command on socket:
UPDATE:
Tried downgrading SSL_version to SSLv3 but it still doesn't work.
$ftp = Net::FTPSSL->new('sftp.domain.com',
Encryption => EXP_CRYPT,
Debug => 1, DebugLogFile => "/usr/logs/ftpssl.log", SSL_version => "SSLv3");
Net::FTP
I created another script using Net::FTP it's works fine until:
Net::FTP>>> Net::FTP(3.11)
Net::FTP>>> Exporter(5.68)
Net::FTP>>> Net::Cmd(3.11)
Net::FTP>>> IO::Socket::SSL(2.072)
Net::FTP>>> IO::Socket::INET(1.33)
Net::FTP>>> IO::Socket(1.34)
Net::FTP>>> IO::Handle(1.33)
Net::FTP=GLOB(0x11d7400)<<< 220 (vsFTPd 3.0.2)
Net::FTP=GLOB(0x11d7400)>>> AUTH TLS
Net::FTP=GLOB(0x11d7400)<<< 234 Proceed with negotiation.
Net::FTP=GLOB(0x11d7400)>>> PBSZ 0
Net::FTP=GLOB(0x11d7400)<<< 200 PBSZ set to 0.
Net::FTP=GLOB(0x11d7400)>>> PROT P
Net::FTP=GLOB(0x11d7400)<<< 200 PROT now Private.
Net::FTP=GLOB(0x11d7400)>>> USER username
Net::FTP=GLOB(0x11d7400)<<< 331 Please specify the password.
Net::FTP=GLOB(0x11d7400)>>> PASS ....
Net::FTP=GLOB(0x11d7400)<<< 230 Login successful.
Net::FTP=GLOB(0x11d7400)>>> TYPE I
Net::FTP=GLOB(0x11d7400)<<< 200 Switching to Binary mode.
Net::FTP=GLOB(0x11d7400)>>> PASV
Net::FTP=GLOB(0x11d7400)<<< 227 Entering Passive Mode (33,44,55,66,21,107).
Net::FTP=GLOB(0x11d7400)>>> NLST
Net::FTP=GLOB(0x11d7400)<<< 150 Here comes the directory listing.
Net::FTP=GLOB(0x11d7400)<<< 226 Directory send OK.
Net::FTP=GLOB(0x11d7400)>>> CWD demo
Net::FTP=GLOB(0x11d7400)<<< 250 Directory successfully changed.
Net::FTP=GLOB(0x11d7400)>>> PASV
...
Net::FTP=GLOB(0x13e2400)<<< 150 Here comes the directory listing.
Net::FTP=GLOB(0x13e2400)<<< 226 Directory send OK.
Net::FTP=GLOB(0x13e2400)>>> CWD demo3
Net::FTP=GLOB(0x13e2400)<<< 250 Directory successfully changed.
Net::FTP=GLOB(0x13e2400)>>> PASV
Net::FTP=GLOB(0x13e2400)<<< 227 Entering Passive Mode (33,44,55,66,19,196).
Net::FTP=GLOB(0x13e2400)>>> NLST
failed to ssl upgrade dataconn: SSL wants a read first at ./upload_ftp.pl line 40.
Net::FTP=GLOB(0x13e2400)<<< 150 Here comes the directory listing.
Net::FTP=GLOB(0x13e2400)>>> CDUP
Net::FTP: Net::Cmd::getline(): unexpected EOF on command channel: at ./upload_ftp.pl line 56.
Net::FTP: Net::Cmd::_is_closed(): unexpected EOF on command channel: at ./upload_ftp.pl line 56.

pyspark in Ipython notebook raises Py4JNetworkError

I was using IPython notebook to run PySpark with just adding the following to the notebook:
import os
os.chdir('../data_files')
import sys
import pandas as pd
%pylab inline
from IPython.display import Image
os.environ['SPARK_HOME']="spark-1.3.1-bin-hadoop2.6"
sys.path.append( os.path.join(os.environ['SPARK_HOME'], 'python') )
sys.path.append( os.path.join(os.environ['SPARK_HOME'], 'bin') )
sys.path.append( os.path.join(os.environ['SPARK_HOME'], 'python/lib/py4j-0.8.2.1-src.zip') )
from pyspark import SparkContext
sc = SparkContext('local')
This worked fine for one project. but on my second project, after running a couple of lines (not the same every time), I get the following error:
ERROR:py4j.java_gateway:An error occurred while trying to connect to the Java server
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/py4j-0.8.2.1-py2.7.egg/py4j/java_gateway.py", line 425, in start
self.socket.connect((self.address, self.port))
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused
---------------------------------------------------------------------------
Py4JNetworkError Traceback (most recent call last)
<ipython-input-21-4626925bbe8f> in <module>()
----> 1 words.count()
/home/eee/Desktop/NLP/spark-1.3.1-bin-hadoop2.6/python/pyspark/rdd.pyc in count(self)
930 3
931 """
--> 932 return self.mapPartitions(lambda i: [sum(1 for _ in i)]).sum()
933
934 def stats(self):
/home/eee/Desktop/NLP/spark-1.3.1-bin-hadoop2.6/python/pyspark/rdd.pyc in sum(self)
921 6.0
922 """
--> 923 return self.mapPartitions(lambda x: [sum(x)]).reduce(operator.add)
924
925 def count(self):
/home/eee/Desktop/NLP/spark-1.3.1-bin-hadoop2.6/python/pyspark/rdd.pyc in reduce(self, f)
737 yield reduce(f, iterator, initial)
738
--> 739 vals = self.mapPartitions(func).collect()
740 if vals:
741 return reduce(f, vals)
/home/eee/Desktop/NLP/spark-1.3.1-bin-hadoop2.6/python/pyspark/rdd.pyc in collect(self)
710 Return a list that contains all of the elements in this RDD.
711 """
--> 712 with SCCallSiteSync(self.context) as css:
713 port = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
714 return list(_load_from_socket(port, self._jrdd_deserializer))
/home/eee/Desktop/NLP/spark-1.3.1-bin-hadoop2.6/python/pyspark/traceback_utils.pyc in __enter__(self)
70 def __enter__(self):
71 if SCCallSiteSync._spark_stack_depth == 0:
---> 72 self._context._jsc.setCallSite(self._call_site)
73 SCCallSiteSync._spark_stack_depth += 1
74
/usr/local/lib/python2.7/dist-packages/py4j-0.8.2.1-py2.7.egg/py4j/java_gateway.pyc in __call__(self, *args)
534 END_COMMAND_PART
535
--> 536 answer = self.gateway_client.send_command(command)
537 return_value = get_return_value(answer, self.gateway_client,
538 self.target_id, self.name)
/usr/local/lib/python2.7/dist-packages/py4j-0.8.2.1-py2.7.egg/py4j/java_gateway.pyc in send_command(self, command, retry)
360 the Py4J protocol.
361 """
--> 362 connection = self._get_connection()
363 try:
364 response = connection.send_command(command)
/usr/local/lib/python2.7/dist-packages/py4j-0.8.2.1-py2.7.egg/py4j/java_gateway.pyc in _get_connection(self)
316 connection = self.deque.pop()
317 except Exception:
--> 318 connection = self._create_connection()
319 return connection
320
/usr/local/lib/python2.7/dist-packages/py4j-0.8.2.1-py2.7.egg/py4j/java_gateway.pyc in _create_connection(self)
323 connection = GatewayConnection(self.address, self.port,
324 self.auto_close, self.gateway_property)
--> 325 connection.start()
326 return connection
327
/usr/local/lib/python2.7/dist-packages/py4j-0.8.2.1-py2.7.egg/py4j/java_gateway.pyc in start(self)
430 'server'
431 logger.exception(msg)
--> 432 raise Py4JNetworkError(msg)
433
434 def close(self):
Py4JNetworkError: An error occurred while trying to connect to the Java server
Once this happens, other lines working before now raise the same problem,
any ideas?
Specifications for:
pyspark 1.4.1
ipython 4.0.0
[OSX / homebrew]
If you want to launch pyspark within a Jupyter (ex-iPython) Notebook using the iPython kernel, I advise you to launch your notebook directly with the pyspark command:
>>>pyspark
But in order to do that, you need to add three lines in your bash .profile or zsh .zshrc profile to set these environment variables:
export SPARK_HOME=/path/to/apache-spark/1.4.1/libexec
export PYSPARK_DRIVER_PYTHON=ipython2 # remember that Apache-Spark only works with pyhton2.7
export PYSPARK_DRIVER_PYTHON_OPTS='notebook'
In my case, given that I'm on OSX , an installed apache-spark with Homebrew, this is:
export SPARK_HOME=/usr/local/Cellar/apache-spark/1.4.1/libexec
export PYSPARK_DRIVER_PYTHON=ipython2
export PYSPARK_DRIVER_PYTHON_OPTS='notebook'
Then, when you execute the command 'pyspark' in your terminal, your terminal will automatically open a Jupyter (ex-iPython) notebook in your default Browser.
>>>pyspark
I 17:51:00.209 NotebookApp] Serving notebooks from local directory: /Users/Thibault/code/kaggle
[I 17:51:00.209 NotebookApp] 0 active kernels
[I 17:51:00.210 NotebookApp] The IPython Notebook is running at: http://localhost:42424/
[I 17:51:00.210 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 17:51:11.980 NotebookApp] Kernel started: 53ad11b1-4fa4-459d-804c-0487036b0f29
15/09/02 17:51:15 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

date is error when run zabbix_bind.9.6_stats.pl on Solaris

analyse named.stats file On Solaris 10, SunOS azalea 5.10 Generic_150400-13 sun4u sparc SUNW,Sun-Fire-V490
perl version: v5.8.4 built for sun4-solaris-64int
BIND 9.9.5-P1, this dns has view zone!
When I ran zabbix_bind.9.6_stats.pl script, the date in the first line of the result file zabbix_named.stats.txt is wrong.
Input file: named.stats
+++ Statistics Dump +++ (1411256097)
++ Incoming Requests ++
245677755 QUERY
11 IQUERY
131 NOTIFY
5 UPDATE
++ Incoming Queries ++
7 RESERVED0
214646337 A
195659 NS
194834 CNAME
67573 SOA
11863353 PTR
13 HINFO
311508 MX
80961 TXT
17684359 AAAA
313197 SRV
35 NAPTR
1026 A6
377 DS
2 NSEC
16 DNSKEY
2658 SPF
6 AXFR
317449 ANY
14 Others
++ Outgoing Queries ++
[View: GLU]
97641561 A
913138 NS
1668 CNAME
3496 SOA
584400 PTR
215941 MX
222061 TXT
8968008 AAAA
10839 SRV
74 DS
1 DNSKEY
11600 ANY
[View: Other]
[View: _bind]
++ Name Server Statistics ++
245679139 IPv4 requests received
6939549 requests with EDNS(0) received
29010 requests with TSIG received
56072 TCP requests received
1735225 auth queries rejected
50400546 recursive queries rejected
6 transfer requests rejected
231559258 responses sent
39867 truncated responses sent
6886241 responses with EDNS(0) sent
28879 responses with TSIG sent
134630025 queries resulted in successful answer
7564120 queries resulted in authoritative answer
145275533 queries resulted in non authoritative answer
33203 queries resulted in referral answer
8608506 queries resulted in nxrrset
26580073 queries resulted in SERVFAIL
9569385 queries resulted in NXDOMAIN
86774948 queries caused recursion
12879202 duplicate queries received
1239821 queries dropped
52135771 other query failures
++ Zone Maintenance Statistics ++
130 IPv4 notifies received
4114 IPv4 SOA queries sent
20 IPv4 AXFR requested
10 IPv4 IXFR requested
30 transfer requests succeeded
++ Resolver Statistics ++
[Common]
223764 mismatch responses received
[View: GLU]
108570571 IPv4 queries sent
76450226 IPv4 responses received
519727 NXDOMAIN received
150555 SERVFAIL received
50543 FORMERR received
394845 other errors received
64245 EDNS(0) query failures
6679270 truncated responses received
77150 lame delegations received
39157947 query retries
32176451 query timeouts
2446839 IPv4 NS address fetches
131398 IPv4 NS address fetch failed
10663 queries with RTT < 10ms
55311397 queries with RTT 10-100ms
17022288 queries with RTT 100-500ms
3465431 queries with RTT 500-800ms
455258 queries with RTT 800-1600ms
12639 queries with RTT > 1600ms
[View: Other]
[View: _bind]
++ Cache DB RRsets ++
[View: GLU (Cache: GLU)]
20848 A
28539 NS
4810 CNAME
4 SOA
140 PTR
4 MX
18 TXT
1523 AAAA
1 SRV
167 DS
774 RRSIG
423 NSEC
1 DNSKEY
20 !A
5 !TXT
314 !AAAA
237 NXDOMAIN
[View: Other (Cache: Other)]
[View: _bind (Cache: _bind)]
++ Socket I/O Statistics ++
101917427 UDP/IPv4 sockets opened
6679398 TCP/IPv4 sockets opened
101934142 UDP/IPv4 sockets closed
6736965 TCP/IPv4 sockets closed
32659 UDP/IPv4 socket bind failures
1614 TCP/IPv4 socket connect failures
101889277 UDP/IPv4 connections established
6417057 TCP/IPv4 connections established
622 TCP/IPv4 connection accept failures
57536 TCP/IPv4 connections accepted
5 TCP/IPv4 send errors
173008 UDP/IPv4 recv errors
37707 TCP/IPv4 recv errors
++ Per Zone Query Statistics ++
[0.0.127.in-addr.arpa (view: GLU)]
27 queries resulted in successful answer
164 queries resulted in authoritative answer
137 queries resulted in NXDOMAIN
[160.192.222.in-addr.arpa (view: GLU)]
141 queries resulted in successful answer
792 queries resulted in authoritative answer
651 queries resulted in NXDOMAIN
[0.0.127.in-addr.arpa (view: Other)]
[160.192.222.in-addr.arpa (view: Other)]
92115 queries resulted in successful answer
106915 queries resulted in authoritative answer
123 queries resulted in nxrrset
14677 queries resulted in NXDOMAIN
[glu.edu.cn (view: Other)]
5 transfer requests rejected
1764308 queries resulted in successful answer
2849091 queries resulted in authoritative answer
574347 queries resulted in nxrrset
510456 queries resulted in NXDOMAIN
[version.bind (view: _bind)]
264 queries resulted in successful answer
264 queries resulted in authoritative answer
[hostname.bind (view: _bind)]
3 queries resulted in successful answer
3 queries resulted in authoritative answer
[authors.bind (view: _bind)]
[id.server (view: _bind)]
--- Statistics Dump --- (1411256097)
+++ Statistics Dump +++ (1411256113)
++ Incoming Requests ++
245678141 QUERY
11 IQUERY
131 NOTIFY
5 UPDATE
++ Incoming Queries ++
7 RESERVED0
214646692 A
195659 NS
194834 CNAME
67578 SOA
11863360 PTR
13 HINFO
311512 MX
80961 TXT
17684371 AAAA
313199 SRV
35 NAPTR
1026 A6
377 DS
2 NSEC
16 DNSKEY
2658 SPF
6 AXFR
317450 ANY
14 Others
++ Outgoing Queries ++
[View: GLU]
97641832 A
913147 NS
1668 CNAME
3496 SOA
584400 PTR
215944 MX
222061 TXT
8968013 AAAA
10839 SRV
74 DS
1 DNSKEY
11600 ANY
[View: Other]
[View: _bind]
++ Name Server Statistics ++
245679525 IPv4 requests received
6939573 requests with EDNS(0) received
29010 requests with TSIG received
56072 TCP requests received
1735231 auth queries rejected
50400606 recursive queries rejected
6 transfer requests rejected
231559636 responses sent
39867 truncated responses sent
6886265 responses with EDNS(0) sent
28879 responses with TSIG sent
134630301 queries resulted in successful answer
7564152 queries resulted in authoritative answer
145275810 queries resulted in non authoritative answer
33203 queries resulted in referral answer
8608514 queries resulted in nxrrset
26580076 queries resulted in SERVFAIL
9569410 queries resulted in NXDOMAIN
86775072 queries caused recursion
12879204 duplicate queries received
1239821 queries dropped
52135837 other query failures
++ Zone Maintenance Statistics ++
130 IPv4 notifies received
4114 IPv4 SOA queries sent
20 IPv4 AXFR requested
10 IPv4 IXFR requested
30 transfer requests succeeded
++ Resolver Statistics ++
[Common]
223769 mismatch responses received
[View: GLU]
108570859 IPv4 queries sent
76450431 IPv4 responses received
519730 NXDOMAIN received
150555 SERVFAIL received
50543 FORMERR received
394845 other errors received
64245 EDNS(0) query failures
6679285 truncated responses received
77150 lame delegations received
39158038 query retries
32176528 query timeouts
2446848 IPv4 NS address fetches
131398 IPv4 NS address fetch failed
10663 queries with RTT < 10ms
55311569 queries with RTT 10-100ms
17022314 queries with RTT 100-500ms
3465436 queries with RTT 500-800ms
455260 queries with RTT 800-1600ms
12639 queries with RTT > 1600ms
[View: Other]
[View: _bind]
++ Cache DB RRsets ++
[View: GLU (Cache: GLU)]
20863 A
28540 NS
4848 CNAME
4 SOA
140 PTR
4 MX
18 TXT
1523 AAAA
1 SRV
167 DS
774 RRSIG
423 NSEC
1 DNSKEY
20 !A
5 !TXT
307 !AAAA
240 NXDOMAIN
[View: Other (Cache: Other)]
[View: _bind (Cache: _bind)]
++ Socket I/O Statistics ++
101917700 UDP/IPv4 sockets opened
6679413 TCP/IPv4 sockets opened
101934409 UDP/IPv4 sockets closed
6736981 TCP/IPv4 sockets closed
32659 UDP/IPv4 socket bind failures
1614 TCP/IPv4 socket connect failures
101889550 UDP/IPv4 connections established
6417072 TCP/IPv4 connections established
622 TCP/IPv4 connection accept failures
57537 TCP/IPv4 connections accepted
5 TCP/IPv4 send errors
173008 UDP/IPv4 recv errors
37707 TCP/IPv4 recv errors
++ Per Zone Query Statistics ++
[0.0.127.in-addr.arpa (view: GLU)]
27 queries resulted in successful answer
164 queries resulted in authoritative answer
137 queries resulted in NXDOMAIN
[160.192.222.in-addr.arpa (view: GLU)]
141 queries resulted in successful answer
792 queries resulted in authoritative answer
651 queries resulted in NXDOMAIN
[glu.edu.cn (view: GLU)]
390933 queries resulted in successful answer
485439 queries resulted in authoritative answer
56638 queries resulted in nxrrset
37870 queries resulted in NXDOMAIN
[0.0.127.in-addr.arpa (view: Other)]
[160.192.222.in-addr.arpa (view: Other)]
92115 queries resulted in successful answer
106915 queries resulted in authoritative answer
123 queries resulted in nxrrset
14677 queries resulted in NXDOMAIN
[glu.edu.cn (view: Other)]
5 transfer requests rejected
1764319 queries resulted in successful answer
2849104 queries resulted in authoritative answer
574349 queries resulted in nxrrset
510456 queries resulted in NXDOMAIN
[GLU.cn (view: Other)]
1 transfer requests rejected
63626 queries resulted in successful answer
243178 queries resulted in authoritative answer
42873 queries resulted in nxrrset
136679 queries resulted in NXDOMAIN
[version.bind (view: _bind)]
264 queries resulted in successful answer
264 queries resulted in authoritative answer
[hostname.bind (view: _bind)]
3 queries resulted in successful answer
3 queries resulted in authoritative answer
[authors.bind (view: _bind)]
[id.server (view: _bind)]
--- Statistics Dump --- (1411256113)
Output file: /tmp/zabbix_named.stats.txt
date: 0 Thu Jan 1 08:00:00 1970
Per_Zone_Query_Statistics_Zone_0.0.127.in-addr.arpa__view__GLU__queries_resulted_in_NXDOMAIN: 137
Per_Zone_Query_Statistics_Zone_0.0.127.in-addr.arpa__view__GLU__queries_resulted_in_authoritative_answer: 164
Per_Zone_Query_Statistics_Zone_0.0.127.in-addr.arpa__view__GLU__queries_resulted_in_successful_answer: 27
Per_Zone_Query_Statistics_Zone_160.192.222.in-addr.arpa__view__CERNET__queries_resulted_in_NXDOMAIN: 32er: 423
Per_Zone_Query_Statistics_Zone_160.192.222.in-addr.arpa__view__GLU__queries_resulted_in_NXDOMAIN: 651
Per_Zone_Query_Statistics_Zone_160.192.222.in-addr.arpa__view__GLU__queries_resulted_in_authoritative_answer: 792
Per_Zone_Query_Statistics_Zone_160.192.222.in-addr.arpa__view__GLU__queries_resulted_in_successful_answer: 141
Per_Zone_Query_Statistics_Zone_160.192.222.in-addr.arpa__view__Other__queries_resulted_in_NXDOMAIN: 14678
Per_Zone_Query_Statistics_Zone_160.192.222.in-addr.arpa__view__Other__queries_resulted_in_authoritative_answer: 106920
Per_Zone_Query_Statistics_Zone_160.192.222.in-addr.arpa__view__Other__queries_resulted_in_nxrrset: 124
Per_Zone_Query_Statistics_Zone_160.192.222.in-addr.arpa__view__Other__queries_resulted_in_successful_answer: 92118
Per_Zone_Query_Statistics_Zone_glu.edu.cn__view__GLU__queries_resulted_in_NXDOMAIN: 37890
Per_Zone_Query_Statistics_Zone_glu.edu.cn__view__GLU__queries_resulted_in_authoritative_answer: 485515
Per_Zone_Query_Statistics_Zone_glu.edu.cn__view__GLU__queries_resulted_in_nxrrset: 56662
Per_Zone_Query_Statistics_Zone_glu.edu.cn__view__GLU__queries_resulted_in_successful_answer: 390965
Per_Zone_Query_Statistics_Zone_glu.edu.cn__view__Other__queries_resulted_in_NXDOMAIN: 510477
Per_Zone_Query_Statistics_Zone_glu.edu.cn__view__Other__queries_resulted_in_authoritative_answer: 2849383
Per_Zone_Query_Statistics_Zone_glu.edu.cn__view__Other__queries_resulted_in_nxrrset: 574397
Per_Zone_Query_Statistics_Zone_glu.edu.cn__view__Other__queries_resulted_in_successful_answer: 1764529
Per_Zone_Query_Statistics_Zone_glu.edu.cn__view__Other__transfer_requests_rejected: 5
Per_Zone_Query_Statistics_Zone_hostname.bind__view___bind__queries_resulted_in_authoritative_answer: 3
Per_Zone_Query_Statistics_Zone_hostname.bind__view___bind__queries_resulted_in_successful_answer: 3
Per_Zone_Query_Statistics_Zone_version.bind__view___bind__queries_resulted_in_authoritative_answer: 266
Per_Zone_Query_Statistics_Zone_version.bind__view___bind__queries_resulted_in_successful_answer: 266
zabbix_bind.9.6_stats.pl (from https://www.zabbix.com/forum/showthread.php?t=38970):
#!/usr/bin/perl
# Dmitry Maksimov 5.02.2013 dima_dm#hotmail.com
# bind 9.6.X and high statistics for Zabbix
#######
# Need!!! perl-suidperl-5.8.5-36.el4_6.3.i386.rpm or later
# Permissions on script
# chmod 4755 zabbix_bind.9.6_stats.pl
# ls -l zabbix_bind.9.6_stats.pl
# -rwsr-xr-x 1 root root 2876 Feb 5 17:40 zabbix_bind.9.6_stats.pl
# Per Zone Query Statistics via Zabbix Low Level Descovery (LLD) (bind option zone-statistics yes) which is only available in Zabbix 2.0 and high.
#### Config ######
my $rndc = '/usr/local/bind9/sbin/rndc';
my $retry = 3; # if error
my $sleep = 5; # in sec
my $data = 10000; # in bytes, size of one statictics sample
my $maxsize
= 5000000; # in bytes $stats file maximum size. If size of file more, whis file ($stats) will be cleared.
my $stats = '/var/named/named.stats';
my $stat_file = '/tmp/zabbix_named.stats.txt';
#### End Config ###
#### Error Code ####
# 1 - OK
# 2 - Error
####################
my $i;
my $date = 0;
my $flag = 0;
my $stat_name = "";
my $zone = "";
my $text = "";
my $counter = "";
my $view = "";
my $code = 1;
my %RESULT = ();
my %ZONENAME = ();
delete #ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer
$ENV{'PATH'} = "/usr/local/bin:/bin:/usr/bin";
while ( $code > 0 && $i < $retry ) {
$i++;
$code = system("$rndc stats");
if ( $code > 0 ) { sleep($sleep); }
}
my $position = ( stat($stats) )[7];
if ( $position < $data ) {
$position = 0;
} else {
$position = $position - $data;
}
open( FILE, "$stats" );
seek( FILE, $position, 0 );
while (<FILE>) {
if (/^\+{3} Statistics Dump \+{3}\s+\((\d+)\)/) { $date = $1; $flag = 1; %RESULT = (); }
if (/^--- Statistics Dump ---/) { $flag = 0; }
if (/^\+{2}\s+(.*)?\s+(?=\+{2})/) {
$stat_name = $1;
$view = "";
if ( $stat_name eq "Per Zone Query Statistics" ) { $flag = 2; $zone = ""; }
}
if (/^\[View:\s+(.*)?(?=\])/) { $view = "_View_" . $1; }
if ( /^\[(.*)?(?=\])/ && $flag == 2 ) { $zone = "_Zone_" . $1; $zone =~ s#[^a-zA-Z0-9_\.\-]#_#g; }
if ( /^\s+(\d+)\s+(.*)?(?=\n)/ && $flag == 1 ) {
$text = $stat_name . $view . "_" . $2;
$counter = $1;
$text =~ s#[^a-zA-Z0-9_\.\-]#_#g;
$RESULT{$text} = $counter;
}
if ( /^\s+(\d+)\s+(.*)?(?=\n)/ && $flag == 2 ) {
$text = $stat_name . $zone . "_" . $2;
$counter = $1;
$text =~ s#[^a-zA-Z0-9_\.\-]#_#g;
$RESULT{$text} = $counter;
$ZONENAME{$zone} = 1;
}
}
close(FILE);
if ( ( stat($stats) )[7] > $maxsize ) {
open( FILE, ">$stats" );
close(FILE);
}
open( FILE, ">$stat_file" );
print FILE "date: $date ", scalar( localtime($date) ), "\n";
foreach $i ( sort( keys %RESULT ) ) {
print FILE "$i:\t$RESULT{$i}\n";
}
close(FILE);
if ( defined( $ARGV[0] ) && lc( $ARGV[0] ) eq "lld" ) {
print_lld();
} else {
if ( $code > 0 ) {
print "2\n";
} else {
print "1\n";
}
}
sub print_lld {
my $first = 1;
my $key = "";
print "{\n";
print "\t\"data\":[\n\n";
foreach $key ( keys %ZONENAME ) {
print "\t,\n" if not $first;
$first = 0;
print "\t{\n";
print "\t\t\"{#ZONENAME}\":\"$key\"\n";
print "\t}\n";
}
print "\n\t]\n";
print "}\n";
}
When I run it in Other machince, Date value is ok!
This machince: SunOS orchid 5.10 Generic_150400-13 sun4u sparc SUNW,Ultra-4
perl version: v5.8.4 built for sun4-solaris-64int
BIND 9.9.5-P1, But this dns has not view zone!
Input file: named.stats
+++ Statistics Dump +++ (1411352600)
++ Incoming Requests ++
331205 QUERY
++ Incoming Queries ++
174193 A
1045 NS
103 CNAME
760 SOA
103046 PTR
276 MX
18 TXT
41567 AAAA
49 SRV
286 A6
2 NSEC
9863 ANY
++ Outgoing Queries ++
[View: default]
190903 A
1443 NS
971 PTR
1225 AAAA
24 SRV
[View: _bind]
++ Name Server Statistics ++
331207 IPv4 requests received
177845 requests with EDNS(0) received
23 TCP requests received
38595 auth queries rejected
2468 recursive queries rejected
330359 responses sent
27 truncated responses sent
177847 responses with EDNS(0) sent
227691 queries resulted in successful answer
197399 queries resulted in authoritative answer
91628 queries resulted in non authoritative answer
41394 queries resulted in nxrrset
267 queries resulted in SERVFAIL
19942 queries resulted in NXDOMAIN
78029 queries caused recursion
851 duplicate queries received
41063 other query failures
++ Zone Maintenance Statistics ++
513 IPv4 SOA queries sent
++ Resolver Statistics ++
[Common]
[View: default]
194568 IPv4 queries sent
188556 IPv4 responses received
1113 NXDOMAIN received
91 SERVFAIL received
863 FORMERR received
30 other errors received
877 EDNS(0) query failures
274 truncated responses received
200 lame delegations received
16212 query retries
6142 query timeouts
28491 IPv4 NS address fetches
84 IPv4 NS address fetch failed
111 queries with RTT < 10ms
144059 queries with RTT 10-100ms
44047 queries with RTT 100-500ms
250 queries with RTT 500-800ms
3 queries with RTT 800-1600ms
[View: _bind]
++ Cache DB RRsets ++
[View: default]
1087 A
583 NS
191 CNAME
1 PTR
174 AAAA
21 DS
74 RRSIG
17 NSEC
1 !A
2 NXDOMAIN
[View: _bind (Cache: _bind)]
++ Socket I/O Statistics ++
194826 UDP/IPv4 sockets opened
277 TCP/IPv4 sockets opened
194826 UDP/IPv4 sockets closed
298 TCP/IPv4 sockets closed
19 UDP/IPv4 socket bind failures
194291 UDP/IPv4 connections established
48 TCP/IPv4 connections established
25 TCP/IPv4 connections accepted
87 UDP/IPv4 recv errors
++ Per Zone Query Statistics ++
--- Statistics Dump --- (1411352600)
Output file: /tmp/zabbix_named.stats.txt
date: 1411352600 Mon Sep 22 10:23:20 2014
Cache_DB_RRsets_View_default_A: 1087
Cache_DB_RRsets_View_default_AAAA: 174
Cache_DB_RRsets_View_default_CNAME: 191
Cache_DB_RRsets_View_default_DS: 21
Cache_DB_RRsets_View_default_NS: 583
Cache_DB_RRsets_View_default_NSEC: 17
Cache_DB_RRsets_View_default_NXDOMAIN: 2
Cache_DB_RRsets_View_default_PTR: 1
Cache_DB_RRsets_View_default_RRSIG: 74
Cache_DB_RRsets_View_default__A: 1
Incoming_Queries_A: 174193
Incoming_Queries_A6: 286
Incoming_Queries_AAAA: 41567
Incoming_Queries_ANY: 9863
Incoming_Queries_CNAME: 103
Incoming_Queries_MX: 276
Incoming_Queries_NS: 1045
Incoming_Queries_NSEC: 2
Incoming_Queries_PTR: 103046
Incoming_Queries_SOA: 760
Incoming_Queries_SRV: 49
Incoming_Queries_TXT: 18
Incoming_Requests_QUERY: 331205
Name_Server_Statistics_IPv4_requests_received: 331207
Name_Server_Statistics_TCP_requests_received: 23
Name_Server_Statistics_auth_queries_rejected: 38595
Name_Server_Statistics_duplicate_queries_received: 851
Name_Server_Statistics_other_query_failures: 41063
Name_Server_Statistics_queries_caused_recursion: 78029
Name_Server_Statistics_queries_resulted_in_NXDOMAIN: 19942
Name_Server_Statistics_queries_resulted_in_SERVFAIL: 267
Name_Server_Statistics_queries_resulted_in_authoritative_answer: 197399
Name_Server_Statistics_queries_resulted_in_non_authoritative_answer: 91628
Name_Server_Statistics_queries_resulted_in_nxrrset: 41394
Name_Server_Statistics_queries_resulted_in_successful_answer: 227691
Name_Server_Statistics_recursive_queries_rejected: 2468
Name_Server_Statistics_requests_with_EDNS_0__received: 177845
Name_Server_Statistics_responses_sent: 330359
Name_Server_Statistics_responses_with_EDNS_0__sent: 177847
Name_Server_Statistics_truncated_responses_sent: 27
Outgoing_Queries_View_default_A: 190903
Outgoing_Queries_View_default_AAAA: 1225
Outgoing_Queries_View_default_NS: 1443
Outgoing_Queries_View_default_PTR: 971
Outgoing_Queries_View_default_SRV: 24
Resolver_Statistics_View_default_EDNS_0__query_failures: 877
Resolver_Statistics_View_default_FORMERR_received: 863
Resolver_Statistics_View_default_IPv4_NS_address_fetch_failed: 84
Resolver_Statistics_View_default_IPv4_NS_address_fetches: 28491
Resolver_Statistics_View_default_IPv4_queries_sent: 194568
Resolver_Statistics_View_default_IPv4_responses_received: 188556
Resolver_Statistics_View_default_NXDOMAIN_received: 1113
Resolver_Statistics_View_default_SERVFAIL_received: 91
Resolver_Statistics_View_default_lame_delegations_received: 200
Resolver_Statistics_View_default_other_errors_received: 30
Resolver_Statistics_View_default_queries_with_RTT_10-100ms: 144059
Resolver_Statistics_View_default_queries_with_RTT_100-500ms: 44047
Resolver_Statistics_View_default_queries_with_RTT_500-800ms: 250
Resolver_Statistics_View_default_queries_with_RTT_800-1600ms: 3
Resolver_Statistics_View_default_queries_with_RTT___10ms: 111
Resolver_Statistics_View_default_query_retries: 16212
Resolver_Statistics_View_default_query_timeouts: 6142
Resolver_Statistics_View_default_truncated_responses_received: 274
Socket_I_O_Statistics_TCP_IPv4_connections_accepted: 25
Socket_I_O_Statistics_TCP_IPv4_connections_established: 48
Socket_I_O_Statistics_TCP_IPv4_sockets_closed: 298
Socket_I_O_Statistics_TCP_IPv4_sockets_opened: 277
Socket_I_O_Statistics_UDP_IPv4_connections_established: 194291
Socket_I_O_Statistics_UDP_IPv4_recv_errors: 87
Socket_I_O_Statistics_UDP_IPv4_socket_bind_failures: 19
Socket_I_O_Statistics_UDP_IPv4_sockets_closed: 194826
Socket_I_O_Statistics_UDP_IPv4_sockets_opened: 194826
Zone_Maintenance_Statistics_IPv4_SOA_queries_sent: 513
The date in the output file is set to 0 initially, and then gets parsed from named.stats in this line of the script:
if (/^\+{3} Statistics Dump \+{3}\s+\((\d+)\)/) { $date = $1; $flag = 1; %RESULT = (); }
The date and time are recorded in named.stats in Unix time, the number of seconds after Jan 1st 1970.
If, for some reason, that line of the stats file does not match this expression, the date will not get set, and the script will assume that the date/time is 0, i.e. that it's Jan 1st 1970.
You will need to work out why the script is not finding the date correctly. Was named.stats available when the script ran? Did the script give any errors? Has your system clock stopped working so it thinks it's Jan 1st 1970 all the time? Etc.
If you add use strict; use warnings; to the top of the script (under the first line), this will enable warnings which will make it easier to track down errors.
Author of the script answer my question in zabbix forum:
that size оf one statistics sample < $data in Byte.
my $data=10000
I set to my $data > size оf named.stats.
It works fine.
thinks!

BSONDecoder doesn't understand type : 53 Excpetion

It's hard to tell how it happens. I use mongodb for hadoop output (com.mongodb.hadoop). It seems all right in the beginning. When I tried to do a modification on the data, this issue just burst out.I cannot read the output collection data from both umongo(https://github.com/agirbal/umongo) & mongoHub(http://mongohub.todayclose.com/). I even cannot solve it by roll back my code.
Here is the trace from umongo
java.lang.UnsupportedOperationException: BSONDecoder doesn't understand type : 53 name: S
at org.bson.BasicBSONDecoder.decodeElement(BasicBSONDecoder.java:226)
at org.bson.BasicBSONDecoder.decodeElement(BasicBSONDecoder.java:206)
at org.bson.BasicBSONDecoder._decode(BasicBSONDecoder.java:79)
at org.bson.BasicBSONDecoder.decode(BasicBSONDecoder.java:57)
at com.mongodb.DefaultDBDecoder.decode(DefaultDBDecoder.java:56)
at com.mongodb.Response.<init>(Response.java:66)
at com.mongodb.DBPort.go(DBPort.java:128)
at com.mongodb.DBPort.call(DBPort.java:79)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:218)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:305)
at com.mongodb.DBCursor._check(DBCursor.java:369)
at com.mongodb.DBCursor.getServerAddress(DBCursor.java:687)
at com.mongodb.DBCursor.toString(DBCursor.java:740)
at com.edgytech.umongo.CollectionPanel$4.getRoot(CollectionPanel.java:427)
at com.edgytech.umongo.DbJob.wrapUp(DbJob.java:130)
at com.edgytech.umongo.DbJob$1.done(DbJob.java:81)
at javax.swing.SwingWorker$5.run(SwingWorker.java:717)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:814)
at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:95)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:824)
at javax.swing.Timer.fireActionPerformed(Timer.java:291)
at javax.swing.Timer$DoPostEvent.run(Timer.java:221)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:682)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:643)
at java.awt.EventQueue$1.run(EventQueue.java:641)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:652)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
MongoDB: mongodb-2.2.0-x86_64 from HomeBrew(http://mxcl.github.com/homebrew/)
OS: Mac OS 10.8.1
Driver: 2.7.2 & 2.7.3
UPDATE
The error from mongo shell
Wed Sep 26 09:24:20 Assertion: 10320:BSONElement: bad type 53
0x10004656b 0x1000b9b1e 0x100013a62 0x100292425 0x10011ef2e 0x100120ec8 0x10014ab74 0x1001498f4 0x1001cd414 0x1001490fc 0x10014ad81 0x100159c8f 0x100255418 0x10025551b 0x10029d0ba 0x100007277 0x10000919a 0x100000dd4 0x1
0 mongo 0x000000010004656b _ZN5mongo15printStackTraceERSo + 43
1 mongo 0x00000001000b9b1e _ZN5mongo11msgassertedEiPKc + 206
2 mongo 0x0000000100013a62 _ZNK5mongo11BSONElement4sizeEv + 418
3 mongo 0x0000000100292425 _ZN5mongo16resolveBSONFieldEP9JSContextP8JSObjectljPS3_ + 389
4 mongo 0x000000010011ef2e js_LookupPropertyWithFlags + 734
5 mongo 0x0000000100120ec8 js_GetProperty + 136
6 mongo 0x000000010014ab74 js_Interpret + 3396
7 mongo 0x00000001001498f4 js_Invoke + 3300
8 mongo 0x00000001001cd414 fun_apply + 532
9 mongo 0x00000001001490fc js_Invoke + 1260
10 mongo 0x000000010014ad81 js_Interpret + 3921
11 mongo 0x0000000100159c8f js_Execute + 1103
12 mongo 0x0000000100255418 JS_EvaluateUCScriptForPrincipals + 168
13 mongo 0x000000010025551b JS_EvaluateScript + 107
14 mongo 0x000000010029d0ba _ZN5mongo7SMScope4execERKNS_10StringDataERKSsbbbi + 330
15 mongo 0x0000000100007277 _Z5_mainiPPc + 12599
16 mongo 0x000000010000919a main + 42
17 mongo 0x0000000100000dd4 start + 52
18 ??? 0x0000000000000001 0x0 + 1
Error: BSONElement: bad type 53