403 while connecting to membase server
Thu, 01/12/2012 - 13:50
Hi,
I am getting below error while connecting to membase.
It works fine when I request http://[servername]:8091/pools from
1. a browser
2. wget from the box where my application server is installed.
3. a standalone program running on the box where my application server is installed.
It DOESN't work when I use the same code while making a request from an application server (tomcat)
2012-01-12 13:18:24.385 WARN net.spy.memcached.vbucket.ConfigurationProviderHTTP: Connection problems with URI http://[servername]:8091/pools ...skipping
java.io.IOException: Server returned HTTP response code: 403 for URL: http://[servername]:8091/pools
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1241)Code:
URI base = new URI("http://"+server+":8091/pools");
baseURIs.add(base);
MemcachedClient c = new MemcachedClient(baseURIs, "mybucket","");Any help?
Thanks!
Thu, 01/12/2012 - 14:56
It is working when I install membase in the same server where the tomcat is running
and use
http://localhost:8091/pools
instead of
http://[servername]:8091/pools
What could be wrong?
I use Membase: 1.7.1
and following libraries:
spymemcached-2.7.1.jar
commons-codec-1.5.jar
jettison-1.3.jar
netty-3.1.5.GA.jar