From issues-return-52761-archive-asf-public=cust-asf.ponee.io@geode.apache.org Tue Aug 27 17:37:04 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id ABE7C180654 for ; Tue, 27 Aug 2019 19:37:03 +0200 (CEST) Received: (qmail 31169 invoked by uid 500); 27 Aug 2019 17:37:03 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 31145 invoked by uid 99); 27 Aug 2019 17:37:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Aug 2019 17:37:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 012DEE30E0 for ; Tue, 27 Aug 2019 17:37:02 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 7CBD5782295 for ; Tue, 27 Aug 2019 17:37:00 +0000 (UTC) Date: Tue, 27 Aug 2019 17:37:00 +0000 (UTC) From: "Darrel Schneider (Jira)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (GEODE-6153) Geode incorrectly parses the 'locators' property throwing a NullPointerException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GEODE-6153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Darrel Schneider reassigned GEODE-6153: --------------------------------------- Assignee: Bruce Schuchardt (was: Galen O'Sullivan) > Geode incorrectly parses the 'locators' property throwing a NullPointerException > -------------------------------------------------------------------------------- > > Key: GEODE-6153 > URL: https://issues.apache.org/jira/browse/GEODE-6153 > Project: Geode > Issue Type: Bug > Components: membership > Reporter: John Blum > Assignee: Bruce Schuchardt > Priority: Major > > When defining Geode Properties and using the API to start a Geode Server connecting to an existing Locator, if the {{hostname}} of the Locator is incorrectly typed, Geode will throw a {{NullPointerException}}. > For instance, if I define Geode Properties using... > {code:java} > ... > private static Properties gemfireProperties() { > Properties gemfireProperties = new Properties(); > gemfireProperties.setProperty("name", "SessionGeodeServer"); > gemfireProperties.setProperty("log-level", LOG_LEVEL); > gemfireProperties.setProperty("locators", "loclhost[10334]"); > gemfireProperties.setProperty("jmx-manager", "true"); > gemfireProperties.setProperty("jmx-manager-start", "true"); > gemfireProperties.setProperty("start-locator", "localhost[10334]"); > return gemfireProperties; > } > private static Cache gemfireCache(Properties gemfireProperties) { > return new CacheFactory(gemfireProperties).create(); > } > ... > {code} > And, as you can see, I mistyped "localhost" as "loclhost" in {{gemfireProperties.setProperty("locators", "loclhost[10334]");}}, this results in... > {code:java} > Exception in thread "main" java.lang.NullPointerException > at org.apache.geode.distributed.internal.membership.gms.GMSUtil.parseLocators(GMSUtil.java:91) > at org.apache.geode.distributed.internal.membership.gms.locator.GMSLocator.(GMSLocator.java:109) > at org.apache.geode.distributed.internal.membership.gms.GMSMemberFactory.newLocatorHandler(GMSMemberFactory.java:125) > at org.apache.geode.distributed.internal.membership.MemberFactory.newLocatorHandler(MemberFactory.java:100) > at org.apache.geode.distributed.internal.InternalLocator.startPeerLocation(InternalLocator.java:537) > at org.apache.geode.distributed.internal.InternalDistributedSystem.startInitLocator(InternalDistributedSystem.java:867) > at org.apache.geode.distributed.internal.InternalDistributedSystem.initialize(InternalDistributedSystem.java:749) > at org.apache.geode.distributed.internal.InternalDistributedSystem.newInstance(InternalDistributedSystem.java:355) > at org.apache.geode.distributed.internal.InternalDistributedSystem.newInstance(InternalDistributedSystem.java:343) > at org.apache.geode.distributed.internal.InternalDistributedSystem.newInstance(InternalDistributedSystem.java:335) > at org.apache.geode.distributed.DistributedSystem.connect(DistributedSystem.java:211) > at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:219) > at example.tests.geode.SessionGeodeServer.gemfireCache(SessionGeodeServer.java:70) > at example.tests.geode.SessionGeodeServer.main(SessionGeodeServer.java:52) > {code} > Even worse, if I had not set my {{log-level}} to at least "warn" (e.g. suppose I set the {{log-level}} to "error") I would possibly never have seen these warning messages... > {code:java} > [warn 2018/12/06 10:14:34.365 PST
tid=0x1] Unknown locator host: loclhost > [warn 2018/12/06 10:14:34.367 PST
tid=0x1] Unknown locator host: loclhost > {code} -- This message was sent by Atlassian Jira (v8.3.2#803003)