turms icon indicating copy to clipboard operation
turms copied to clipboard

Running Spring Boot project directly failed.

Open waitshang opened this issue 2 years ago • 1 comments

I install redis, mongodb locally with binary archive (no pip, no docker). Starting redis, mongodb in default port. Then starting turms-server main method in dev profiles. And it comes out that:

  • "com.mongodb.MongoCommandException: Command failed with error 59 (CommandNotFound): 'no such command: 'enableSharding'' on server localhost:27017."

Log file:turms-service_20220720_0.log

VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8

waitshang avatar Jul 20 '22 08:07 waitshang

It's a problem related to the config of MongoDB servers. Please ensure:

  1. Running turms servers with MongoDB sharded clusters
  2. Configuring turms servers to connect to the mongos server instead of the mongo server. For example: (turms-gateway) image

(turms-service) image

And just try to run turms servers again.

JamesChenX avatar Jul 20 '22 11:07 JamesChenX

I notice that you have edited your post, and no such command: 'enableSharding'' on server localhost:27017. just means you connected to the wrong server, and you should connect to the mongos server.

JamesChenX avatar Aug 27 '22 23:08 JamesChenX