cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco runs fine unless I run as a Windows Service

dfarrow
Champ in-the-making
Champ in-the-making
I set up Alfresco Community Edition 3.2r2 on our Windows Server 2003 machine.  The Alfresco and Share apps run fine when I manually start the server (using the "Start Alfresco Server" shortcut in the "Start" menu).

Next, I installed Alfresco as a Windows Service using the command:


service.bat install Alfresco tomcat6 //US//Tomcat6 –JvmMs=128 –JvmMx=512 –JvmSs=96 ++JvmOptions "-XX:MaxPermSize=128m"


When I start this service, however, I can't see the Alfresco and Share apps.  When I go to the "Alfresco" app (http://myserver:8090/alfresco/), I see:


HTTP Status 404 -

type Status report
message
description The requested resource () is not available.



And when I go to the Share app (http://myserver:8090/share/page/site-index), I see:

exception

javax.servlet.ServletException: org.alfresco.error.AlfrescoRuntimeException: 02010002 Unable to retrieve object: site-index of type: page
   org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:146)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

org.alfresco.error.AlfrescoRuntimeException: 02010002 Unable to retrieve object: site-index of type: page
   org.alfresco.web.framework.ModelObjectManager.getObject(ModelObjectManager.java:140)
   org.alfresco.web.site.Model.getObject(Model.java:513)
   org.alfresco.web.site.Model.getPage(Model.java:165)
   org.alfresco.web.site.SlingshotPageMapper.executeMapper(SlingshotPageMapper.java:188)
   org.alfresco.web.site.AbstractPageMapper.execute(AbstractPageMapper.java:62)
   org.alfresco.web.site.DefaultRequestContextFactory.newInstance(DefaultRequestContextFactory.java:109)
   org.alfresco.web.site.FrameworkHelper.initRequestContext(FrameworkHelper.java:202)
   org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:142)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


Please advise.
1 REPLY 1

sselvan
Champ in-the-making
Champ in-the-making
Do you have a port other than 8080? If so, you are possible getting this problem.

At any case, solution this problem would be -

Go to <ALF_HOME>/tomcat/shared/classes/alfresco/web-extension/webscript-framework-config-custom.xml and uncomment the following and also fix the endpoint URLs -

       <config evaluator="string-compare" condition="Remote">
          <remote>

             <endpoint>
                <id>alfresco-noauth</id>
                <name>Alfresco - unauthenticated access</name>
                <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
                <connector-id>alfresco</connector-id>
                <endpoint-url>http://localhost:8081/alfresco/s</endpoint-url>
                <identity>none</identity>
             </endpoint>

             <endpoint>
                <id>alfresco</id>
                <name>Alfresco - user access</name>
                <description>Access to Alfresco Repository WebScripts that require user authentication</description>
                <connector-id>alfresco</connector-id>
                <endpoint-url>http://localhost:8081/alfresco/s</endpoint-url>
                <identity>user</identity>
             </endpoint>

             <endpoint>
                <id>alfresco-feed</id>
                <name>Alfresco Feed</name>
                <description>Alfresco Feed - supports basic HTTP authentication</description>
                <connector-id>http</connector-id>
                <endpoint-url>http://localhost:8081/alfresco/s</endpoint-url>
                <basic-auth>true</basic-auth>
                <identity>user</identity>
             </endpoint>
            
          </remote>
       </config>

By the way, if you don't have the file in web-extension directory, get it from WEB-INF/classes/alfresco directory.

Hope this helps!