[jira] [Commented] (GEODE-3038) A server process shuts down quietly when path to cache.xml is incorrect
[ https://issues.apache.org/jira/browse/GEODE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16267869#comment-16267869 ] ASF subversion and git services commented on GEODE-3038: Commit 0d5d2cbadc50c5ec5d43889fc65eb8622a7f742e in geode's branch refs/heads/feature/GEODE-3781 from [~agingade] [ https://gitbox.apache.org/repos/asf?p=geode.git;h=0d5d2cb ] GEODE-3038 Fix suspect string found in logs during test run > A server process shuts down quietly when path to cache.xml is incorrect > --- > > Key: GEODE-3038 > URL: https://issues.apache.org/jira/browse/GEODE-3038 > Project: Geode > Issue Type: Bug > Components: configuration >Reporter: Anton Mironenko >Priority: Minor > Fix For: 1.4.0 > > > Geode version: 1.1.1, 1.3.0 (latest develop snapshot) > If I start a server with incorrect path to Server.xml, it shuts down quietly > without any message in the log. > An expected behavior would be the error message "Server.xml not found in the > path [...], shutting down" > Here are the steps to reproduce, please use GEODE-3003 for zip files. > Test preparation: > - > Here are two attached zip files - "geode-host1.zip" and "geode-host2.zip" > 1) unzip "geode-host1.zip" into some folder on your first host > 2) in start-locator.sh change the IPs of locators to the values of your host1 > and host2 > "--locators=10.50.3.38[20236],10.50.3.14[20236]" > 3) in start-server.sh > "locators=10.50.3.38[20236],10.50.3.14[20236]" change the IPs of locators to > the values of your host1 and host2 > 4) do the bullets 1)-4) for host2, the folder where you unzip the file should > be the same as on the first host > Test running: > --- > 0) change start-server.sh so that the path to Server.xml is wrong > cache-xml-file=$SERVERXML_DIR/Server.xml > -> > cache-xml-file=$SERVERXML_DIR/Server_.xml > 1) run ./start-locator.sh on host1 > 2) after some pause run ./start-server > 3) observe the server started and immediately stopped, > 4) observe in the server logs, server1/cacheserver.log: > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Received > cluster configuration from the locator > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] > *** > Configuration for 'cluster' > > Jar files to deployed > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Requesting > cluster configuration > [info 2017/06/06 18:32:05.143 MSK host1-server-1 tid=0x1] Got response > with jars: > [info 2017/06/06 18:32:05.209 MSK host1-server-1 tid=0x1] Initializing > region _monitoringRegion_10.50.3.381025 > [info 2017/06/06 18:32:05.222 MSK host1-server-1 tid=0x1] Region > _monitoringRegion_10.50.3.381025 requesting initial image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024 > [info 2017/06/06 18:32:05.227 MSK host1-server-1 tid=0x1] > _monitoringRegion_10.50.3.381025 is done getting image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024. isDeltaGII is > false > [info 2017/06/06 18:32:05.228 MSK host1-server-1 tid=0x1] > Initialization of region _monitoringRegion_10.50.3.381025 completed > [info 2017/06/06 18:32:05.812 MSK host1-server-1 tid=0x1] > GemFireCache[id = 2117642238; isClosing = true; isShutDownAll = false; > created = Tue Jun 06 18:32:05 MSK 2017; server = false; copyOnRead = false; > lockLease = 120; lockTimeout = 60]: Now closing. > [info 2017/06/06 18:32:05.855 MSK host1-server-1 tid=0x1] Shutting > down DistributionManager 10.50.3.38(host1-server-1:27773):1025. > [info 2017/06/06 18:32:05.961 MSK host1-server-1 tid=0x1] Now closing > distribution for 10.50.3.38(host1-server-1:27773):1025 > [info 2017/06/06 18:32:05.962 MSK host1-server-1 tid=0x1] Stopping > membership services > [info 2017/06/06 18:32:05.964 MSK host1-server-1 Server thread 0> tid=0x1d] GMSHealthMonitor server thread exiting > [info 2017/06/06 18:32:05.964 MSK host1-server-1 tid=0x1] > GMSHealthMonitor server socket is closed in stopServices(). > [info 2017/06/06 18:32:05.968 MSK host1-server-1 tid=0x1] > GMSHealthMonitor serverSocketExecutor is terminated > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] > DistributionManager stopped in 119ms. > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] Marking > DistributionManager 10.50.3.38(host1-server-1:27773):1025 as closed. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (GEODE-3038) A server process shuts down quietly when path to cache.xml is incorrect
[ https://issues.apache.org/jira/browse/GEODE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16263393#comment-16263393 ] ASF subversion and git services commented on GEODE-3038: Commit 0d5d2cbadc50c5ec5d43889fc65eb8622a7f742e in geode's branch refs/heads/develop from [~agingade] [ https://gitbox.apache.org/repos/asf?p=geode.git;h=0d5d2cb ] GEODE-3038 Fix suspect string found in logs during test run > A server process shuts down quietly when path to cache.xml is incorrect > --- > > Key: GEODE-3038 > URL: https://issues.apache.org/jira/browse/GEODE-3038 > Project: Geode > Issue Type: Bug > Components: configuration >Reporter: Anton Mironenko >Priority: Minor > Fix For: 1.4.0 > > > Geode version: 1.1.1, 1.3.0 (latest develop snapshot) > If I start a server with incorrect path to Server.xml, it shuts down quietly > without any message in the log. > An expected behavior would be the error message "Server.xml not found in the > path [...], shutting down" > Here are the steps to reproduce, please use GEODE-3003 for zip files. > Test preparation: > - > Here are two attached zip files - "geode-host1.zip" and "geode-host2.zip" > 1) unzip "geode-host1.zip" into some folder on your first host > 2) in start-locator.sh change the IPs of locators to the values of your host1 > and host2 > "--locators=10.50.3.38[20236],10.50.3.14[20236]" > 3) in start-server.sh > "locators=10.50.3.38[20236],10.50.3.14[20236]" change the IPs of locators to > the values of your host1 and host2 > 4) do the bullets 1)-4) for host2, the folder where you unzip the file should > be the same as on the first host > Test running: > --- > 0) change start-server.sh so that the path to Server.xml is wrong > cache-xml-file=$SERVERXML_DIR/Server.xml > -> > cache-xml-file=$SERVERXML_DIR/Server_.xml > 1) run ./start-locator.sh on host1 > 2) after some pause run ./start-server > 3) observe the server started and immediately stopped, > 4) observe in the server logs, server1/cacheserver.log: > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Received > cluster configuration from the locator > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] > *** > Configuration for 'cluster' > > Jar files to deployed > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Requesting > cluster configuration > [info 2017/06/06 18:32:05.143 MSK host1-server-1 tid=0x1] Got response > with jars: > [info 2017/06/06 18:32:05.209 MSK host1-server-1 tid=0x1] Initializing > region _monitoringRegion_10.50.3.381025 > [info 2017/06/06 18:32:05.222 MSK host1-server-1 tid=0x1] Region > _monitoringRegion_10.50.3.381025 requesting initial image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024 > [info 2017/06/06 18:32:05.227 MSK host1-server-1 tid=0x1] > _monitoringRegion_10.50.3.381025 is done getting image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024. isDeltaGII is > false > [info 2017/06/06 18:32:05.228 MSK host1-server-1 tid=0x1] > Initialization of region _monitoringRegion_10.50.3.381025 completed > [info 2017/06/06 18:32:05.812 MSK host1-server-1 tid=0x1] > GemFireCache[id = 2117642238; isClosing = true; isShutDownAll = false; > created = Tue Jun 06 18:32:05 MSK 2017; server = false; copyOnRead = false; > lockLease = 120; lockTimeout = 60]: Now closing. > [info 2017/06/06 18:32:05.855 MSK host1-server-1 tid=0x1] Shutting > down DistributionManager 10.50.3.38(host1-server-1:27773):1025. > [info 2017/06/06 18:32:05.961 MSK host1-server-1 tid=0x1] Now closing > distribution for 10.50.3.38(host1-server-1:27773):1025 > [info 2017/06/06 18:32:05.962 MSK host1-server-1 tid=0x1] Stopping > membership services > [info 2017/06/06 18:32:05.964 MSK host1-server-1 Server thread 0> tid=0x1d] GMSHealthMonitor server thread exiting > [info 2017/06/06 18:32:05.964 MSK host1-server-1 tid=0x1] > GMSHealthMonitor server socket is closed in stopServices(). > [info 2017/06/06 18:32:05.968 MSK host1-server-1 tid=0x1] > GMSHealthMonitor serverSocketExecutor is terminated > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] > DistributionManager stopped in 119ms. > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] Marking > DistributionManager 10.50.3.38(host1-server-1:27773):1025 as closed. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (GEODE-3038) A server process shuts down quietly when path to cache.xml is incorrect
[ https://issues.apache.org/jira/browse/GEODE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16261700#comment-16261700 ] ASF subversion and git services commented on GEODE-3038: Commit f429e9a7eb5bad1ddb2b5eca81228887d87028b3 in geode's branch refs/heads/develop from [~Neighbour] [ https://gitbox.apache.org/repos/asf?p=geode.git;h=f429e9a ] GEODE-3038: A server process shuts down quietly when path to cache.xml is incorrect (#677) Exception is thrown and logged when cache.xml is not found during cache creation > A server process shuts down quietly when path to cache.xml is incorrect > --- > > Key: GEODE-3038 > URL: https://issues.apache.org/jira/browse/GEODE-3038 > Project: Geode > Issue Type: Bug > Components: configuration >Reporter: Anton Mironenko >Priority: Minor > > Geode version: 1.1.1, 1.3.0 (latest develop snapshot) > If I start a server with incorrect path to Server.xml, it shuts down quietly > without any message in the log. > An expected behavior would be the error message "Server.xml not found in the > path [...], shutting down" > Here are the steps to reproduce, please use GEODE-3003 for zip files. > Test preparation: > - > Here are two attached zip files - "geode-host1.zip" and "geode-host2.zip" > 1) unzip "geode-host1.zip" into some folder on your first host > 2) in start-locator.sh change the IPs of locators to the values of your host1 > and host2 > "--locators=10.50.3.38[20236],10.50.3.14[20236]" > 3) in start-server.sh > "locators=10.50.3.38[20236],10.50.3.14[20236]" change the IPs of locators to > the values of your host1 and host2 > 4) do the bullets 1)-4) for host2, the folder where you unzip the file should > be the same as on the first host > Test running: > --- > 0) change start-server.sh so that the path to Server.xml is wrong > cache-xml-file=$SERVERXML_DIR/Server.xml > -> > cache-xml-file=$SERVERXML_DIR/Server_.xml > 1) run ./start-locator.sh on host1 > 2) after some pause run ./start-server > 3) observe the server started and immediately stopped, > 4) observe in the server logs, server1/cacheserver.log: > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Received > cluster configuration from the locator > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] > *** > Configuration for 'cluster' > > Jar files to deployed > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Requesting > cluster configuration > [info 2017/06/06 18:32:05.143 MSK host1-server-1 tid=0x1] Got response > with jars: > [info 2017/06/06 18:32:05.209 MSK host1-server-1 tid=0x1] Initializing > region _monitoringRegion_10.50.3.381025 > [info 2017/06/06 18:32:05.222 MSK host1-server-1 tid=0x1] Region > _monitoringRegion_10.50.3.381025 requesting initial image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024 > [info 2017/06/06 18:32:05.227 MSK host1-server-1 tid=0x1] > _monitoringRegion_10.50.3.381025 is done getting image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024. isDeltaGII is > false > [info 2017/06/06 18:32:05.228 MSK host1-server-1 tid=0x1] > Initialization of region _monitoringRegion_10.50.3.381025 completed > [info 2017/06/06 18:32:05.812 MSK host1-server-1 tid=0x1] > GemFireCache[id = 2117642238; isClosing = true; isShutDownAll = false; > created = Tue Jun 06 18:32:05 MSK 2017; server = false; copyOnRead = false; > lockLease = 120; lockTimeout = 60]: Now closing. > [info 2017/06/06 18:32:05.855 MSK host1-server-1 tid=0x1] Shutting > down DistributionManager 10.50.3.38(host1-server-1:27773):1025. > [info 2017/06/06 18:32:05.961 MSK host1-server-1 tid=0x1] Now closing > distribution for 10.50.3.38(host1-server-1:27773):1025 > [info 2017/06/06 18:32:05.962 MSK host1-server-1 tid=0x1] Stopping > membership services > [info 2017/06/06 18:32:05.964 MSK host1-server-1 Server thread 0> tid=0x1d] GMSHealthMonitor server thread exiting > [info 2017/06/06 18:32:05.964 MSK host1-server-1 tid=0x1] > GMSHealthMonitor server socket is closed in stopServices(). > [info 2017/06/06 18:32:05.968 MSK host1-server-1 tid=0x1] > GMSHealthMonitor serverSocketExecutor is terminated > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] > DistributionManager stopped in 119ms. > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] Marking > DistributionManager 10.50.3.38(host1-server-1:27773):1025 as closed. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (GEODE-3038) A server process shuts down quietly when path to cache.xml is incorrect
[ https://issues.apache.org/jira/browse/GEODE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16261699#comment-16261699 ] ASF GitHub Bot commented on GEODE-3038: --- agingade closed pull request #677: GEODE-3038: A server process shuts down quietly when path to cache.xml is incorrect URL: https://github.com/apache/geode/pull/677 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java index f176d22065..89d8b467c5 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java @@ -1208,6 +1208,9 @@ private void initialize() { this.system.getConfig()); initializeDeclarativeCache(); completedCacheXml = true; +} catch (RuntimeException e) { + logger.error("Cache initialization failed because: " + e.toString()); // fix GEODE-3038 + throw e; } finally { if (!completedCacheXml) { // so initializeDeclarativeCache threw an exception diff --git a/geode-core/src/test/java/org/apache/geode/cache30/CacheXmlNotFoundRegressionTest.java b/geode-core/src/test/java/org/apache/geode/cache30/CacheXmlNotFoundRegressionTest.java new file mode 100644 index 00..dc0d26a977 --- /dev/null +++ b/geode-core/src/test/java/org/apache/geode/cache30/CacheXmlNotFoundRegressionTest.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.cache30; + +import org.apache.geode.cache.CacheFactory; +import org.apache.geode.cache.CacheXmlException; +import org.apache.geode.distributed.ConfigurationProperties; +import org.apache.geode.test.junit.categories.IntegrationTest; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import java.io.File; +import java.util.Properties; +import java.util.Scanner; + +import static junit.framework.TestCase.assertTrue; +import static org.junit.Assert.fail; + +@Category(IntegrationTest.class) +public class CacheXmlNotFoundRegressionTest { + + /** + * unit test for https://issues.apache.org/jira/browse/GEODE-3038;>GEODE-3038 Tests + * that an error about missing cache-xml file is indeed printed in the text log file. The test + * {@link CacheXml66DUnitTest#testNonExistentFile()} is supposed to test the same, but is not + * enough. It only checks for an CacheXmlException exception to be thrown. Also in that test a log + * is printed into STDOUT, and we do see our error there, but that is not the case when we work + * with the real text log, specified via "log-file" param. + */ + @Test + public void testCacheXmlNotFoundInRealLog() throws Exception { + +String CACHE_SERVER_LOG = "cacheXmlNotFoundUnitTest.log"; +Properties props = new Properties(); +props.put(ConfigurationProperties.MCAST_PORT, "0"); +props.put(ConfigurationProperties.LOG_FILE, CACHE_SERVER_LOG); +props.put(ConfigurationProperties.CACHE_XML_FILE, "non-existing-cache-xml"); + +CacheFactory factory = new CacheFactory(props); + +String errorMessage = ""; + +try { + factory.create(); + fail("Should have thrown a CacheXmlException"); +} catch (CacheXmlException e) { + errorMessage = e.toString(); +} + +// looking for an error in the text log file +Scanner scanner = new Scanner(new File(CACHE_SERVER_LOG)); + +boolean found = false; +while (scanner.hasNextLine() && !found) { + found = scanner.nextLine().contains(errorMessage); +} +scanner.close(); +assertTrue("there should be a line about cache-xml-not-found in a log file", found); + +// deleting a log file +File logFile = new File(CACHE_SERVER_LOG); +logFile.delete(); + } +}
[jira] [Commented] (GEODE-3038) A server process shuts down quietly when path to cache.xml is incorrect
[ https://issues.apache.org/jira/browse/GEODE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16145699#comment-16145699 ] ASF GitHub Bot commented on GEODE-3038: --- Github user anton-mironenko commented on the issue: https://github.com/apache/geode/pull/677 Well, this test category is DistributedTest, not Test. This is why I didn't see it in regular unit tests run. Now the question is - why this test doesn't fail, whereas it should fail without my fix. > A server process shuts down quietly when path to cache.xml is incorrect > --- > > Key: GEODE-3038 > URL: https://issues.apache.org/jira/browse/GEODE-3038 > Project: Geode > Issue Type: Bug > Components: configuration >Reporter: Anton Mironenko >Assignee: Kirk Lund >Priority: Minor > > Geode version: 1.1.1, 1.3.0 (latest develop snapshot) > If I start a server with incorrect path to Server.xml, it shuts down quietly > without any message in the log. > An expected behavior would be the error message "Server.xml not found in the > path [...], shutting down" > Here are the steps to reproduce, please use GEODE-3003 for zip files. > Test preparation: > - > Here are two attached zip files - "geode-host1.zip" and "geode-host2.zip" > 1) unzip "geode-host1.zip" into some folder on your first host > 2) in start-locator.sh change the IPs of locators to the values of your host1 > and host2 > "--locators=10.50.3.38[20236],10.50.3.14[20236]" > 3) in start-server.sh > "locators=10.50.3.38[20236],10.50.3.14[20236]" change the IPs of locators to > the values of your host1 and host2 > 4) do the bullets 1)-4) for host2, the folder where you unzip the file should > be the same as on the first host > Test running: > --- > 0) change start-server.sh so that the path to Server.xml is wrong > cache-xml-file=$SERVERXML_DIR/Server.xml > -> > cache-xml-file=$SERVERXML_DIR/Server_.xml > 1) run ./start-locator.sh on host1 > 2) after some pause run ./start-server > 3) observe the server started and immediately stopped, > 4) observe in the server logs, server1/cacheserver.log: > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Received > cluster configuration from the locator > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] > *** > Configuration for 'cluster' > > Jar files to deployed > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Requesting > cluster configuration > [info 2017/06/06 18:32:05.143 MSK host1-server-1 tid=0x1] Got response > with jars: > [info 2017/06/06 18:32:05.209 MSK host1-server-1 tid=0x1] Initializing > region _monitoringRegion_10.50.3.381025 > [info 2017/06/06 18:32:05.222 MSK host1-server-1 tid=0x1] Region > _monitoringRegion_10.50.3.381025 requesting initial image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024 > [info 2017/06/06 18:32:05.227 MSK host1-server-1 tid=0x1] > _monitoringRegion_10.50.3.381025 is done getting image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024. isDeltaGII is > false > [info 2017/06/06 18:32:05.228 MSK host1-server-1 tid=0x1] > Initialization of region _monitoringRegion_10.50.3.381025 completed > [info 2017/06/06 18:32:05.812 MSK host1-server-1 tid=0x1] > GemFireCache[id = 2117642238; isClosing = true; isShutDownAll = false; > created = Tue Jun 06 18:32:05 MSK 2017; server = false; copyOnRead = false; > lockLease = 120; lockTimeout = 60]: Now closing. > [info 2017/06/06 18:32:05.855 MSK host1-server-1 tid=0x1] Shutting > down DistributionManager 10.50.3.38(host1-server-1:27773):1025. > [info 2017/06/06 18:32:05.961 MSK host1-server-1 tid=0x1] Now closing > distribution for 10.50.3.38(host1-server-1:27773):1025 > [info 2017/06/06 18:32:05.962 MSK host1-server-1 tid=0x1] Stopping > membership services > [info 2017/06/06 18:32:05.964 MSK host1-server-1 Server thread 0> tid=0x1d] GMSHealthMonitor server thread exiting > [info 2017/06/06 18:32:05.964 MSK host1-server-1 tid=0x1] > GMSHealthMonitor server socket is closed in stopServices(). > [info 2017/06/06 18:32:05.968 MSK host1-server-1 tid=0x1] > GMSHealthMonitor serverSocketExecutor is terminated > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] > DistributionManager stopped in 119ms. > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] Marking > DistributionManager 10.50.3.38(host1-server-1:27773):1025 as closed. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (GEODE-3038) A server process shuts down quietly when path to cache.xml is incorrect
[ https://issues.apache.org/jira/browse/GEODE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16145238#comment-16145238 ] ASF GitHub Bot commented on GEODE-3038: --- Github user anton-mironenko commented on the issue: https://github.com/apache/geode/pull/677 Actually there is already a test which tests exactly this bug: org.apache.geode.cache30.CacheXml66DUnitTest#testNonExistentFile But I see that all the package org.apache.geode.cache30 is not included now into unit tests run. What is the best way to start this test being executed? > A server process shuts down quietly when path to cache.xml is incorrect > --- > > Key: GEODE-3038 > URL: https://issues.apache.org/jira/browse/GEODE-3038 > Project: Geode > Issue Type: Bug > Components: configuration >Reporter: Anton Mironenko >Assignee: Kirk Lund >Priority: Minor > > Geode version: 1.1.1, 1.3.0 (latest develop snapshot) > If I start a server with incorrect path to Server.xml, it shuts down quietly > without any message in the log. > An expected behavior would be the error message "Server.xml not found in the > path [...], shutting down" > Here are the steps to reproduce, please use GEODE-3003 for zip files. > Test preparation: > - > Here are two attached zip files - "geode-host1.zip" and "geode-host2.zip" > 1) unzip "geode-host1.zip" into some folder on your first host > 2) in start-locator.sh change the IPs of locators to the values of your host1 > and host2 > "--locators=10.50.3.38[20236],10.50.3.14[20236]" > 3) in start-server.sh > "locators=10.50.3.38[20236],10.50.3.14[20236]" change the IPs of locators to > the values of your host1 and host2 > 4) do the bullets 1)-4) for host2, the folder where you unzip the file should > be the same as on the first host > Test running: > --- > 0) change start-server.sh so that the path to Server.xml is wrong > cache-xml-file=$SERVERXML_DIR/Server.xml > -> > cache-xml-file=$SERVERXML_DIR/Server_.xml > 1) run ./start-locator.sh on host1 > 2) after some pause run ./start-server > 3) observe the server started and immediately stopped, > 4) observe in the server logs, server1/cacheserver.log: > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Received > cluster configuration from the locator > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] > *** > Configuration for 'cluster' > > Jar files to deployed > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Requesting > cluster configuration > [info 2017/06/06 18:32:05.143 MSK host1-server-1 tid=0x1] Got response > with jars: > [info 2017/06/06 18:32:05.209 MSK host1-server-1 tid=0x1] Initializing > region _monitoringRegion_10.50.3.381025 > [info 2017/06/06 18:32:05.222 MSK host1-server-1 tid=0x1] Region > _monitoringRegion_10.50.3.381025 requesting initial image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024 > [info 2017/06/06 18:32:05.227 MSK host1-server-1 tid=0x1] > _monitoringRegion_10.50.3.381025 is done getting image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024. isDeltaGII is > false > [info 2017/06/06 18:32:05.228 MSK host1-server-1 tid=0x1] > Initialization of region _monitoringRegion_10.50.3.381025 completed > [info 2017/06/06 18:32:05.812 MSK host1-server-1 tid=0x1] > GemFireCache[id = 2117642238; isClosing = true; isShutDownAll = false; > created = Tue Jun 06 18:32:05 MSK 2017; server = false; copyOnRead = false; > lockLease = 120; lockTimeout = 60]: Now closing. > [info 2017/06/06 18:32:05.855 MSK host1-server-1 tid=0x1] Shutting > down DistributionManager 10.50.3.38(host1-server-1:27773):1025. > [info 2017/06/06 18:32:05.961 MSK host1-server-1 tid=0x1] Now closing > distribution for 10.50.3.38(host1-server-1:27773):1025 > [info 2017/06/06 18:32:05.962 MSK host1-server-1 tid=0x1] Stopping > membership services > [info 2017/06/06 18:32:05.964 MSK host1-server-1 Server thread 0> tid=0x1d] GMSHealthMonitor server thread exiting > [info 2017/06/06 18:32:05.964 MSK host1-server-1 tid=0x1] > GMSHealthMonitor server socket is closed in stopServices(). > [info 2017/06/06 18:32:05.968 MSK host1-server-1 tid=0x1] > GMSHealthMonitor serverSocketExecutor is terminated > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] > DistributionManager stopped in 119ms. > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] Marking > DistributionManager 10.50.3.38(host1-server-1:27773):1025 as closed. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (GEODE-3038) A server process shuts down quietly when path to cache.xml is incorrect
[ https://issues.apache.org/jira/browse/GEODE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16121523#comment-16121523 ] ASF GitHub Bot commented on GEODE-3038: --- Github user anton-mironenko commented on the issue: https://github.com/apache/geode/pull/677 Hello, is there anything I can do to proceed with this pull request? I was asked to put RuntimeException instead of CacheXmlException. This is what I did. This PR contains not-squashed commits, also this PR is done in the main stream "develop" in my forked repository on GitHub, instead of being done in the proper branch "GEODE-3038". May be these are the reasons, why my PR stuck? So I could create another PR with the only one squashed commit from the right branch. > A server process shuts down quietly when path to cache.xml is incorrect > --- > > Key: GEODE-3038 > URL: https://issues.apache.org/jira/browse/GEODE-3038 > Project: Geode > Issue Type: Bug > Components: configuration >Reporter: Anton Mironenko >Assignee: Kirk Lund >Priority: Minor > > Geode version: 1.1.1, 1.3.0 (latest develop snapshot) > If I start a server with incorrect path to Server.xml, it shuts down quietly > without any message in the log. > An expected behavior would be the error message "Server.xml not found in the > path [...], shutting down" > Here are the steps to reproduce, please use GEODE-3003 for zip files. > Test preparation: > - > Here are two attached zip files - "geode-host1.zip" and "geode-host2.zip" > 1) unzip "geode-host1.zip" into some folder on your first host > 2) in start-locator.sh change the IPs of locators to the values of your host1 > and host2 > "--locators=10.50.3.38[20236],10.50.3.14[20236]" > 3) in start-server.sh > "locators=10.50.3.38[20236],10.50.3.14[20236]" change the IPs of locators to > the values of your host1 and host2 > 4) do the bullets 1)-4) for host2, the folder where you unzip the file should > be the same as on the first host > Test running: > --- > 0) change start-server.sh so that the path to Server.xml is wrong > cache-xml-file=$SERVERXML_DIR/Server.xml > -> > cache-xml-file=$SERVERXML_DIR/Server_.xml > 1) run ./start-locator.sh on host1 > 2) after some pause run ./start-server > 3) observe the server started and immediately stopped, > 4) observe in the server logs, server1/cacheserver.log: > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Received > cluster configuration from the locator > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] > *** > Configuration for 'cluster' > > Jar files to deployed > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Requesting > cluster configuration > [info 2017/06/06 18:32:05.143 MSK host1-server-1 tid=0x1] Got response > with jars: > [info 2017/06/06 18:32:05.209 MSK host1-server-1 tid=0x1] Initializing > region _monitoringRegion_10.50.3.381025 > [info 2017/06/06 18:32:05.222 MSK host1-server-1 tid=0x1] Region > _monitoringRegion_10.50.3.381025 requesting initial image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024 > [info 2017/06/06 18:32:05.227 MSK host1-server-1 tid=0x1] > _monitoringRegion_10.50.3.381025 is done getting image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024. isDeltaGII is > false > [info 2017/06/06 18:32:05.228 MSK host1-server-1 tid=0x1] > Initialization of region _monitoringRegion_10.50.3.381025 completed > [info 2017/06/06 18:32:05.812 MSK host1-server-1 tid=0x1] > GemFireCache[id = 2117642238; isClosing = true; isShutDownAll = false; > created = Tue Jun 06 18:32:05 MSK 2017; server = false; copyOnRead = false; > lockLease = 120; lockTimeout = 60]: Now closing. > [info 2017/06/06 18:32:05.855 MSK host1-server-1 tid=0x1] Shutting > down DistributionManager 10.50.3.38(host1-server-1:27773):1025. > [info 2017/06/06 18:32:05.961 MSK host1-server-1 tid=0x1] Now closing > distribution for 10.50.3.38(host1-server-1:27773):1025 > [info 2017/06/06 18:32:05.962 MSK host1-server-1 tid=0x1] Stopping > membership services > [info 2017/06/06 18:32:05.964 MSK host1-server-1 Server thread 0> tid=0x1d] GMSHealthMonitor server thread exiting > [info 2017/06/06 18:32:05.964 MSK host1-server-1 tid=0x1] > GMSHealthMonitor server socket is closed in stopServices(). > [info 2017/06/06 18:32:05.968 MSK host1-server-1 tid=0x1] > GMSHealthMonitor serverSocketExecutor is terminated > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] > DistributionManager stopped in 119ms. > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] Marking > DistributionManager 10.50.3.38(host1-server-1:27773):1025 as closed. -- This message
[jira] [Commented] (GEODE-3038) A server process shuts down quietly when path to cache.xml is incorrect
[ https://issues.apache.org/jira/browse/GEODE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16112800#comment-16112800 ] ASF GitHub Bot commented on GEODE-3038: --- Github user anton-mironenko commented on a diff in the pull request: https://github.com/apache/geode/pull/677#discussion_r131154689 --- Diff: geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java --- @@ -1208,6 +1208,9 @@ private void initialize() { this.system.getConfig()); initializeDeclarativeCache(); completedCacheXml = true; +} catch (CacheXmlException e) { --- End diff -- @dschneider-pivotal Thank you for your feedback. I've replaced CacheXmlException with RuntimeException. Sorry for two duplicate commits instead of the only one. > A server process shuts down quietly when path to cache.xml is incorrect > --- > > Key: GEODE-3038 > URL: https://issues.apache.org/jira/browse/GEODE-3038 > Project: Geode > Issue Type: Bug > Components: configuration >Reporter: Anton Mironenko >Assignee: Kirk Lund >Priority: Minor > > Geode version: 1.1.1, 1.3.0 (latest develop snapshot) > If I start a server with incorrect path to Server.xml, it shuts down quietly > without any message in the log. > An expected behavior would be the error message "Server.xml not found in the > path [...], shutting down" > Here are the steps to reproduce, please use GEODE-3003 for zip files. > Test preparation: > - > Here are two attached zip files - "geode-host1.zip" and "geode-host2.zip" > 1) unzip "geode-host1.zip" into some folder on your first host > 2) in start-locator.sh change the IPs of locators to the values of your host1 > and host2 > "--locators=10.50.3.38[20236],10.50.3.14[20236]" > 3) in start-server.sh > "locators=10.50.3.38[20236],10.50.3.14[20236]" change the IPs of locators to > the values of your host1 and host2 > 4) do the bullets 1)-4) for host2, the folder where you unzip the file should > be the same as on the first host > Test running: > --- > 0) change start-server.sh so that the path to Server.xml is wrong > cache-xml-file=$SERVERXML_DIR/Server.xml > -> > cache-xml-file=$SERVERXML_DIR/Server_.xml > 1) run ./start-locator.sh on host1 > 2) after some pause run ./start-server > 3) observe the server started and immediately stopped, > 4) observe in the server logs, server1/cacheserver.log: > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Received > cluster configuration from the locator > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] > *** > Configuration for 'cluster' > > Jar files to deployed > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Requesting > cluster configuration > [info 2017/06/06 18:32:05.143 MSK host1-server-1 tid=0x1] Got response > with jars: > [info 2017/06/06 18:32:05.209 MSK host1-server-1 tid=0x1] Initializing > region _monitoringRegion_10.50.3.381025 > [info 2017/06/06 18:32:05.222 MSK host1-server-1 tid=0x1] Region > _monitoringRegion_10.50.3.381025 requesting initial image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024 > [info 2017/06/06 18:32:05.227 MSK host1-server-1 tid=0x1] > _monitoringRegion_10.50.3.381025 is done getting image from > 10.50.3.38(host1-locator-0-20236:27511:locator):1024. isDeltaGII is > false > [info 2017/06/06 18:32:05.228 MSK host1-server-1 tid=0x1] > Initialization of region _monitoringRegion_10.50.3.381025 completed > [info 2017/06/06 18:32:05.812 MSK host1-server-1 tid=0x1] > GemFireCache[id = 2117642238; isClosing = true; isShutDownAll = false; > created = Tue Jun 06 18:32:05 MSK 2017; server = false; copyOnRead = false; > lockLease = 120; lockTimeout = 60]: Now closing. > [info 2017/06/06 18:32:05.855 MSK host1-server-1 tid=0x1] Shutting > down DistributionManager 10.50.3.38(host1-server-1:27773):1025. > [info 2017/06/06 18:32:05.961 MSK host1-server-1 tid=0x1] Now closing > distribution for 10.50.3.38(host1-server-1:27773):1025 > [info 2017/06/06 18:32:05.962 MSK host1-server-1 tid=0x1] Stopping > membership services > [info 2017/06/06 18:32:05.964 MSK host1-server-1 Server thread 0> tid=0x1d] GMSHealthMonitor server thread exiting > [info 2017/06/06 18:32:05.964 MSK host1-server-1 tid=0x1] > GMSHealthMonitor server socket is closed in stopServices(). > [info 2017/06/06 18:32:05.968 MSK host1-server-1 tid=0x1] > GMSHealthMonitor serverSocketExecutor is terminated > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] > DistributionManager stopped in 119ms. > [info 2017/06/06 18:32:05.974 MSK host1-server-1 tid=0x1] Marking > DistributionManager
[jira] [Commented] (GEODE-3038) A server process shuts down quietly when path to cache.xml is incorrect
[ https://issues.apache.org/jira/browse/GEODE-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111032#comment-16111032 ] ASF GitHub Bot commented on GEODE-3038: --- GitHub user anton-mironenko opened a pull request: https://github.com/apache/geode/pull/677 GEODE-3038: A server process shuts down quietly when path to cache.xml is incorrect [GEODE-3038](https://issues.apache.org/jira/browse/GEODE-3038) The error "Declarative Cache XML file/resource \[path-to-cache-xml\] does not exist" is trying to be written into the log in GemFireCacheImpl.basicCreate(), after method GemFireCacheImpl.close() is called, so that writing into the log is already not available. Thank you for submitting a contribution to Apache Geode. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [x] Is your initial contribution a single, squashed commit? - [x] Does `gradlew build` run cleanly? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? ### Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to d...@geode.apache.org. You can merge this pull request into a Git repository by running: $ git pull https://github.com/anton-mironenko/geode develop Alternatively you can review and apply these changes as the patch at: https://github.com/apache/geode/pull/677.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #677 commit f119fb381d4212e8714d26f2388860206daa3d8a Author: Anton MironenkoDate: 2017-08-01T12:18:12Z write cachexml-not-found exception into the log in a proper place commit bf0b059035751b3d7cba82a145546edb7efce824 Author: Anton Mironenko Date: 2017-08-01T12:52:14Z Merge remote-tracking branch 'upstream/develop' into GEODE-3038 > A server process shuts down quietly when path to cache.xml is incorrect > --- > > Key: GEODE-3038 > URL: https://issues.apache.org/jira/browse/GEODE-3038 > Project: Geode > Issue Type: Bug > Components: configuration >Reporter: Anton Mironenko >Assignee: Kirk Lund >Priority: Minor > > Geode version: 1.1.1, 1.3.0 (latest develop snapshot) > If I start a server with incorrect path to Server.xml, it shuts down quietly > without any message in the log. > An expected behavior would be the error message "Server.xml not found in the > path [...], shutting down" > Here are the steps to reproduce, please use GEODE-3003 for zip files. > Test preparation: > - > Here are two attached zip files - "geode-host1.zip" and "geode-host2.zip" > 1) unzip "geode-host1.zip" into some folder on your first host > 2) in start-locator.sh change the IPs of locators to the values of your host1 > and host2 > "--locators=10.50.3.38[20236],10.50.3.14[20236]" > 3) in start-server.sh > "locators=10.50.3.38[20236],10.50.3.14[20236]" change the IPs of locators to > the values of your host1 and host2 > 4) do the bullets 1)-4) for host2, the folder where you unzip the file should > be the same as on the first host > Test running: > --- > 0) change start-server.sh so that the path to Server.xml is wrong > cache-xml-file=$SERVERXML_DIR/Server.xml > -> > cache-xml-file=$SERVERXML_DIR/Server_.xml > 1) run ./start-locator.sh on host1 > 2) after some pause run ./start-server > 3) observe the server started and immediately stopped, > 4) observe in the server logs, server1/cacheserver.log: > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Received > cluster configuration from the locator > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] > *** > Configuration for 'cluster' > > Jar files to deployed > [info 2017/06/06 18:32:05.141 MSK host1-server-1 tid=0x1] Requesting > cluster configuration > [info 2017/06/06 18:32:05.143 MSK host1-server-1 tid=0x1] Got response > with jars: > [info 2017/06/06 18:32:05.209 MSK host1-server-1 tid=0x1]