Alachisoft / NCache

NCache: Highly Scalable Distributed Cache for .NET
http://www.alachisoft.com
Apache License 2.0
647 stars 123 forks source link

MachineName is invalid when using localhost #10

Closed gigi81 closed 7 years ago

gigi81 commented 7 years ago

I'm using 127.0.0.1 as the ip for NCache server. The NCache service starts but then when I try to run "listcaches.exe", I get this error:

Alachisoft (R) NCache Utility ListCaches. Version 4.6 SP3 Copyright (C) Alachisoft 2017. All rights reserved.

Error: MachineName value is invalid.

Alachisoft.NCache.Runtime.Exceptions.ManagementException: MachineName value is invalid. ---> System.ArgumentException: MachineName value is invalid. at System.ServiceProcess.ServiceController..ctor(String name, String machineName) at Alachisoft.NCache.ServiceControl.ServiceControl..ctor(String machine, String service) at Alachisoft.NCache.ServiceControl.ServiceBase.Start(TimeSpan timeout, String service) --- End of inner exception stack trace --- at Alachisoft.NCache.ServiceControl.ServiceBase.Start(TimeSpan timeout, String service) at Alachisoft.NCache.ServiceControl.CacheService.Start(TimeSpan timeout) at Alachisoft.NCache.Management.ServiceControl.RPCService.TryIntializeServer(TimeSpan timeout) at Alachisoft.NCache.Management.ServiceControl.RPCService.GetCacheServer(TimeSpan timeout) at Alachisoft.NCache.Tools.ListCaches.ListCachesTool.Run(String[] args)

Kal-Alachisoft commented 7 years ago

Hi @gigi81,

The command line tool List caches provides some switches, you can see their details by running the following command

listcaches /?

Using '/s' you can specify the machine address on which you want to see all the configured caches.

Please run your listcaches command like this

listcaches /s 127.0.0.1

I just tested it at my end and worked just fine. Moreover, it is not recommended from our side to keep NCache Service running on the IP 127.0.0.1

Please let me know if this worked for you

gigi81 commented 7 years ago

Specifying the /s switch fixed the problem. Correct me if I'm wrong, I guess this tool by default doesn't get the ip from the client.ncconf file but uses the machine ip adress, so the error. I'm closing this now. Thanks