[MAGNOLIA-4486] fails to launch with tomcat bundle and unresolvable hostname Created: 20/Jul/12  Updated: 11/Oct/13  Resolved: 23/Jul/12

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

Type: Bug Priority: Neutral
Reporter: David Assignee: Unassigned
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

centos 6, oracle java 7 running inside virtualbox


Attachments: File catalina.out    
Issue Links:
Relates
relates to MAGNOLIA-5379 NullPointerException when server name... Closed
relation
is related to MAGNOLIA-4466 Print proper error message in case of... Closed
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   

launch it via ./magnolia_control.sh start
then it fails to startup with a null pointer exception (see the attached catalina.out logfile).
btw, i had no problems with this at work.



 Comments   
Comment by David [ 20/Jul/12 ]

being unable to resolve it's own hostname, that's most likely causing the null pointer exception.

$ ping mango-centos
ping: unknown host mango-centos

then i made a host alias in /etc/hosts, so it points to 127.0.0.1

$ ping mango-centos
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.034 ms
^C

then it started up just fine.

Comment by Ondrej Chytil [ 23/Jul/12 ]

Javadoc of info.magnolia.init.DefaultMagnoliaInitPaths.getServerName() says:

The server name is resolved to the full name obtained by using InetAddress.getLocalHost().getHostName(), which may also
contain the server domain, depending on your server configuration/operating system. You can set the optional context parameter
"magnolia.unqualified.server.name" to true if you prefer using the unqualified name (the server "server.domain.com" will be simply
resolved as "server").

so you can either fix your configuration as you already did or add the mentioned optional parameter.

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