[MAGNOLIA-4466] Print proper error message in case of incorrect host name configuration Created: 03/Jul/12 Updated: 11/Oct/13 Resolved: 12/Sep/12 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 4.5.3 |
| Fix Version/s: | 4.5.5 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Claus Nielsen | Assignee: | Jaroslav Simak |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | installation | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Tomcat 7.0.26 on OpenJDK 1.6.0_24-b24 on Ubuntu 12.04 on Amazon EC2. |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| 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 |
|
I'm trying to install magnolia for the first time. I get this in the localhost log file: see attached stacktrace1.txt On a 2nd attempt, trying to start the app from Tomcat manager, I got this similar, but slightly longer, stacktrace: |
| Comments |
| Comment by Ondrej Chytil [ 03/Jul/12 ] |
|
Hi Claus, I'm unable to reproduce this issue with Tomcat 7 and Magnolia 4.5.3. Are you sure you deployed war file correctly? Please see http://documentation.magnolia-cms.com/administration/installation/war/tomcat.html. |
| Comment by Claus Nielsen [ 03/Jul/12 ] |
|
Yes. |
| Comment by Jan Haderka [ 03/Jul/12 ] |
|
the line that fails is the one trying to resolve server name in order to find out configuration specific to that server: System.setProperty("server", platform.getComponent(MagnoliaInitPaths.class).getServerName()); Documentation for 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").
*
* <pre>
* <context-param>
* <param-name>magnolia.unqualified.server.name</param-name>
* <param-value>true</param-value>
* </context-param>
* </pre>
*/
@Override
public String getServerName() {
return serverName;
}
so I would presume that your server security configuration forces java to return null from this call and you using default war file means you don't have optional context parameter mentioned in the javadoc configured either. If you fix your server config or Magnolia configuration, all should be fine. But I agree that there should be nicer error message printed out in case of such issue then NPE. |
| Comment by Claus Nielsen [ 03/Jul/12 ] |
|
Ahhh... |
| Comment by Jan Haderka [ 03/Jul/12 ] |
|
Thx for confirming the analysis. |