草庐IT

connection_set

全部标签

python - AWS + MongoDB : How to connect to mongo server on AWS linux instance?

我启动了一个AWSlinux实例并按照说明安装并运行了mongohere.mongo服务正在运行并在27017上接受连接。但是,当我使用端口27017访问服务器publikdns时,服务器没有响应,我没有看到默认的mongo消息。我正在尝试在另一个实例上运行Python(Flask)服务器并尝试使用私有(private)ip连接到mongo服务器,但连接没有发生。我在终端上收到此错误消息:pymongo.errors.ServerSelectionTimeoutError:xxx.xx.xx.xx:27017:[Errno111]Connectionrefused这不是在aws上使用m

python - 使用 $set 和位置 $ 运算符更新集合中数组中的文档

收藏:{"shopping_list":[{"date":22,"drinks":[1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000],"year":2016,"month":11},{"date":23,"drinks":[1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000],"year":2016,"month":11}],"password":"user","date_signup":"10-11-2016","name":

json - mongoimport 失败 : error connecting to db server: no reachable servers hosted on google compute

我正在使用下面的代码尝试导入json文档的json数组。无论我做什么,我都会在标题中得到错误。我正在使用一个名为rs0的副本集。我正在从运行mongod服务的gcompute实例运行命令。我尝试同时使用localhost和127.0.0.1作为本地主机种子。以及第二个副本成员的ip。以及本地主机的外部ip。mongoimport--db--collection--username--password--hostrs0/[ip_of_other_replica_member:27017],[127.0.0.1:27017]--typejson--file"/tmp/json_backup

mongodb - 在 MongoShell : Not able to connect to my collection, db.collection_name 返回 NaN

我使用的是MongoDBEnterprise,MongoDBshell版本:3.2.5我有一个db=mydb和一个collections=['events','events__2015-12-01','events__2015-11-01']我有一个python/pymongo脚本,我可以在其中连接到每个文档,但在mongoshell中我无法连接到过时的集合?换句话说mongodb>usemydbswitchedtodbmydbmongodb>db.eventmydb/eventmongodb>db.event__2015-12-01NaNmongodb>db.event__2015-

python - 皮蒙戈 : to check if we have connected to MongoDB database

client=MongoClient('localhost',27017)db=client[DB_NAME]defdb_connect():#connectingtoaDBinmongoDBtry:ifclient.get_database(DB_NAME):print("ConnectionSuccessful!")returnTrueexcept:print("Pleasecheckyourconnection")returnFalsedefdb_close():print("ConnectionGettingClosed")client.close()我正在尝试完成一项任务,只

java - Mongo Connection 在 RESTful API 中创建多次且从未发布

我使用ApacheJersey编写了一个RESTfulAPI。我使用MongoDB作为我的后端。我使用Morphia(v.1.3.4)将POJO映射并保存到数据库。我尝试按照到处推荐的方式在我的API中遵循“1个应用程序1个连接”,但我不确定我是否成功。我在Tomcat8中运行我的API。我还运行了Mongostat来查看详细信息和连接。一开始,Mongostat显示了1个到MongoDB服务器的连接。我使用Postman测试了我的API,它工作正常。然后,我在SoapUI中创建了一个负载测试,我每秒模拟100个用户。我在Mongostat中看到了更新。我看到有103个连接。这是显示此

FPGA编译报错内容[Common 17-55] ‘set_property‘ expects at least one object.

项目场景:FPGA代码编译时报错问题描述编译报错内容[Common17-55]‘set_property’expectsatleastoneobject.原因分析:当一个引脚存在于xdc文件中,但是工程的顶层模块的引脚里没有这个引脚时,就会报出这个错误解决方案:查找报错的这个引脚是否存在于工程的顶层模块的引脚列表中,最大的可能是xdc中的引脚名与工程中的引脚名不一致,一般是拼写错误,或者误删了;如果不小心将工程的顶层文件设置错误那么就会爆出很多个[Common17-55]‘set_property’expectsatleastoneobject.错误;

java - Hadoop map/reduce 显示错误 : com. mongodb.connection.SslSettings$Builder.context(Ljavax/net/ssl/SSLContext;)

我定期运行map/reduce作业,最近我收到了这种日志:17/09/2710:38:03INFOmapreduce.Job:map27%reduce0%17/09/2710:38:07INFOmapreduce.Job:TaskId:attempt_1494368272823_5583_m_000014_0,Status:FAILEDError:com.mongodb.connection.SslSettings$Builder.context(Ljavax/net/ssl/SSLContext;)Lcom/mongodb/connection/SslSettings$Builder

mongodb - 在 Docker 启动期间,我收到此消息 : "getting the final child' s pid from pipe caused "read init-p: connection reset by peer"

我在CentOSLinux7.6.1810和PleskOnyx17.8.11下安装了Docker,一切正常。几个小时以来,我无法再启动mongoDB或Docker。我收到此错误消息{"message":"OCIruntimecreatefailed:container_linux.go:344:startingcontainerprocesscaused\"process_linux.go:297:gettingthefinalchild'spidfrompipecaused\\\"readinit-复制代码p:连接由对等方重置\\\“\”:未知“它会是什么?

python - 使用 $set 和 aggregate 更新 MongoDB 集合

我需要将timestamp_ms的类型从string更改为double并创建FixedDate字段基于这个新的timestamp_ms字段。然后,将NewDate字段中的时间戳信息更改为ISO日期。我使用了这段代码:collection.update({"FixedDate":{"$exists":False}},[{"$set":{"FixedDate":{"$convert":{"input":"$timestamp_ms","to":"double"}}}},{"$set":{"NewDate":{"$toDate":"$FixedDate"}}}],multi=True)它给出