Logstach output data to mongodb handshake error

I just output data to monodb with Mongodb output plugin(v3.1.6). However, somethong worng happens when logstash straring up .
The logs like this:

 [INFO ] 2021-06-07 13:20:09.220 [[main]-pipeline-manager] javapipeline - Pipeline Java execution initialization time {"seconds"=>0.92}
 [INFO ] 2021-06-07 13:20:09.383 [[main]-pipeline-manager] javapipeline - Pipeline started {"pipeline.id"=>"main"}
 [INFO ] 2021-06-07 13:20:09.404 [[main]<http] http - Starting http input listener {:address=>"127.0.0.1:7124", :ssl=>"false"}
 [INFO ] 2021-06-07 13:20:09.529 [Agent thread] agent - Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
 [WARN ] 2021-06-07 13:20:17.472 [Ruby-0-Thread-11: :1] mongodb - MONGODB | Failed to handshake with 127.0.0.1:27017: ArgumentError: wrong number of arguments (given 2, expected 1)
 [WARN ] 2021-06-07 13:20:17.474 [Ruby-0-Thread-11: :1] mongodb - MONGODB | Error running ismaster on 127.0.0.1:27017: ArgumentError: wrong number of arguments (given 2, expected 1)
 [WARN ] 2021-06-07 13:20:27.492 [Ruby-0-Thread-11: :1] mongodb - MONGODB | Failed to handshake with 127.0.0.1:27017: ArgumentError: wrong number of arguments (given 2, expected 1)
 [WARN ] 2021-06-07 13:20:27.493 [Ruby-0-Thread-11: :1] mongodb - MONGODB | Error running ismaster on 127.0.0.1:27017: ArgumentError: wrong number of arguments (given 2, expected 1)

my logstash config

input{
    http {
	port => 7124
        host => "127.0.0.1"
	}
}
output{
    
	stdout{}
        mongodb {
	   id => "xkwtms"
	   collection => "questioncallback"
	   database => "xkw"
 	   uri => "mongodb://root:abc123@127.0.0.1:27017"
	}	
	file {
	   path => "testlog/%{+YYYY-MM-dd}-xkw.log"
	 }
}

how to deal it? please help me..
i think that wherthrer the driver is not adatprd

PS:mongodb version 4.4.6 , logstash 7.13.1

There are three similar open issues for this, and an unmerged PR that claims to fix one such issue. That might give some ideas of where to look.