Tomcat

From Sage CRM Knowledge Base

Tomcat fails to start, commons-daemon.2015-12-10.log shows:

[2015-12-11 08:18:45] [error] CreateJavaVM Failed

[2015-12-11 08:18:45] [error] Failed to start Java

[2015-12-11 08:18:45] [error] ServiceStart returned 4

The registry setting is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\CRMTomcat7\Parameters\Java and you need to change the JvmMx and JvmSs by half so they look like this.

JvmMx 0x00000200 (512)

JvmSs 0x00000400 (1024)

Ref: https://community.sagecrm.com/user_community/f/84/t/12540.aspx

  • confirmed as a working fix

Easiest option here is to re-install (actually select the upgrade option) a patch and this usually works.

Latest guide (7.3)

https://community.sagecrm.com/knowledgebase/w/onpremisekba/1074.632-17360-sage-crm-interactive-dashboard-support-guide.aspx#CommonErrors



  • below no longer applies to newer versions of CRM

Java versions later than

version 6 update 27

will cause issues (tomcat wont work and the report export might error out with "win 32 code 1 incorrect function")

use this too test the version of java on the machine

http://www.javatester.org/version.html


Troubleshooting:

1. Ensure parent paths is set to true for ASP

..details are being investigated still

ISAPI Rewriting

  • IIS 6 only seems to need the file mentioned in 1 below

1. Sage use a file called "....Sage\CRM\Services\IISUtils\CRMRewriter\ISAPI_Rewrite.dll" which is created by "Helicon" (http://www.isapirewrite.com/)

2. The rewriting rules are written in "....Sage\CRM\Services\IISUtils\CRMRewriter\CRM.Rewriter.rules"

3. Re-writing essentially maps urls such as "http://localhost/sdata/crm71sp2j/layout/-/$service/" to "http://localhost:10009/crm71j/..etc". So you can see that the port is 10009 and this is the port that TOMCAT is working through.

404's usually appear when the "RewriterModule" is missing from IIS

This should be added to IIS. To do this select the application (or main node) and select "Modules"

From there click "Add Managed Modules"

Set the name to be "RewriterModule"

and the type to be "ManagedFusion.Rewriter.RewriterModule, ManagedFusion.Rewriter"

Note that this should map the setting in the web.config file

<httpModules> <add name="RewriterModule" type="ManagedFusion.Rewriter.RewriterModule, ManagedFusion.Rewriter" /> </httpModules>

Do not check the "Invoke only for requests to ASP.Net applications or Managed handlers"



Useful articles:

http://aspnet.4guysfromrolla.com/articles/011404-1.aspx



Dashboard not working outside of intranet

The rewriter's probably trying to send the request to Tomcat to the external IP.

In v7.1, It will look something like this, for a static IP of 50.57.215.216:

Initial request:

 http:// 50.57.215.216/sdata/crmj/layout/-/$service/lockrecord?tableName=LPLayout&id=6010&SID=47373617139422&contextEntityId=-1&contextRecordId=-1

This is rewritten to:

 http:// 50.57.215.216:10009/crmj/layout/-/$service/lockrecord?tableName=LPLayout&id=6010&SID=47373617139422&contextEntityId=-1&contextRecordId=-1

The Tomcat port is unlikely to be accessible using the static IP. The usual way I'd suggest working around this is to use a fully-qualified name, and add an entry to the server's hosts file so that the FQDN will resolve to 127.0.0.1. I would not suggest opening the Tomcat port for requests using the static IP.


Ref: https://community.sagecrm.com/user_community/f/84/t/9983.aspx



Seen on 7.2

If you move installs you can get issues with the mail merge (dashboard might still work) if you dont have the same 'javapath' set in custom_sysparams

Sample code to fix this

 update custom_sysparams
   set parm_value='C:\Program Files (x86)\Sage\CRM\Services\JRE\jre7\bin\'
      where parm_name='javapath'

The error might be reported as

 com.sage.crm.web.exception.SageAsyncProcessException: Mailmerge generation failed
 Caused by: com.sage.crm.core.exception.SageEndpointException: java.io.IOException: Cannot run program

7.2b seems to need port 11009 (used to be 10009) to be open for external ips to get access to the dashboard