最近,我在我的 Linux 机器上配置了 subversion edge。安装过程非常顺利(按照此链接中的说明进行安装)[http://www.collab.net/lightbox/download_info/61/34])并且我能够登录到 csvn 控制台,访问和创建 subversion 存储库。
重启机器后,我只能登录 csvn 控制台,状态页面显示 Subversion 服务器已关闭。当我单击“开始”按钮时,显示一条错误消息,提示“启动 Subversion 服务器时出现问题!”。当我检查服务器错误日志时,我得到的 console.log 为:
2013-01-01 08:01:45.011:INFO::jetty-7.0.2.v20100331
2013-01-01 08:01:45.076:INFO::Deployment monitor /opt/csvn/appserver/contexts at interval 300
2013-01-01 08:01:45.095:INFO::Deployable added: /opt/csvn/appserver/contexts/redirect.xml
2013-01-01 08:01:45.171:INFO::Deployable added: /opt/csvn/appserver/contexts/integration.xml
2013-01-01 08:01:47,335 INFO [WrapperJarAppMain] com.vasoftware.sf.externalintegration.BootstrapServlet: Bootstrapping the Integration service for Subversion Edge at /opt/csvn
2013-01-01 08:01:47,756 WARN [WrapperJarAppMain] org.apache.axis.utils.JavaUtils: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
2013-01-01 08:01:48.000:INFO::Deployable added: /opt/csvn/appserver/contexts/csvn.xml
2013-01-01 08:02:00.473:INFO:/csvn:Initializing Spring root WebApplicationContext
loading security config ...
2013-01-01 08:02:28,388 [quartzScheduler_Worker-1] WARN console.OperatingSystemService - Testing for process '22276' failed with message: The SIGAR library was not loaded.
2013-01-01 08:02:28,391 [quartzScheduler_Worker-1] WARN console.OperatingSystemService - SIGAR loading issue, the pid cannot be tested. Assuming the process is alive
2013-01-01 08:02:28.829:INFO:/csvn:newClient: com.collabnet.svnedge.admin.PackagesUpdateService_f4dc86al9etm
2013-01-01 08:02:28.830:INFO:/csvn:newChannel: /csvn-updates
2013-01-01 08:02:28.831:INFO:/csvn:newChannel: /csvn-updates/status
2013-01-01 08:02:28.831:INFO:/csvn:newChannel: /csvn-updates/percentages
2013-01-01 08:02:29,502 [quartzScheduler_Worker-1] ERROR console.CommandLineService - Exit status=1 Process err output: httpd: bad user name null
2013-01-01 08:02:29,504 [quartzScheduler_Worker-1] WARN console.LifecycleService - Server graceful attempt failed with code=1
2013-01-01 08:02:29,504 [quartzScheduler_Worker-1] WARN console.LifecycleService - Output:
2013-01-01 08:02:41.954:INFO:/csvn:Initializing Spring FrameworkServlet 'grails'
2013-01-01 08:02:41.980:INFO::Deployment monitor /opt/csvn/appserver/webapps at interval 300
2013-01-01 08:02:42.036:INFO::Opened /opt/csvn/data/logs/jetty_2013_01_01.log
2013-01-01 08:02:42.081:INFO::Started [email protected]:3343
2013-01-01 08:02:42.285:INFO::Started [email protected]:4434
2013-01-01 08:02:43.572:INFO:/csvn:Initializing Spring FrameworkServlet 'gsp'
2013-01-01 08:02:43.572:INFO:/csvn:GSP servlet initialized
2013-01-01 10:20:27,461 [qtp4612306-92] WARN console.OperatingSystemService - Testing for process '22276' failed with message: No such process
2013-01-01 10:20:31,513 [qtp4612306-95] ERROR console.CommandLineService - Exit status=1 Process err output: Syntax error on line 16 of /opt/csvn/data/conf/csvn_main_httpd.conf:
Error:\tApache has not been designed to serve pages while\n\trunning as root. There are known race conditions that\n\twill allow any local user to read any file on the system.\n\tIf you still desire to serve pages as root then\n\tadd -DBIG_SECURITY_HOLE to the CFLAGS env variable\n\tand then rebuild the server.\n\tIt is strongly suggested that you instead modify the User\n\tdirective in your httpd.conf file to list a non-root\n\tuser.\n
2013-01-01 10:20:31,514 [qtp4612306-95] WARN console.LifecycleService - Server start attempt failed with code=1
2013-01-01 10:20:31,514 [qtp4612306-95] WARN console.LifecycleService - Output:
2013-01-01 10:24:10.587:INFO::Graceful shutdown [email protected]:4434
2013-01-01 10:24:10.615:INFO::Graceful shutdown [email protected]:3343
2013-01-01 10:24:10.711:INFO::Graceful shutdown MovedContextHandler@17296ee@17296ee/,null
2013-01-01 10:24:10.711:INFO::Graceful shutdown WebAppContext@12fc9e@12fc9e/integration,file:/opt/csvn/appserver/work/Jetty_0_0_0_0_3343_integration.war__integration__gzh5bq/webapp/,/opt/csvn/appserver/webapps/integration.war
2013-01-01 10:24:10.711:INFO::Graceful shutdown WebAppContext@871745@871745/csvn,file:/opt/csvn/appserver/work/Jetty_0_0_0_0_3343_csvn.war__csvn__.1xntxq/webapp/,/opt/csvn/appserver/webapps/csvn.war
2013-01-01 10:24:11.767:INFO:/csvn:Destroying Spring FrameworkServlet 'gsp'
2013-01-01 10:24:13,849 [Thread-3] WARN executor.SessionBoundExecutorService - ExecutorService did not shutdown in 2 seconds. Forcing shutdown of any scheduled tasks
2013-01-01 10:24:23.063:INFO:/csvn:Destroying Spring FrameworkServlet 'grails'
2013-01-01 10:24:23.261:INFO:/csvn:Closing Spring root WebApplicationContext
2013-01-01 10:24:25.843:INFO::jetty-7.0.2.v20100331
2013-01-01 10:24:25.866:INFO::Deployment monitor /opt/csvn/appserver/contexts at interval 300
2013-01-01 10:24:25.869:INFO::Deployable added: /opt/csvn/appserver/contexts/redirect.xml
2013-01-01 10:24:25.959:INFO::Deployable added: /opt/csvn/appserver/contexts/integration.xml
2013-01-01 10:24:27,596 INFO [WrapperJarAppMain] com.vasoftware.sf.externalintegration.BootstrapServlet: Bootstrapping the Integration service for Subversion Edge at /opt/csvn
2013-01-01 10:24:27,958 WARN [WrapperJarAppMain] org.apache.axis.utils.JavaUtils: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
2013-01-01 10:24:28.117:INFO::Deployable added: /opt/csvn/appserver/contexts/csvn.xml
2013-01-01 10:24:39.028:INFO:/csvn:Initializing Spring root WebApplicationContext
loading security config ...
2013-01-01 10:25:00.931:INFO:/csvn:newClient: com.collabnet.svnedge.admin.PackagesUpdateService_gcr1y7g1qlo0
2013-01-01 10:25:00.932:INFO:/csvn:newChannel: /csvn-updates
2013-01-01 10:25:00.932:INFO:/csvn:newChannel: /csvn-updates/status
2013-01-01 10:25:00.932:INFO:/csvn:newChannel: /csvn-updates/percentages
2013-01-01 10:25:13.695:INFO:/csvn:Initializing Spring FrameworkServlet 'grails'
2013-01-01 10:25:13.992:INFO::Deployment monitor /opt/csvn/appserver/webapps at interval 300
2013-01-01 10:25:14.072:INFO::Opened /opt/csvn/data/logs/jetty_2013_01_01.log
2013-01-01 10:25:14.115:INFO::Started [email protected]:3343
2013-01-01 10:25:14.569:INFO::Started [email protected]:4434
2013-01-01 10:25:16.549:INFO:/csvn:Initializing Spring FrameworkServlet 'gsp'
2013-01-01 10:25:16.550:INFO:/csvn:GSP servlet initialized
2013-01-01 10:25:27,513 [qtp922883-80] ERROR statistics.NetworkStatisticsService - Byte values are decreasing instead of increasing. Cannot calculate rate.
2013-01-01 10:25:27,520 [qtp922883-80] ERROR statistics.NetworkStatisticsService - Byte values are decreasing instead of increasing. Cannot calculate rate.
2013-01-01 10:25:30,564 [qtp922883-87] ERROR console.CommandLineService - Exit status=1 Process err output: Syntax error on line 16 of /opt/csvn/data/conf/csvn_main_httpd.conf:
Error:\tApache has not been designed to serve pages while\n\trunning as root. There are known race conditions that\n\twill allow any local user to read any file on the system.\n\tIf you still desire to serve pages as root then\n\tadd -DBIG_SECURITY_HOLE to the CFLAGS env variable\n\tand then rebuild the server.\n\tIt is strongly suggested that you instead modify the User\n\tdirective in your httpd.conf file to list a non-root\n\tuser.\n
2013-01-01 10:25:30,568 [qtp922883-87] WARN console.LifecycleService - Server start attempt failed with code=1
2013-01-01 10:25:30,568 [qtp922883-87] WARN console.LifecycleService - Output:
2013-01-01 10:25:30,653 [qtp922883-86] ERROR statistics.NetworkStatisticsService - Byte values are decreasing instead of increasing. Cannot calculate rate.
2013-01-01 10:25:30,659 [qtp922883-86] ERROR statistics.NetworkStatisticsService - Byte values are decreasing instead of increasing. Cannot calculate rate.
2013-01-01 10:25:43,741 [qtp922883-81] ERROR console.CommandLineService - Exit status=1 Process err output: Syntax error on line 16 of /opt/csvn/data/conf/csvn_main_httpd.conf:
Error:\tApache has not been designed to serve pages while\n\trunning as root. There are known race conditions that\n\twill allow any local user to read any file on the system.\n\tIf you still desire to serve pages as root then\n\tadd -DBIG_SECURITY_HOLE to the CFLAGS env variable\n\tand then rebuild the server.\n\tIt is strongly suggested that you instead modify the User\n\tdirective in your httpd.conf file to list a non-root\n\tuser.\n
2013-01-01 10:25:43,742 [qtp922883-81] WARN console.LifecycleService - Server start attempt failed with code=1
2013-01-01 10:25:43,742 [qtp922883-81] WARN console.LifecycleService - Output:
2013-01-01 10:25:43,818 [qtp922883-85] ERROR statistics.NetworkStatisticsService - Byte values are decreasing instead of increasing. Cannot calculate rate.
2013-01-01 10:25:43,822 [qtp922883-85] ERROR statistics.NetworkStatisticsService - Byte values are decreasing instead of increasing. Cannot calculate rate.
我谷歌了一下,发现很多人说这是由于用户权限、所有权等原因。我已经完成了所有步骤,但尝试失败了。我期望有一个可靠的解决方案。请为我提供一个解决方案。
答案1
Apache 进程拒绝启动,因为/opt/csvn/data/conf/csvn_main_httpd.conf
第 16 行的配置要求 Web 服务器以 root 身份启动。这不是一件好事;错误消息明确表示,它不会使用此配置启动。
从应用程序的自述文件来看,它听起来像是尝试在运行启动命令的用户下启动;
5. Start the server. Be sure that you are logged in as your own userid and not running as root.
..也许它还csvn_main_httpd.conf
用正在运行的用户信息填充文件?尝试以其他用户身份启动它。
或者,我建议只使用 Apache +mod_dav_svn
来为您的 SVN 存储库提供服务。使用 jetty 服务启动 Apache 服务似乎不必要地复杂。
答案2
克服这种情况的一个简单方法是,不要安装 subversion edge,只使用启动服务器/csvn/bin/csvn start
。在大多数情况下,在使用 root 帐户安装 csvn 期间会发生此错误。这会以某种方式更改 conf 文件的 UID。