cancel
Showing results for 
Search instead for 
Did you mean: 

Help! Why won't my virtualization server work?!

dcdreamboat
Champ in-the-making
Champ in-the-making
I've installed Tomcat 5.5.23 on my Mac running Mac OS X 10.4.10.

It is located in the /Library/Tomcat directory and its server.xml configuration file is exactly this:

<Server port="8005" shutdown="<shutdown string>" debug="0">
  <Service name="Tomcat">
    <Connector
      port="80"
      protocol="HTTP/1.1"
      connectionTimeout="20000"
      redirectPort="8443" />

    <Engine
      name="tomcatEngine"
      debug="0"
      defaultHost="localhost">

      <Host
        name="localhost"
        appBase="/Library/Tomcat/webapps/"
        autodeploy="false"
        deployOnStartup="false"
        unpackWARs="false"
        deployXML="true"
        debug="0">

        <Context
          path=""
          docBase="ROOT"
          reloadable="false"
          debug="0"
        />
      </Host>
    </Engine>
  </Service>
</Server> 

As you can see, I'm running it on port 80. I would like to keep it like this for my own silly OCD computer programmer-like personal reasons.

I have installed Alfresco following these instructions:

1.  Login as root, and add this line to the /etc/bashrc file:

   export JAVA_OPTS="${JAVA_OPTS} -Xmx512m"

2.  Logout of root.

3.  Logout of the terminal.

4.  Open a new terminal window.

5.  Log in as root.

6.  Shut down the Tomcat application server by running this command:

   /Library/Tomcat/bin/shutdown.sh

7.  Extract the Alfresco 2.1 WAR Bundle to a folder on the desktop. This is the folder that files shall come from in steps 8 to 17.

8.  Copy the alfresco.war file to /Library/Tomcat/webapps

9.  Copy the contents of the /endorsed directory to the /Library/Tomcat/common/endorsed directory.

10.  Copy the contents of the /extensions directory to the /Library/Tomcat/shared/classes/alfresco/extension directory.

11. Delete the custom-repository.properties file in the /Library/Tomcat/shared/classes/alfresco/extension directory.

12. Rename the custom-repository.properties.sample file to custom-repository.properties in the /Library/Tomcat/shared/classes/alfresco/extension directory.

13. Ensure these entries are set in the custom-repository.properties file in the /Library/Tomcat/shared/classes/alfresco/extension directory.

   dir.root=/usr/local/pgsql/data
   db.username=postgres
   db.password=<password>
   db.pool.initial=10
   db.pool.max=100
   db.schema.update=true
   db.driver=org.postgresql.Driver
   db.url=jdbcSmiley Tongueostgresql://localhost:5432/ALFRESCO
   
14. Delete the custom-hibernate-dialect.properties file from the /Library/Tomcat/shared/classes/alfresco/extension directory.

15. Rename the custom-hibernate-dialect.properties.sample file to custom-hibernate-dialect.properties in the /Library/Tomcat/shared/classes/alfresco/extension directory.

16. Ensure these entries are set in the custom-hibernate-dialect.properties file in the /Library/Tomcat/shared/classes/alfresco/extension directory.

   hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
   hibernate.query.substitutions=true TRUE, false FALSE

17. Copy the postgresql-8.2-505.jdbc3.jar into /Library/Tomcat/common/lib

18. Log in as postgres and start the PostgreSQL database:
   pg_ctl -D /usr/local/pgsql/data start

19. As postgres, run the command:
   createdb –encoding=UTF8 ALFRESCO

20. Log out of postgres, and log in as root.

21. Start up the Tomcat application server by running this command:

/Library/Tomcat/bin/startup.sh

22. Wait about 5 minutes and go to http://localhost/alfresco to confirm the Alfresco portal system is working.

23. Extract the Alfresco WCM Bundle to a folder on the desktop. This is the folder that files shall come from in steps 24 to 26.

24. Copy the wcm-bootstrap-context.xml file to the /Library/Tomcat/shared/classes/alfresco/extension directory

25. Copy the virtual-tomcat directory to the /Library directory.

26. Edit the /Library/virtual-tomcat/conf/server.xml file to the following:

   <Server port="8105" shutdown="<shutdown string>" debug="0">
     <Service name="Virtual-Tomcat">
       <Connector
         port="8180"
         protocol="HTTP/1.1"
         connectionTimeout="20000"
         redirectPort="8543" />

       <Engine
         name="tomcatEngine"
         debug="0"
         defaultHost="localhost">

         <Host
           name="localhost"
           appBase="/Library/Virtual-Tomcat/webapps/"
           autodeploy="false"
           deployOnStartup="false"
           unpackWARs="false"
           deployXML="true"
           debug="0">

           <Context
             path=""
             docBase="ROOT"
             reloadable="false"
             debug="0"
           />
         </Host>
       </Engine>
     </Service>
   </Server>   


27. Shut down the Tomcat application server with the command:
   /Library/Tomcat/bin/shutdown.sh

28. Start up the Tomcat application server with the command:
   /Library/Tomcat/bin/startup.sh

29. Ensure that this is the output when you run /Library/Tomcat/bin/startup.sh
   
   Using CATALINA_BASE:   /Library/Tomcat
   Using CATALINA_HOME:   /Library/Tomcat
   Using CATALINA_TMPDIR: /Library/Tomcat/temp
   Using JRE_HOME:       /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home

30. Start up Alfresco's Virtual-Tomcat application server with the command:
   /Library/virtual-tomcat/bin/startup.sh

31. Ensure that this is the output when you run /Library/virtual-tomcat/bin/startup.sh

   Using CATALINA_BASE:   /Library/virtual-tomcat
   Using CATALINA_HOME:   /Library/virtual-tomcat
   Using CATALINA_TMPDIR: /Library/virtual-tomcat/temp
   Using JRE_HOME:       /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home

32. Ensure that PostgreSQL and the two instances of Tomcat are running by confirming lines similar to these when you run "ps -a":

    246  p1- S      0:01.04 /usr/local/bin/postgres -D /usr/local/pgsql/data
   3417  p1  S      0:19.69 /System/Library/Frameworks/JavaVM.framework/Versions/
   3443  p1  S      0:01.23 /System/Library/Frameworks/JavaVM.framework/Versions/
   
33. Go to http://localhost:8180 and confirm the the Alfresco Virtual-Tomcat is running. The default page should show up.



The Alfresco system works, but I can't preview pages. I also cannot confirm that step 33 works. I created these instructions on my own, by the way, and they work up to step 32.

Two questions:

( Question 1)

Why can't I see Alfresco's Virtual Tomcat default page at http://localhost:8180? I get this error:

HTTP Status 404 - /

type Status report

message /

description The requested resource (/) is not available.

Apache Tomcat/5.5.23



( Question 2)

Why can't I get the WCM example to work with my running virtualization server in step 11 of "Importing the sample web site" on page 77 ( 83 ) of the Alfresco 2 Getting Started Guide? I get this same error when I click "Preview Website" and it pops up a browser window with this URL:

( For http://testsite.www--sandbox.127-0-0-1.ip.alfrescodemo.net:8180/ )

HTTP Status 404 - /

type Status report

message /

description The requested resource (/) is not available.

Apache Tomcat/5.5.23



Thanks for all the help and congratulations on building an interesting product!

Sincerely,

Kevin Chand
President, CEO
Bravus Solutions Corporation
(703) 501-1505
kevinchand@bravussolutions.com
1 REPLY 1

dcdreamboat
Champ in-the-making
Champ in-the-making
Here is a fresh catalina.out file from my /Library/Virtual-Tomcat/logs directory when I start up the virtualization server:

Jul 26, 2007 8:52:54 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8180
Jul 26, 2007 8:52:54 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1275 ms
Jul 26, 2007 8:52:54 AM org.apache.catalina.core.StandardService start
INFO: Starting service Virtual-Tomcat
Jul 26, 2007 8:52:54 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
Jul 26, 2007 8:52:54 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 26, 2007 8:52:55 AM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter alfrecoCacheControlFilter
java.lang.NullPointerException
   at org.alfresco.filter.CacheControlFilter.Init(CacheControlFilter.java:144)
   at org.alfresco.filter.CacheControlFilter.init(CacheControlFilter.java:110)
   at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
   at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
   at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
   at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jul 26, 2007 8:52:55 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jul 26, 2007 8:52:55 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
Jul 26, 2007 8:52:55 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8180
Jul 26, 2007 8:52:55 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1466 ms


What's with this line?

SEVERE: Exception starting filter alfrecoCacheControlFilter
java.lang.NullPointerException

Could this be why I can't get http://localhost:8180 ( the virtualization server default URL ) to work?

Please help!

Thanks!

Kevin Chand
President, CEO
Bravus Solutions Corporation
(703) 501-1505
kevinchand@bravussolutions.com