开发者社区> 科技小先锋> 正文

alfresco排错 Error creating bean with name 'serverConnector'

简介:
+关注继续查看
由于alfrecoutf-8的支持,需要设置mysql的字符集,否则中文显示为??
以下所有的操作的前提环境如下(对其余系统不保证有效)
/etc/my.cnf
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
default-character-set=utf8      //这句要有
 
[mysql]
no-auto-rehash
default-character-set=utf8     //这句要有
 
 
问题:
alfresco 启动不了
在一次重启系统之后,alfresco启动不了
8080端口虽然打开,但是alfresco页面打不开
 
查看日志 /usr/local/alfresco/tomcat/logs/catalina.out
出错内容如下
INFO: Deploying web application archive alfresco.war
21:19:57,118 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
Caused by:
java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
中间略(很多错误信息)
SEVERE: Error listenerStart
Jul 2, 2008 9:33:03 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
Jul 2, 2008 9:33:04 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
这样启动以后发现8080端口是开的,但是alfresco访问不了
 
参照[url]http://forums.alfresco.com/en/viewtopic.php?f=8&t=7&p=43150&hilit=org.springframework.beans.factory.BeanCreationException#p43150[/url]
的说明,说到的是alfresco连不到数据库,以前一直都是好的.里面提到的解决办法
first you have to remove the alfresco database in mysql using the db_remove.sql
second create the database using the db_setup.sql
third clean your alf_data... (delete all the foLders inside th alf_data dir)
fourth run alfresco
then [url]http://localhost:8080/alfresco...[/url] it should run..
 
我做的是:
先将alfresco给停止掉
将当前的alf_data文件夹 alfresco数据库备份
 
然后执行extras/databases/mysql/db_remove.sql 这个sql文件
作用是删掉MYSQLalfresco这个mysql用户和alfresco数据库
这个sql文件的内容如下
drop database alfresco;
revoke all privileges, grant option from 'alfresco'@'localhost';
drop user 'alfresco'@'localhost';
然后将alf_data里面的内容删掉
 
然后执行 less extras/databases/mysql/db_setup.sql 这个sql文件
它的功能是创建alfresco用户和数据库,内容如下
create database alfresco;
grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
 
然后重启机器,手动启动alfresco 会看到
正常启动的日志tomcat/logs/catalina.out如下
Jul 2, 2008 9:28:05 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
21:28:26,990 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
21:28:30,101 INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
21:28:30,232 INFO  [domain.schema.SchemaBootstrap] Executing database script /usr/local/alfresco/tomcat/temp/Alfresco/AlfrescoSchemaCreate-org.hibernate.dialect.MySQLInnoDBDialect-58118.sql (Generated).
21:28:31,785 INFO  [domain.schema.SchemaBootstrap] Executing database script /usr/local/alfresco/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-58119.sql (Copied from classpath:alfresco/dbscripts/create/2.1/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoPostCreate-2.1-FKIndexes.sql).
21:28:31,824 INFO  [domain.schema.SchemaBootstrap] All executed statements written to file /usr/local/alfresco/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-All_Statements-58120.sql.
21:29:26,752 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.
21:29:26,752 INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: ./alf_data
21:29:26,766 INFO  [admin.patch.PatchExecuter] Checking for patches to apply ...
21:29:26,855 INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
21:29:26,976 ERROR [alfresco.smb.protocol] Failed to get local domain/workgroup name, using default of WORKGROUP
21:29:26,976 ERROR [alfresco.smb.protocol] (This may be due to firewall settings or incorrect <broadcast> setting)
21:29:27,013 INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.5.0_14-b03; maximum heap size 493.063MB
21:29:27,014 WARN  [service.descriptor.DescriptorService] Alfresco JVM - WARNING - maximum heap size 493.063MB is less than recommended 512MB
21:29:27,014 INFO  [service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.1.0 (484) schema 64 - Installed version 2.1.0 (484) schema 64
Jul 2, 2008 9:29:30 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 2, 2008 9:29:30 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 2, 2008 9:29:30 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 85514 ms
就是说它会运行很多的sql文件在里面(因为当前数据库为空),这个时间会有点长
 
此时访问是正常的,可是还要恢复数据
先将alfresco停止
alfreco的备份文件导入:
sql文件导入到数据库,然后把alf_data也放到/usr/local/alresco
重新启动alfresco
 
第一次启动可能不行,先将它关了,手工启动一次
正常情况下的日志tomcat/logs/catalina.out如下
Jul 2, 2008 9:38:34 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
21:38:55,014 WARN  [remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
21:38:58,452 INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialec
t.
21:39:02,508 INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
21:39:04,759 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.
21:39:04,759 INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: ./alf_data
21:39:05,493 INFO  [admin.patch.PatchExecuter] Checking for patches to apply ...
21:39:05,591 INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
21:39:05,805 ERROR [alfresco.smb.protocol] Failed to get local domain/workgroup name, using default of WORKGROUP
21:39:05,805 ERROR [alfresco.smb.protocol] (This may be due to firewall settings or incorrect <broadcast> setting)
21:39:05,844 INFO  [service.descriptor.DescriptorService] Alfresco JVM - v1.5.0_14-b03; maximum heap size 493.063MB
21:39:05,844 WARN  [service.descriptor.DescriptorService] Alfresco JVM - WARNING - maximum heap size 493.063MB is less than recommended 512MB
21:39:05,845 INFO  [service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.1.0 (484) s
chema 64 - Installed version 2.1.0 (484) schema 64
Jul 2, 2008 9:39:09 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 2, 2008 9:39:09 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 2, 2008 9:39:09 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 36241 ms
 本文转自yahoon 51CTO博客,原文链接:http://blog.51cto.com/yahoon/85502,如需转载请自行联系原作者
 

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
冬季实战营第一期:从零到一上手玩转云服务器 | 学习报告
训练营日期:2022年1月17日 - 2022年1月23日 需要先报名后学习,实际是17-21共5天5个场景的学习,链接地址:https://developer.aliyun.com/adc/series/wintercamplist1?spm=a2c6h.26268694.J_3660455150.2.503610f8RnszVx 我是5月份学习的,并没有实时参加训练营,因为觉着本次训练营课程设置很实用,所以对本次学习做个总结。
6 0
心中有“树”!图文并茂介绍数据结构中常见的树(一)
提到数据结构中的树(Tree) ,大家应该都不陌生,相关书籍中都有大段篇幅的介绍,刷 Leetcode 的时候会遇到很多相关问题。很多人往往会用 “手写红黑树” 来形容面试难度很高。
10 0
心中有“树”!图文并茂介绍数据结构中常见的树(二)
计算机科学家尼古拉斯·沃斯(Niklaus Wirth)曾说过:编程=数据结构+算法 ,可见数据结构在编程中的重要性。
5 0
JSP - 起源、执行过程、运行原理、生命周期
JSP - 起源、执行过程、运行原理、生命周期
5 0
心中有“树”!图文并茂介绍数据结构中常见的树(三)
在前面两篇文章中,我们简要介绍了数据结构中的各种【树】在搜索、数据库等领域的使用场景,希望对大家有所帮助。
11 0
如何在小游戏制作工具中使用云函数
本节试图以最简单的方式带你了解如何在小程序后台申请和开通云开发服务,创建并编写第一个云函数并在小游戏制作工具中对其进行调用。
10 0
6967
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
OceanBase 入门到实战教程
立即下载
阿里云图数据库GDB,加速开启“图智”未来.ppt
立即下载
实时数仓Hologres技术实战一本通2.0版(下)
立即下载