You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by "Anthony Baker (JIRA)" <ji...@apache.org> on 2017/03/09 18:02:38 UTC

[jira] [Closed] (GEODE-2573) Client authentication to secured geode cluster fails

     [ https://issues.apache.org/jira/browse/GEODE-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anthony Baker closed GEODE-2573.
--------------------------------

> Client authentication to secured geode cluster fails
> ----------------------------------------------------
>
>                 Key: GEODE-2573
>                 URL: https://issues.apache.org/jira/browse/GEODE-2573
>             Project: Geode
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 1.1.0
>            Reporter: Andrei Biketov
>
> I have simple setup: one locator and one server, both secured. Now I'm trying to connect to the cluster from the client. I'm passing credentials as security-username/security-password from the client but I'm getting exception:
> [info 2017/03/01 22:45:40.220 EST <poolTimer-DEFAULT-3> tid=0x1b] Error prefilling connections : org.apache.geode.security.AuthenticationRequiredException: No security credentials are provided
> org.apache.geode.security.AuthenticationRequiredException: No security credentials are provided
> 	at org.apache.geode.internal.cache.tier.sockets.HandShake.readMessage(HandShake.java:1473)
> 	at org.apache.geode.internal.cache.tier.sockets.HandShake.greet(HandShake.java:1327)
> 	at org.apache.geode.cache.client.internal.ConnectionImpl.connect(ConnectionImpl.java:108)
> 	at org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:135)
> 	at org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:252)
> 	at org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.prefillConnection(ConnectionManagerImpl.java:758)
> 	at org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.prefill(ConnectionManagerImpl.java:701)
> 	at org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl$PrefillConnectionsTask.run2(ConnectionManagerImpl.java:852)
> 	at org.apache.geode.cache.client.internal.PoolImpl$PoolTask.run(PoolImpl.java:1235)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> Code:
> ClientCache cache = null;
> 		Properties props = new Properties();
> 		props.setProperty("security-username", "admin");
> 		props.setProperty("security-password", "secret");
> 		try {
> 			System.out.println("Client app connecting to Geode cluster");
> 			cache = new ClientCacheFactory(props).addPoolLocator("localhost", 10334).create();
> 			
> 			Region<String, String> customer = cache.getRegion("customer");
> 			String value = customer.get("1");
> 			 System.out.println("Value from the region:" + value);
> 		} catch (Exception e) {
> 			System.out.println("Error creating the Client Cache'");
> 			System.out.println(e.getCause());
> 			throw e;
> 		}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)