[MAGNOLIA-3659] info.magnolia.cms.servlets.MgnlServletContextListener#initServername should not ignore UnknownHostException Created: 15/Apr/11  Updated: 19/Dec/16  Resolved: 04/Nov/15

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.4.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Magnolia International Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

If it does, it returns null, which results in a NullPointerException when attempting to store that value in the properties just a few lines below. We should either make sure we don't try to push null in there... or simply let the exception bubble up, because this doesn't sound like a sane network configuration...

Additionally, log.error(e.getMessage()); is not explicit, since it just logs the hostname.



 Comments   
Comment by hoempf [ 17/Nov/11 ]

This happens when the hostname can't be resolved to an IP address via the hosts file or DNS.

IMO, this should not really matter to whether Magnolia starts or not, since IP addresses are just an endpoint identifier on a specific type of network (IP networks in this case) and are subject to change (i.e. IPv4 --> IPv6) or co-exist with other types (i.e. dual-stack hosts). In some environments there may be no DNS at all.

I suggest to simply use the loopback address (::1 for IPv6 or 127.0.0.1 for IPv4) if no hostname could be found and if an "IP address to hostname" mapping of some sort is mandatory.

Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Generated at Mon Feb 12 03:48:28 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.