svn: E175002: 服务器发送了意外的返回值(502 Bad Gateway),在响应 “COPY” 的请求 “……” 中

当利用 mod_proxy 把 Subversion 服务运行于 Apache 反向代理服务器之后时,你会在执行 svn copy(和 move)时得到如下错误:

$ svn cp https://proxy-host.com/svn/sandbox/trunk/ https://proxy-host.com/svn/sandbox/branches/test -m “test copy”
svn: E175002: 服务器发送了意外的返回值(502 Bad Gateway),在响应 “COPY” 的请求 “/svn/sandbox/!svn/rvr/12/trunk” 中

$ env LC_ALL=en_US.UTF-8 svn cp https://proxy-host.com/svn/sandbox/trunk/ https://proxy-host.com/svn/sandbox/branches/test -m “test copy”
svn: E175002: Server sent unexpected return value (502 Bad Gateway) in response to COPY request for ‘/svn/sandbox/!svn/rvr/12/trunk’

经查得知是 DAV module 相关的问题,也得到一解决方案: Subversion behind an Apache Reverse Proxy ,通过在具体运行 Subversion 服务的 Apache 上添加了如下配置解决了问题:

RewriteEngine On
RewriteCond %{HTTP:Destination} .+/(svn/.*$)
RewriteRule ^/svn/.* - [E=MyDestination:http://svn-host/%1,PT]
RequestHeader set Destination %{MyDestination}e env=MyDestination

Advertisements

#apache-http-server, #subversion

TimeoutError: Unable to get database connection within 0 seconds. (TracError(,))

当你在 trac(An enhanced wiki and issue tracking system for software projects) 0.12 上启用某个插件后,比如 trac-mastertickets-3.0.1(Support for ticket dependencies),可能会要求你执行 trac-admin project_environment_path upgrade 以创建缺少的数据库表,比如 mastertickets。

如果你是使用 Apache 作为 web 前端,PostgreSQL(而不是默认的 sqlite) 作为后端存储的话,当执行完上述命令后,再用浏览器查看 trac 的时候可能会得到下面的错误信息:

Traceback (most recent call last):
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/web/api.py", line 440, in send_error
    data, 'text/html')
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/web/chrome.py", line 827, in render_template
    message = req.session.pop('chrome.%s.%d' % (type_, i))
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/web/api.py", line 216, in __getattr__
    value = self.callbacks[name](self)
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/web/main.py", line 300, in _get_session
    return Session(self.env, req)
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/web/session.py", line 203, in __init__
    self.get_session(req.authname, authenticated=True)
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/web/session.py", line 219, in get_session
    super(Session, self).get_session(sid, authenticated)
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/web/session.py", line 61, in get_session
    db = self.env.get_db_cnx()
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/env.py", line 328, in get_db_cnx
    return get_read_db(self)
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/db/api.py", line 90, in get_read_db
    return _transaction_local.db or DatabaseManager(env).get_connection()
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/db/api.py", line 152, in get_connection
    return self._cnx_pool.get_cnx(self.timeout or None)
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/db/pool.py", line 226, in get_cnx
    return _backend.get_cnx(self._connector, self._kwargs, timeout)
  File "build/bdist.freebsd-8.1-RELEASE-amd64/egg/trac/db/pool.py", line 146, in get_cnx
    raise TimeoutError(errmsg)
TimeoutError: Unable to get database connection within 0 seconds. (TracError(,))

根据上述错误信息,你可能会去检查数据库连接问题,并且百查不得头绪。其实是因为 trac 无法读取 conf/trac.ini 所致。

执行 trac-admin upgrade 之前,trac.ini的权限及属主信息如下:

-rw-------  1 www  www  4998 10 31 23:20 conf/trac.ini

而执行完成后,其权限变成了:

-rw-------  1 root  www  4998 10 31 23:20 conf/trac.ini

因为属主变成了 root,且 Apache 工作进程所在的用户组 www 的权限为g:---,所以 Apache 无法读取 trac.ini,从而导致了上述错误的产生。

解决方法:

chown www conf/trac.ini

如果错误依旧,尝试重启动 Apache 试试:

apachectl restart

#apache-http-server, #postgresql, #trac

Mac OS X 10.6.8(aka Snow Leopard) 上开启 PHP 环境

开启Apache

在“系统偏好设置->Internet 与无线->共享->Web 共享”打勾开启 Apache。

配置 /~YOUR_USERNAME

配置你的用户目录下的 Sites 可以通过 http://127.0.0.1/~YOUR_USERNAME (请将 YOUR_USERNAME 替换成你的帐户名称,下同。使用命令 whoami 可以查看你的帐户名称)来访问。

$ sudo cp /etc/apache2/users/Guest.conf /etc/apache2/users/YOUR_USERNAME.conf

$ sudo vi /etc/apahe2/users/YOUR_USERNAME.conf

将 <Directory "/Users/Guest/Sites/"> 修改为 <Directory "/Users/YOUR_USERNAME/Sites/">

结果为:

<Directory "/Users/YOUR_USERNAME/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

如果你打算使用 .htaccess 文件,可以简单地把 AllowOverride 从 None 改为 All。

启用 php module

$ sudo vi /etc/apache2/httpd.conf

搜索 php5_module 并将前面的 # 删除:

LoadModule php5_module        libexec/apache2/libphp5.so

重启动 apache

可以使用命令重启,也可以通过第一步关闭再开启来达到重启的目的。

$ sudo /usr/sbin/apachectl restart

写个测试页 phpinfo

$ vi ~/Sites/phpinfo.php

<?php
phpinfo();
?>

通过 http://127.0.0.1/~YOUR_USERNAME/phpinfo.php 访问。

#apache-http-server, #mac-os-x, #php

Apache HTTP 代理服务器使用 Postgresql 认证用户

<VirtualHost *:80>
	ServerName proxy.example.org
	ServerAdmin proxymaster@example.org

	DocumentRoot /var/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/proxy_error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/proxy_access.log combined

	ProxyRequests On
	ProxyVia On
	<Proxy *>
		Order deny,allow
		Allow from all

		AuthType Basic
		AuthName proxy.example.org

		Auth_PG_host postgresql.example.org
		Auth_PG_port 5432
		Auth_PG_user myusername
		Auth_PG_pwd mypassword
		Auth_PG_database mydatabase

		Auth_PG_pwd_table http_proxy_user
		Auth_PG_uid_field username
		Auth_PG_pwd_field unix_crypt_password

		Auth_PG_log_table http_proxy_access_log
		Auth_PG_log_uname_field username
		Auth_PG_log_date_field date
		Auth_PG_log_uri_field request
		Auth_PG_log_addrs_field ip_address

		Require valid-user
	</Proxy>

</VirtualHost>

参考文档:

#apache-http-server, #http-proxy, #mod_auth_pgsql, #mod_proxy

在 FreeBSD 上安装 Redmine

安装 Redmine

  1. cd /usr/ports/www/redmine && make install clean

设置 rc.conf

  1. /usr/local/etc/rc.d/redmine rcvar | sed s/NO/YES/ >> /etc/rc.conf

创建 PostgreSQL 数据库角色“redmine”和数据库“redmine”

  1. psql -U pgsql postgres

psql (9.0.4, server 9.0.3)
Type “help” for help.
postgres=# CREATE ROLE redmine LOGIN PASSWORD ‘redmine’;
CREATE ROLE
postgres=# CREATE DATABASE redmine OWNER = redmine;
CREATE DATABASE

设置数据库连接信息

  1. vi /usr/local/www/redmine/config/database.yml
production:
  adapter: postgresql
  database: redmine
  host: localhost
  username: redmine
  password: "redmine"

初始化数据库

# cd /usr/local/www/redmine/
# rake generate_session_store
# rake db:migrate RAILS_ENV=”production”
# rake redmine:load_default_data RAILS_ENV=”production”
Select language: bg, bs, ca, cs, da, de, el, en, en-GB, es, eu, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en] zh
====================================
Default configuration data loaded.
# chown -R www:www files log tmp public/plugin_assets
# chmod -R 755 files log tmp public/plugin_assets

启动 Redmine

# /usr/local/etc/rc.d/redmine start

设定 Apache HTTP Server 作为 Balancer(可选)

# vi /usr/local/etc/apache22/Includes/redmine.conf

<VirtualHost *:80>
	ServerName redmine.example.org
	DocumentRoot /usr/local/www/redmine/public

	<Directory /usr/local/www/redmine/public>
		Order allow,deny
		allow from all
	</Directory>

	<Proxy balancer://redmine>
		BalancerMember http://127.0.0.1:3000
	</Proxy>

	ProxyRequests Off
	ProxyPass /favicon.ico !
	ProxyPass /404.html !
	ProxyPass /500.html !
	ProxyPass /help !
	ProxyPass /images !
	ProxyPass /javascripts !
	ProxyPass /stylesheets !
	ProxyPass /themes !
	ProxyPass / balancer://redmine/
	ProxyPassReverse / balancer://redmine/
</VirtualHost>

重启动 Apache HTTP Server(可选)

  1. apachectl restart

参考

#apache-http-server, #freebsd, #load-balancing, #postgresql, #redmine

在 FreeBSD 上安装 Nexus

安装 JDK

cd /usr/ports/java/diablo-jdk16/ && make install clean

不能用 openjdk 呀,我测试了 openjdk-7.0.122_1,启动 nexus 会失败的:

log4j:WARN No appenders could be found for logger (org.sonatype.appcontext.AppContext).
log4j:WARN Please initialize the log4j system properly.
2011-04-13 06:48:49 INFO  [Thread-1       ] - org.sonatype.security.configuration.source.FileSecurityConfigurationSource - Loading Security configuration from /var/nexus/conf/security-configuration.xml
2011-04-13 06:48:49 INFO  [Thread-1       ] - org.sonatype.nexus.timeline.DefaultNexusTimeline - Initializing Nexus Timeline...
2011-04-13 06:48:50 INFO  [Thread-1       ] - org.sonatype.nexus.DefaultNexus - 
-------------------------------------------------

Initializing Nexus (OSS), Version 1.9.0.2

-------------------------------------------------
2011-04-13 06:48:50 INFO  [Thread-1       ] - org.sonatype.nexus.DefaultNexus - Activating locally installed plugins...
2011-04-13 06:48:51 INFO  [Thread-1       ] - org.sonatype.nexus.DefaultNexus - Plugin manager request "ACTIVATE" on plugin "org.sonatype.nexus.plugins:nexus-plugin-console-plugin:1.9.0.2" was successful.
2011-04-13 06:48:51 INFO  [Thread-1       ] - org.sonatype.nexus.DefaultNexus - Plugin manager request "ACTIVATE" on plugin "org.sonatype.nexus.plugins:nexus-indexer-lucene-plugin:1.9.0.2" was successful.
2011-04-13 06:48:51 INFO  [Thread-1       ] - org.sonatype.nexus.DefaultNexus - Plugin manager request "ACTIVATE" on plugin "org.sonatype.nexus.plugins:nexus-rrb-plugin:1.9.0.2" was successful.
2011-04-13 06:48:51 INFO  [Thread-1       ] - org.sonatype.nexus.DefaultNexus - Plugin manager request "ACTIVATE" on plugin "org.sonatype.nexus.plugins:nexus-core-documentation-plugin:1.9.0.2" was successful.
2011-04-13 06:48:51 INFO  [Thread-1       ] - org.sonatype.nexus.DefaultNexus - Plugin manager request "ACTIVATE" on plugin "org.sonatype.nexus.plugins.ldap:nexus-ldap-realm-plugin:1.9.0.2" was successful.
2011-04-13 06:48:51 INFO  [Thread-1       ] - org.sonatype.plexus.components.ehcache.DefaultEhCacheWrapper - Creating and configuring EHCache manager with classpath:/ehcache.xml, using disk store 'none'
2011-04-13 06:48:51 INFO  [Thread-1       ] - org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Loading Nexus Configuration...
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.sonatype.nexus.configuration.source.StaticConfigurationSource - Configuration loaded succesfully.
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.sonatype.nexus.configuration.source.FileConfigurationSource - Loading Nexus configuration from /var/nexus/conf/nexus.xml
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.sonatype.nexus.configuration.source.FileConfigurationSource - Configuration loaded succesfully.
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.sonatype.nexus.configuration.validator.DefaultApplicationConfigurationValidator - Nexus configuration validated succesfully.
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration...
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.sonatype.security.configuration.source.FileSecurityConfigurationSource - Loading Security configuration from /var/nexus/conf/security-configuration.xml
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.apache.shiro.cache.ehcache.EhCacheManager - Cache with name 'org.sonatype.security.realms.XmlAuthenticatingRealm.authorizationCache' does not yet exist.  Creating now.
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.apache.shiro.cache.ehcache.EhCacheManager - Added EhCache named [org.sonatype.security.realms.XmlAuthenticatingRealm.authorizationCache]
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.apache.shiro.cache.ehcache.EhCacheManager - Cache with name 'org.sonatype.security.realms.XmlAuthorizingRealm.authorizationCache.1' does not yet exist.  Creating now.
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.apache.shiro.cache.ehcache.EhCacheManager - Added EhCache named [org.sonatype.security.realms.XmlAuthorizingRealm.authorizationCache.1]
2011-04-13 06:48:52 INFO  [Thread-1       ] - org.sonatype.nexus.proxy.registry.DefaultRepositoryTypeRegistry - Registered default repository types.
2011-04-13 06:48:52 WARN  [Thread-1       ] - org.codehaus.plexus.PlexusContainer - Error starting: class org.sonatype.nexus.DefaultNexus
org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException: Could not start Nexus!
	at org.sonatype.nexus.DefaultNexus.start(DefaultNexus.java:652)
	at org.codehaus.plexus.PlexusLifecycleManager.start(PlexusLifecycleManager.java:283)
	at org.codehaus.plexus.PlexusLifecycleManager.manageLifecycle(PlexusLifecycleManager.java:234)
	at org.codehaus.plexus.PlexusLifecycleManager.manage(PlexusLifecycleManager.java:134)
	at org.sonatype.guice.plexus.binders.PlexusBeanBinder.afterInjection(PlexusBeanBinder.java:79)
	at com.google.inject.internal.MembersInjectorImpl.notifyListeners(MembersInjectorImpl.java:97)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:95)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:253)
	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:984)
	at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.Scopes$1$1.get(Scopes.java:59)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:995)
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
	at org.sonatype.guice.bean.locators.LazyQualifiedBean.getValue(LazyQualifiedBean.java:66)
	at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:54)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:239)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:233)
	at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:48)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4521)
	at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
	at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:732)
Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor : Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
---- Debugging information ----
message             : Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
class               : org.sonatype.nexus.configuration.model.CRepository
required-type       : org.codehaus.plexus.util.xml.Xpp3Dom
path                : /org.sonatype.nexus.configuration.model.CRepository/externalConfiguration
line number         : 23
-------------------------------
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:845)
	at org.sonatype.nexus.configuration.model.AbstractRevertableConfiguration.copyObject(AbstractRevertableConfiguration.java:103)
	at org.sonatype.nexus.configuration.model.AbstractRevertableConfiguration.getConfiguration(AbstractRevertableConfiguration.java:46)
	at org.sonatype.nexus.configuration.model.CRepositoryCoreConfiguration.getConfiguration(CRepositoryCoreConfiguration.java:57)
	at org.sonatype.nexus.proxy.repository.ConfigurableRepository.getCurrentConfiguration(ConfigurableRepository.java:42)
	at org.sonatype.nexus.proxy.repository.ConfigurableRepository.getCurrentConfiguration(ConfigurableRepository.java:34)
	at org.sonatype.nexus.configuration.AbstractConfigurable.configure(AbstractConfigurable.java:171)
	at org.sonatype.nexus.configuration.application.runtime.DefaultApplicationRuntimeConfigurationBuilder.createRepositoryFromModel(DefaultApplicationRuntimeConfigurationBuilder.java:51)
	at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.instantiateRepository(DefaultNexusConfiguration.java:515)
	at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createRepositories(DefaultNexusConfiguration.java:481)
	at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createInternals(DefaultNexusConfiguration.java:463)
	at org.sonatype.nexus.DefaultNexus.startService(DefaultNexus.java:686)
	at org.sonatype.nexus.DefaultNexus.start(DefaultNexus.java:648)
	... 35 more
Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:71)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:308)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:161)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	... 62 more
2011-04-13 06:48:52 ERROR [Thread-1       ] - org.sonatype.guice.bean.reflect.NamedClass - Error injecting: org.sonatype.nexus.DefaultNexus
com.google.inject.ProvisionException: Guice provision errors:

1) Error starting: class org.sonatype.nexus.DefaultNexus
  while locating org.sonatype.nexus.DefaultNexus

1 error
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:958)
	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:984)
	at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.Scopes$1$1.get(Scopes.java:59)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:995)
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
	at org.sonatype.guice.bean.locators.LazyQualifiedBean.getValue(LazyQualifiedBean.java:66)
	at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:54)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:239)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:233)
	at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:48)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4521)
	at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
	at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:732)
Caused by: org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException: Could not start Nexus!
	at org.sonatype.nexus.DefaultNexus.start(DefaultNexus.java:652)
	at org.codehaus.plexus.PlexusLifecycleManager.start(PlexusLifecycleManager.java:283)
	at org.codehaus.plexus.PlexusLifecycleManager.manageLifecycle(PlexusLifecycleManager.java:234)
	at org.codehaus.plexus.PlexusLifecycleManager.manage(PlexusLifecycleManager.java:134)
	at org.sonatype.guice.plexus.binders.PlexusBeanBinder.afterInjection(PlexusBeanBinder.java:79)
	at com.google.inject.internal.MembersInjectorImpl.notifyListeners(MembersInjectorImpl.java:97)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:95)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:253)
	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
	... 25 more
Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor : Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
---- Debugging information ----
message             : Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
class               : org.sonatype.nexus.configuration.model.CRepository
required-type       : org.codehaus.plexus.util.xml.Xpp3Dom
path                : /org.sonatype.nexus.configuration.model.CRepository/externalConfiguration
line number         : 23
-------------------------------
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:845)
	at org.sonatype.nexus.configuration.model.AbstractRevertableConfiguration.copyObject(AbstractRevertableConfiguration.java:103)
	at org.sonatype.nexus.configuration.model.AbstractRevertableConfiguration.getConfiguration(AbstractRevertableConfiguration.java:46)
	at org.sonatype.nexus.configuration.model.CRepositoryCoreConfiguration.getConfiguration(CRepositoryCoreConfiguration.java:57)
	at org.sonatype.nexus.proxy.repository.ConfigurableRepository.getCurrentConfiguration(ConfigurableRepository.java:42)
	at org.sonatype.nexus.proxy.repository.ConfigurableRepository.getCurrentConfiguration(ConfigurableRepository.java:34)
	at org.sonatype.nexus.configuration.AbstractConfigurable.configure(AbstractConfigurable.java:171)
	at org.sonatype.nexus.configuration.application.runtime.DefaultApplicationRuntimeConfigurationBuilder.createRepositoryFromModel(DefaultApplicationRuntimeConfigurationBuilder.java:51)
	at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.instantiateRepository(DefaultNexusConfiguration.java:515)
	at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createRepositories(DefaultNexusConfiguration.java:481)
	at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createInternals(DefaultNexusConfiguration.java:463)
	at org.sonatype.nexus.DefaultNexus.startService(DefaultNexus.java:686)
	at org.sonatype.nexus.DefaultNexus.start(DefaultNexus.java:648)
	... 35 more
Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:71)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:308)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:161)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	... 62 more
2011-04-13 06:48:52 ERROR [Thread-1       ] - org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/nexus] - Exception sending context initialized event to listener instance of class org.sonatype.nexus.web.NexusBooterListener
java.lang.IllegalStateException: Could not initialize Nexus.
	at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:58)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4521)
	at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
	at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:732)
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Guice provision errors:

1) Error injecting: org.sonatype.nexus.DefaultNexus
  at ClassRealm[plexus.core, parent: null]
  at ClassRealm[plexus.core, parent: null]
  while locating org.sonatype.nexus.Nexus

1 error
      role: org.sonatype.nexus.Nexus
  roleHint: 
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:251)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:239)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:233)
	at org.sonatype.nexus.web.NexusBooterListener.contextInitialized(NexusBooterListener.java:48)
	... 8 more
Caused by: com.google.inject.ProvisionException: Guice provision errors:

1) Error injecting: org.sonatype.nexus.DefaultNexus
  at ClassRealm[plexus.core, parent: null]
  at ClassRealm[plexus.core, parent: null]
  while locating org.sonatype.nexus.Nexus

1 error
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:958)
	at org.sonatype.guice.bean.locators.LazyQualifiedBean.getValue(LazyQualifiedBean.java:66)
	at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:54)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
	... 11 more
Caused by: com.google.inject.ProvisionException: Guice provision errors:

1) Error starting: class org.sonatype.nexus.DefaultNexus
  while locating org.sonatype.nexus.DefaultNexus

1 error
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:958)
	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:984)
	at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.Scopes$1$1.get(Scopes.java:59)
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:995)
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
	... 14 more
Caused by: org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException: Could not start Nexus!
	at org.sonatype.nexus.DefaultNexus.start(DefaultNexus.java:652)
	at org.codehaus.plexus.PlexusLifecycleManager.start(PlexusLifecycleManager.java:283)
	at org.codehaus.plexus.PlexusLifecycleManager.manageLifecycle(PlexusLifecycleManager.java:234)
	at org.codehaus.plexus.PlexusLifecycleManager.manage(PlexusLifecycleManager.java:134)
	at org.sonatype.guice.plexus.binders.PlexusBeanBinder.afterInjection(PlexusBeanBinder.java:79)
	at com.google.inject.internal.MembersInjectorImpl.notifyListeners(MembersInjectorImpl.java:97)
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:95)
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:253)
	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
	... 25 more
Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor : Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
---- Debugging information ----
message             : Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
class               : org.sonatype.nexus.configuration.model.CRepository
required-type       : org.codehaus.plexus.util.xml.Xpp3Dom
path                : /org.sonatype.nexus.configuration.model.CRepository/externalConfiguration
line number         : 23
-------------------------------
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:845)
	at org.sonatype.nexus.configuration.model.AbstractRevertableConfiguration.copyObject(AbstractRevertableConfiguration.java:103)
	at org.sonatype.nexus.configuration.model.AbstractRevertableConfiguration.getConfiguration(AbstractRevertableConfiguration.java:46)
	at org.sonatype.nexus.configuration.model.CRepositoryCoreConfiguration.getConfiguration(CRepositoryCoreConfiguration.java:57)
	at org.sonatype.nexus.proxy.repository.ConfigurableRepository.getCurrentConfiguration(ConfigurableRepository.java:42)
	at org.sonatype.nexus.proxy.repository.ConfigurableRepository.getCurrentConfiguration(ConfigurableRepository.java:34)
	at org.sonatype.nexus.configuration.AbstractConfigurable.configure(AbstractConfigurable.java:171)
	at org.sonatype.nexus.configuration.application.runtime.DefaultApplicationRuntimeConfigurationBuilder.createRepositoryFromModel(DefaultApplicationRuntimeConfigurationBuilder.java:51)
	at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.instantiateRepository(DefaultNexusConfiguration.java:515)
	at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createRepositories(DefaultNexusConfiguration.java:481)
	at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createInternals(DefaultNexusConfiguration.java:463)
	at org.sonatype.nexus.DefaultNexus.startService(DefaultNexus.java:686)
	at org.sonatype.nexus.DefaultNexus.start(DefaultNexus.java:648)
	... 35 more
Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Cannot construct org.codehaus.plexus.util.xml.Xpp3Dom as it does not have a no-args constructor
	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:71)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:308)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:161)
	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
	... 62 more
2011-04-13 06:48:52 ERROR [main           ] - org.apache.catalina.core.StandardContext - Error listenerStart
2011-04-13 06:48:52 ERROR [main           ] - org.apache.catalina.core.StandardContext - Context [/nexus] startup failed due to previous errors
2011-04-13 06:48:53 INFO  [Thread-2       ] - org.sonatype.nexus.index.DefaultIndexerManager - Shutting down Nexus IndexerManager
2011-04-13 06:48:53 INFO  [Thread-2       ] - org.sonatype.plexus.components.ehcache.DefaultEhCacheWrapper - Shutting down EHCache manager.
2011-04-13 06:48:53 INFO  [Thread-2       ] - org.sonatype.nexus.DefaultNexus - Stopped Nexus (version 1.9.0.2 OSS)
2011-04-13 06:48:56,061 INFO  NutchBean - creating new bean
2011-04-13 06:48:56,733 INFO  SearchBean - opening merged index in /usr/home/sutra/search/nutch-1.0/crawl/index
2011-04-13 06:48:57,256 INFO  PluginRepository - Plugins: looking in: /usr/local/apache-tomcat-7.0/webapps/nutch/WEB-INF/classes/plugins
2011-04-13 06:48:57,670 INFO  PluginRepository - Plugin Auto-activation mode: [true]
2011-04-13 06:48:57,670 INFO  PluginRepository - Registered Plugins:
2011-04-13 06:48:57,670 INFO  PluginRepository - 	Pdf Parse Plug-in (parse-pdf)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	Http / Https Protocol Plug-in (protocol-httpclient)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	Jakarta POI - Java API To Access Microsoft Format Files (lib-jakarta-poi)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	HTTP Framework (lib-http)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	MSWord Parse Plug-in (parse-msword)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	Regex URL Filter (urlfilter-regex)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	XML Libraries (lib-xml)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	MSExcel Parse Plug-in (parse-msexcel)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	OPIC Scoring Plug-in (scoring-opic)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	Zip Parse Plug-in (parse-zip)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	URL Query Filter (query-url)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	Parse MS Documents Framework (lib-parsems)
2011-04-13 06:48:57,670 INFO  PluginRepository - 	Regex URL Filter Framework (lib-regex-filter)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	the nutch core extension points (nutch-extensionpoints)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	MSPowerPoint Parse Plug-in (parse-mspowerpoint)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Basic Query Filter (query-basic)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Basic URL Normalizer (urlnormalizer-basic)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	RSS Parse Plug-in (parse-rss)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Html Parse Plug-in (parse-html)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Basic Indexing Filter (index-basic)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Basic Summarizer Plug-in (summary-basic)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Site Query Filter (query-site)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Text Parse Plug-in (parse-text)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Pass-through URL Normalizer (urlnormalizer-pass)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Regex URL Normalizer (urlnormalizer-regex)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	CyberNeko HTML Parser (lib-nekohtml)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	OpenOffice/OpenDocument Parse Plug-in (parse-oo)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	JavaScript Parser (parse-js)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	SWF Parse Plug-in (parse-swf)
2011-04-13 06:48:57,671 INFO  PluginRepository - Registered Extension-Points:
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Nutch Summarizer (org.apache.nutch.searcher.Summarizer)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Nutch Protocol (org.apache.nutch.protocol.Protocol)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Nutch Analysis (org.apache.nutch.analysis.NutchAnalyzer)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Nutch Field Filter (org.apache.nutch.indexer.field.FieldFilter)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	HTML Parse Filter (org.apache.nutch.parse.HtmlParseFilter)
2011-04-13 06:48:57,671 INFO  PluginRepository - 	Nutch Query Filter (org.apache.nutch.searcher.QueryFilter)
2011-04-13 06:48:57,672 INFO  PluginRepository - 	Nutch Search Results Response Writer (org.apache.nutch.searcher.response.ResponseWriter)
2011-04-13 06:48:57,672 INFO  PluginRepository - 	Nutch URL Normalizer (org.apache.nutch.net.URLNormalizer)
2011-04-13 06:48:57,672 INFO  PluginRepository - 	Nutch URL Filter (org.apache.nutch.net.URLFilter)
2011-04-13 06:48:57,672 INFO  PluginRepository - 	Nutch Online Search Results Clustering Plugin (org.apache.nutch.clustering.OnlineClusterer)
2011-04-13 06:48:57,672 INFO  PluginRepository - 	Nutch Indexing Filter (org.apache.nutch.indexer.IndexingFilter)
2011-04-13 06:48:57,672 INFO  PluginRepository - 	Nutch Content Parser (org.apache.nutch.parse.Parser)
2011-04-13 06:48:57,672 INFO  PluginRepository - 	Nutch Scoring (org.apache.nutch.scoring.ScoringFilter)
2011-04-13 06:48:57,672 INFO  PluginRepository - 	Ontology Model Loader (org.apache.nutch.ontology.Ontology)
2011-04-13 06:48:57,697 INFO  Configuration - found resource common-terms.utf8 at file:/usr/local/apache-tomcat-7.0/webapps/nutch/WEB-INF/classes/common-terms.utf8
2011-04-13 06:48:57,758 INFO  SummarizerFactory - Using the first summarizer extension found: Basic Summarizer

安装 Tomcat

cd /usr/ports/www/tomcat7/ && make install clean

下载 Nexus

fetch http://nexus.sonatype.org/downloads/nexus-webapp-1.9.0.2.war
mv nexus-webapp-1.9.0.2.war /usr/local/apache-tomcat-7.0/webapps/nexus.war

安装配置 Apache

安装 Apache 作为 Tomcat 的前端,虽然这不是必须的,但我们常常需要 Apache 来运行其它的应用,并共享一个 80 端口,比如 TracSubversion等。

cd /usr/ports/www/apache22/ && make install clean

注意勾选 PROXY_AJP 。
配置文件 httpd.conf 或者其 include 的文件中添加

ProxyPass /nexus ajp://localhost:8009/nexus
ProxyPassReverse /nexus ajp://localhost:8009/nexus
<Location /nexus>
    SetEnv no-gzip
</Location>

注意这里一定要加上 no-gzip 否则,用浏览器查看就会看到又如压缩文件被记事本打开了的乱码样的网页。这是因为 Nexus 默认会把 HTTP Resposne 压缩,然后如果 apache 也配置了压缩的话,apache 又会把 response 给压缩一遍,而到浏览器那端只会解压缩一次。所以告诉 apache 不要压缩。

启动 Tomcat 和 Apache

首先让 tomcat 和 apache 设置为开机自动启动吧:

/usr/local/etc/rc.d/tomcat7 rcvar | sed s/NO/YES/ >> /etc/rc.conf
/usr/local/etc/rc.d/apache22 rcvar | sed s/NO/YES/ >> /etc/rc.conf

还要配置下 tomcat 启动参数,让 nexus 把配置数据之类的都放到 /var/nexus 目录里去,在 /etc/rc.conf 里添加下面一行:

tomcat7_java_opts="-Dplexus.nexus-work=/var/nexus"

并且给它创建好 /var/nexus 这个目录:

mkdir /var/nexus && chown www:www /var/nexus

然后启动它们:

/usr/local/etc/rc.d/tomcat7 start
apachectl start

使用方法

浏览器访问

http://localhost/nexus

Maven使用

修改 ~/.m2/settings.xml,添加一个mirror:

<mirror>
    <id>mynexus</id>
    <name>mynexus</name>
    <url>http://localhost/content/groups/public</url>
    <mirrorOf>central</mirrorOf>
</mirror>

#apache-http-server, #freebsd, #maven, #nexus, #tomcat

Failed to enable the ‘httpready’ Accept Filter

在 FreeBSD 6.2-RELEASE 上从 ports 安装 apache22(/usr/ports/www/apache22),在 /etc/rc.conf 加入 apache22_enable="YES" 后,启动 apache,报下面的警告:
# apachectl start
httpd not running, trying to start
[Wed Sep 12 21:27:30 2007] [warn] (2)No such file or directory: Failed to enable the ‘httpready’ Accept Filter

要解决这个问题,只需
# kldload accf_http

并在 /boot/loader.conf 加入下面两行,以便下次启动自动装载模块:
accf_data_load="YES"
accf_http_load="YES"

这两条设置其实是覆盖了在 /boot/defaults/loader.conf 中的这两个同名选项:
# cat /boot/defaults/loader.conf | grep accf
accf_data_load="NO" # Wait for data accept filter
accf_http_load="NO" # Wait for full HTTP request accept filter

—————- 清晰明朗的分割线 —————-
其实这个问题我早解决了,今天写出来省得下次遇到再找。

#apache-http-server, #freebsd