Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default port to 11211 in URLs #207

Closed
mjackson opened this issue Sep 10, 2014 · 3 comments
Closed

Default port to 11211 in URLs #207

mjackson opened this issue Sep 10, 2014 · 3 comments
Labels

Comments

@mjackson
Copy link

On a fresh install of version 1.0.0

$ node
> var config = require('./config');
> var m  = new Memcached(config.memcache_servers, {
  failOverServers: config.memcache_failover_servers
});
> m.get('foo', console.log)
TypeError: Cannot call method 'reverse' of null
    at Client.connect (/Users/michael/Projects/valet-express/node_modules/memcached/lib/memcached.js:132:42)
    at Client.memcachedCommand [as command] (/Users/michael/Projects/valet-express/node_modules/memcached/lib/memcached.js:302:10)
    at Client.get (/Users/michael/Projects/valet-express/node_modules/memcached/lib/memcached.js:812:10)
    at repl:1:4
    at REPLServer.self.eval (repl.js:110:21)
    at Interface.<anonymous> (repl.js:239:12)
    at Interface.EventEmitter.emit (events.js:95:17)
    at Interface._onLine (readline.js:202:10)
    at Interface._line (readline.js:531:8)
    at Interface._ttyWrite (readline.js:760:14)
@mjackson
Copy link
Author

I traced this back to my server config only having the IP address, and not including the port #. It would be nice if node-memcached just assumed a port of 11211 if no port is in the URL.

@mjackson mjackson changed the title TypeError: Cannot call method 'reverse' of null Default port to 11211 in URLs Sep 11, 2014
@3rd-Eden
Copy link
Owner

Tagged as feature request, but glad you figured out what was causing your issue.

@ronkorving
Copy link
Collaborator

This has been fixed in #222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants