cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot start Alfresco after install

mjohngren
Champ in-the-making
Champ in-the-making
Hi, I have seen similar questions to mine on the forum but do not see a clear answer.

I have installed alfresco on linux and am running alfresco.sh and get the following response:

[root@sparkpress alfresco]# ./alfresco.sh start
Using CATALINA_BASE:   /opt/alfresco/tomcat
Using CATALINA_HOME:   /opt/alfresco/tomcat
Using CATALINA_TMPDIR: /opt/alfresco/tomcat/temp
Using JRE_HOME:       /usr/bin/java
[root@sparkpress alfresco]#
Alfresco does not start.

When I check catalina.out, I see only the following:

[root@sparkpress logs]# more catalina.out
/opt/alfresco/tomcat/bin/catalina.sh: line 273: /usr/bin/java/bin/java: Not a directory
Obviously this should just say /usr/bin/java, and I have set the JAVA_HOME variable properly:

[root@sparkpress alfresco]# echo $JAVA_HOME
/usr/bin/java

So I am not sure where the incorrect /usr/bin/java/bin/java is coming from.

Can anyone please help with this?  Thank you!
15 REPLIES 15

jboggs
Champ in-the-making
Champ in-the-making
In catalina.sh there should be a JAVA_OPTS line: to set the max heap size you need to input similar options as: -Xms256m -Xmx1024m first one being minimum and second being max with those values falling inline with your physical memory. The line for example when completed should look like the JAVA_OPTS below:

You will also want to increase the PermGen space as well:  -XX:MaxPermSize=128m

JAVA_OPTS="-server -Xms256m -Xmx1024m -Dsun.rmi.dgc.client.gcInterval=3600000 -XX:MaxPermSize=128m"

I would suggest upping your dedicated memory at the host, as it will be needed for Alfresco to perform much better if not be able to run at all. 512MB should be a minimum to run you OS and java/tomcat/alfresco well.

mjohngren
Champ in-the-making
Champ in-the-making
Thanks.  I've tried different combinations of values in JAVA_OPTS but still get some variation of these messages in catalina.out:
17:48:08,177 ERROR [alfresco.smb.protocol] Socket closed by remote client
17:53:31,820 ERROR [alfresco.smb.protocol] Socket closed by remote client
Error occurred during initialization of VM
Could not reserve enough space for code cache
One of the times it seemed to get all the way to "server startup" but then the "socket closed" errors happened and that was it.

Should I assume that Alfresco just can't run on only a 256MB-RAM server?  Or are there other places to tune this down?  I'm not running a production service here, just development and prototyping.  If I need to go up to 512MB or more, it's not worth the upcharge from the hosting company so I'll have to try a different route altogether.

Thanks again to everyone who offered assistance!

jboggs
Champ in-the-making
Champ in-the-making
Were you access to access Alfresco via its web interface?   http://hostname:8080/alfresco

If you're only getting smb errors in a remote hosted environment you should be alright unless cifs access is needed for development/production.

Alfresco will run on 256MB w/o swap depending on left over memory I've tested below on RHEL 5 but you will eventually run into performance issues with many users


[root@dhcp239-11 ~]# uname -a
Linux dhcp239-11 2.6.18-8.el5xen #1 SMP Fri Jan 26 14:42:21 EST 2007 i686 i686 i386 GNU/Linux
[root@dhcp239-11 ~]# fre*
             total       used       fre*     shared    buffers     cached
Mem:        262316     258972       3344          0        184       4508
-/+ buffers/cache:     254280       8036
Swap:            0          0          0


Can you attach more of the catalina.out?

mjohngren
Champ in-the-making
Champ in-the-making
OK, I'm an idiot - Alfresco is running! Smiley Surprisedops:

I am able to access the web client and now believe that the server has been running since the first time I ran alfresco.sh after changing JAVA_OPTS.  It was all those "Could not reserve enough space for code cache" errors that had me convinced it hadn't started successfully.  Also, I was expecting the command line to give me the "server startup in xxxx ms" message.  I've set this up in Windows, but this is my first try in Linux (as if you couldn't tell!)

Below is more of catalina.out - the first 3 lines are from BEFORE I changed JAVA_OPTS and then the rest is after.  After the first group of smb errors (also making me think it had failed), I began running alfresco.sh repeatedly with different JAVA_OPTS values.

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Jul 19, 2007 2:56:28 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 19, 2007 2:56:29 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1615 ms
Jul 19, 2007 2:56:29 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 19, 2007 2:56:29 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
Jul 19, 2007 2:56:29 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 19, 2007 2:56:30 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
14:56:50,032 ERROR [transform.magick.AbstractImageMagickContentTransformer]
ImageMagickContentTransformer not available: Failed to perform ImageMagick
transformation:
Execution result:
   os:         Linux
   command:    convert /opt/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformer_
init_source_23
379.gif  /opt/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_target_23
380.png
   succeeded:  false
   exit code:  1
   out:
   err:        Cannot run program "convert": java.io.IOException: error=12,
Cannot allocate memory
14:56:52,018 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI
registry - creating new one
14:56:53,733 WARN  [alfresco.util.OpenOfficeConnectionTester] A connection to
OpenOffice could not be established.
14:56:55,860 INFO  [domain.schema.SchemaBootstrap] Executing database script /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchemaCreate-org.hibernate.dialect.
HSQLDialect-23381.sql (Generated).
14:56:56,116 INFO  [domain.schema.SchemaBootstrap] Executing database script /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.
HSQLDialect-23382.sql (Copied from classpath:alfresco/dbscripts/create/2.0/org.
hibernate.dialect.HSQLDialect/
AlfrescoPostCreate-2.0-FKIndexes.sql).
14:56:56,137 INFO  [domain.schema.SchemaBootstrap] All executed statements
written to file /opt/alfresco/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-All_Statements
-23383.sql.
14:57:49,902 WARN  [repo.admin.ConfigurationChecker] The Alfresco 'dir.root'
property is set to a relative path './alf_data'.  'dir.root' should be
overridden to point to a specific folder.
14:57:49,902 INFO  [repo.admin.ConfigurationChecker] The Alfresco root data
directory ('dir.root') is: ./alf_data
14:57:49,931 INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
14:57:49,994 INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
14:57:55,062 ERROR [alfresco.smb.protocol] Failed to get local domain/workgroup
name, using default of WORKGROUP
14:57:55,063 ERROR [alfresco.smb.protocol] (This may be due to firewall
settings or incorrect <broadcast> setting)
14:57:55,212 ERROR [alfresco.ftp.protocol] FTP Socket error
java.net.BindException: Address already in use
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at java.net.ServerSocket.<init>(ServerSocket.java:141)
        at org.alfresco.filesys.ftp.FTPNetworkServer.run(FTPNetworkServer.java:407)
        at java.lang.Thread.run(Thread.java:619)
14:57:55,358 INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_02-b05;
maximum heap size 126.625MB
14:57:55,442 WARN  [service.descriptor.DescriptorService] Alfresco JVM - WARNING -
maximum heap size 126.625MB is less than recommended 512MB
14:57:55,442 INFO  [service.descriptor.DescriptorService] Alfresco started (Community
Network): Current version 2.1.0 (R1 443) schema 62 - Installed version 2.1.0 (R1 443)
schema 62
Jul 19, 2007 2:57:58 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 19, 2007 2:57:58 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 19, 2007 2:57:58 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 89828 ms
15:08:07,516 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:08:09,056 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:08:09,743 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:23:40,263 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:25:15,297 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:28:37,456 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:38:23,225 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:42:52,671 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:43:15,501 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:43:16,331 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:43:17,380 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:52:09,640 ERROR [alfresco.smb.protocol] Socket closed by remote client
15:57:57,048 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:00:12,902 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:11:23,729 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:15:18,231 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:16:24,742 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:24:24,766 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:24:25,735 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:24:26,937 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:39:55,016 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:44:46,724 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:46:56,398 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:46:56,763 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:46:57,205 ERROR [alfresco.smb.protocol] Socket closed by remote client
16:47:02,178 ERROR [alfresco.smb.protocol] Socket closed by remote client
17:10:30,404 ERROR [alfresco.smb.protocol] Socket closed by remote client
Error occurred during initialization of VM
Could not reserve enough space for code cache
Error occurred during initialization of VM
Could not reserve enough space for code cache
17:15:35,375 ERROR [alfresco.smb.protocol] Socket closed by remote client
Error occurred during initialization of VM
Could not reserve enough space for code cache
17:17:57,512 ERROR [alfresco.smb.protocol] Socket closed by remote client
17:18:19,955 ERROR [alfresco.smb.protocol] Socket closed by remote client
17:25:23,025 ERROR [alfresco.smb.protocol] Socket closed by remote client
Error occurred during initialization of VM
Could not reserve enough space for code cache
17:31:37,544 ERROR [alfresco.smb.protocol] Socket closed by remote client
Error occurred during initialization of VM
Could not reserve enough space for code cache
Error occurred during initialization of VM
Could not reserve enough space for code cache
17:46:34,756 ERROR [alfresco.smb.protocol] Socket closed by remote client
17:47:00,363 ERROR [alfresco.smb.protocol] Socket closed by remote client
17:47:39,498 ERROR [alfresco.smb.protocol] Socket closed by remote client
17:48:08,177 ERROR [alfresco.smb.protocol] Socket closed by remote client
17:53:31,820 ERROR [alfresco.smb.protocol] Socket closed by remote client
Error occurred during initialization of VM
Could not reserve enough space for code cache
17:54:54,311 ERROR [alfresco.smb.protocol] Socket closed by remote client
17:57:04,204 ERROR [alfresco.smb.protocol] Socket closed by remote client
17:58:08,134 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:01:22,008 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:04:02,962 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:12:26,911 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:21:31,712 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:29:36,289 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:38:33,422 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:38:35,072 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:38:36,712 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:39:02,231 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:48:49,035 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:51:58,742 ERROR [alfresco.smb.protocol] Socket closed by remote client
18:57:31,664 ERROR [smb.protocol.auth] java.io.IOException: Bad format, unexpected type
19:05:38,489 ERROR [alfresco.smb.protocol] Socket closed by remote client
19:12:29,403 ERROR [alfresco.smb.protocol] Socket closed by remote client
19:29:50,612 ERROR [alfresco.smb.protocol] Socket closed by remote client

Your fre* command didn't work for me so I can't see the memory available.

But I guess I'm good to go at this point.  Thanks again!

jboggs
Champ in-the-making
Champ in-the-making
Looks like everything is good to go, the word fre_e (without the _) is banned for spam reasons on the forums making that a little difficult. If you want to keep the smb errors form showing up you just need to edit file-servers.xml in your WEB-INF/classes/alfresco directory to comment out the appropriate SMB sections if its not needed.

mjohngren
Champ in-the-making
Champ in-the-making
Here's a funny coda:  I can't stop alfresco using ./alfresco.sh stop

[root@sparkpress alfresco]# ./alfresco.sh stop
Using CATALINA_BASE:   /opt/alfresco/tomcat
Using CATALINA_HOME:   /opt/alfresco/tomcat
Using CATALINA_TMPDIR: /opt/alfresco/tomcat/temp
Using JRE_HOME:       /usr/java/jdk1.6.0_02/
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Afterwards, the web interface continues running as normal.

Is there something different about stopping, or is it just that I've maxed out the memory such that there isn't enough left to run the shutdown script?

[root@sparkpress alfresco]# fre*
             total       used       free     shared    buffers     cached
Mem:        689496     623408      66088          0          0          0
-/+ buffers/cache:     623408      66088
Swap:            0          0          0

Here's what I'm currently using for JAVA_OPTS in catalina.sh:

JAVA_OPTS="-server -Xms128m -Xmx128m -Dsun.rmi.dgc.client.gcInterval=3600000 -XX:MaxPermSize=128m"