From 32a2fc80fee4243af5572362b15f3e9e0a12df0f Mon Sep 17 00:00:00 2001 From: Caitlin Date: Mon, 18 Nov 2024 20:02:51 -0500 Subject: [PATCH 1/3] add more verbose error message --- improv/nexus.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/improv/nexus.py b/improv/nexus.py index b5fe19c4..e6d43cc8 100644 --- a/improv/nexus.py +++ b/improv/nexus.py @@ -716,7 +716,12 @@ def _startStoreInterface(self, size, attempts=20): self.p_StoreInterface = self.start_redis(size) time.sleep(3) if self.p_StoreInterface.poll(): - logger.error("Could not start Redis on specified port number.") + logger.error( + "Could not start Redis on specified port number. The port {} may already be in use.\n" + "Try running `sudo systemctl stop redis' to fix the issue".format( + self.store_port + ) + ) raise Exception("Could not start Redis on specified port.") else: logger.info("Redis port not specified. Searching for open port.") From d6b8e9ebcbd85e65e5b9906d897cfb750349475f Mon Sep 17 00:00:00 2001 From: Caitlin Date: Mon, 18 Nov 2024 20:11:42 -0500 Subject: [PATCH 2/3] add note to docs also --- docs/demos.ipynb | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/demos.ipynb b/docs/demos.ipynb index 6b5e9acc..527bfbf7 100644 --- a/docs/demos.ipynb +++ b/docs/demos.ipynb @@ -25,7 +25,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "\u001b[34mactors\u001b[m\u001b[m\n", + "\u001B[34mactors\u001B[m\u001B[m\n", "minimal.yaml\n", "minimal_spawn.yaml\n", "\n", @@ -93,6 +93,27 @@ " " ] }, + { + "metadata": {}, + "cell_type": "markdown", + "source": [ + "**Note:** If you attempt to run the minimal demo and receive the following error: \n", + "```bash\n", + "Unable to read server start time from global.log.\n", + "This may be because the server could not be started or did not log its activity.\n", + "```\n", + "\n", + "Try running the following to fix the issue:\n", + "```bash\n", + "sudo systemctl stop redis-server\n", + "```\n", + "\n", + "It may be the case (especially if you just installed redis) that redis is already up and running on the default port (6379), and therefore improv is unable to connect on that port. You can also check the status of redis by running: \n", + "```bash\n", + "sudo systemctl status redis-server\n", + "``` " + ] + }, { "cell_type": "markdown", "metadata": {}, From 83cd2b0ddf4a5715f2457cb0d9d58aaa82197ae4 Mon Sep 17 00:00:00 2001 From: Caitlin Date: Mon, 18 Nov 2024 20:17:55 -0500 Subject: [PATCH 3/3] flake8 compliance --- improv/nexus.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/improv/nexus.py b/improv/nexus.py index e6d43cc8..e1c97ecd 100644 --- a/improv/nexus.py +++ b/improv/nexus.py @@ -717,8 +717,9 @@ def _startStoreInterface(self, size, attempts=20): time.sleep(3) if self.p_StoreInterface.poll(): logger.error( - "Could not start Redis on specified port number. The port {} may already be in use.\n" - "Try running `sudo systemctl stop redis' to fix the issue".format( + "Could not start Redis on specified port number. " + "The port {} may already be in use.\n" + "Run `sudo systemctl stop redis' to help fix the issue.".format( self.store_port ) )