Update: Well, I've found the mongo shell and am testing with that, and I get essentially the same issue there on the problem server, so definitely not a Perl problem, but still wondering what the issue is.
I have this test program which works find on one server:
use MongoDB;
use Data::Dumper;
my $mdb = MongoDB->connect( 'mongodb://xxxxxxx', {
username => 'xxxxx@xxxxxx.COM',
auth_mechanism => 'GSSAPI',
});
my $db = $mdb->get_database('testdb');
my $cfg = $db->get_collection('test_coll');
my $result = $cfg->insert_one({
name => 'test_name',
test_field => 'this_is_a_test',
});
my $id = $result->inserted_id();
print "Inserted: $id\n";
my $all_cfg = $cfg->find;
while ( my $c = $all_cfg->next ) {
print Dumper $c;
}
But on another server gets this error on the insert:
MongoDB::AuthError: Authentication to //xxxxxxx:27017 failed: MongoDB:
+:AuthError: GSSAPI error: MongoDB::AuthError: Could not start GSSAPI.
+ Did you run kinit? Error was: no mechanism available; SASL(-4): no
+mechanism available: No worthy mechs found; client_start error. (Call
+backs?)
And yes, I did run kinit on both systems. Authen::SASL::XS is installed on both systems, I'm not real familiar with sasl, gssapi, kerberos...and not sure where to start. How to start tracking down the problem?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.