mongodb-erlang icon indicating copy to clipboard operation
mongodb-erlang copied to clipboard

Generic server terminating

Open liujp-arch opened this issue 4 years ago • 4 comments

Hi, when i use mongc:connect({rs, <<"...">>, [...]}, [...], [...]) connect to a mongodb cluster, i get a error like this,
** Generic server <0.70.0> terminating ** Last message in was {'EXIT',<0.69.0>,killed} ** When Server state == {state,rsSecondary, ....} ....... ** Reason for termination == ** killed do you have any suggestions for me, thanks very much

liujp-arch avatar May 06 '20 08:05 liujp-arch

maybe it is killed because the connection is closed? Can you please try with {ok, Connection} = mc_worker_api:connect ([{database, Database}]).

comtihon avatar May 06 '20 08:05 comtihon

yes, it worked like you said, weird, even if this error occured, the data i want to write is wrote in the db.

liujp-arch avatar May 07 '20 02:05 liujp-arch

@comtihon I think this one is related to #226 and might be able to be closed and folded into that one.

I suspect something is going on here with the same issues I've been diagnosing on the replicaset connections and mc_monitor and ets

@liujp-arch if you are still around mind sharing details of what's in your hosts list, specifically:

  • are the hostnames lists or binaries?
  • do the hostnames and ports match identically to what the Mongo server reports in rs.status()?

dmsnell avatar Dec 30 '20 04:12 dmsnell

@liujp-arch you might try this again now that #236 has merged into master, which I believe has a good chance of fixing that for you.

dmsnell avatar May 26 '21 09:05 dmsnell