我在我们的负载平衡集群上的一台服务器上遇到了真正的困难,但无法理解原因。在 catalina 日志中出现以下内容。之前是另一个站点,我将其删除以查看是否是问题所在,但现在是另一个站点。
12-Nov-2015 16:52:13.839 INFO [secure.enterprisecreditunion.org-startStop-1] org.apache.catalina.core.ApplicationContext.log INFO: using a shared (threadsafe!) runtime
12-Nov-2015 16:52:32.492 INFO [secure.enterprisecreditunion.org-startStop-1] org.apache.catalina.core.ApplicationContext.log An exception happened during JRuby-Rack startup
Permission denied - /var/lib/tomcat8/enterprise/ROOT/WEB-INF/log
--- System
jruby 1.7.18 (1.9.3p551) 2014-12-22 625381c on OpenJDK 64-Bit Server VM 1.7.0_75-b13 +jit [linux-amd64]
Time: 2015-11-12 16:52:32 +0000
Server: Apache Tomcat/8.0.18
jruby.home: file:/var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home
--- Context Init Parameters:
jruby.compat.version = 1.9
public.root = /
rack.env = production
--- Backtrace
Errno::EACCES: Permission denied - /var/lib/tomcat8/enterprise/ROOT/WEB-INF/log
mkdir at org/jruby/RubyDir.java:443
fu_mkdir at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:247
mkdir_p at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:221
reverse_each at org/jruby/RubyArray.java:1693
mkdir_p at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:219
each at org/jruby/RubyArray.java:1613
mkdir_p at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:205
setup! at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/logger.rb:305
logger at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/logger.rb:278
logger at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/logger.rb:16
load! at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/loader.rb:55
(root) at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/config/boot.rb:8
require at org/jruby/RubyKernel.java:1071
(root) at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
require at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55
instance_eval at org/jruby/RubyBasicObject.java:1533
(root) at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/config.ru:5
initialize at /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/rack-1.5.2/lib/rack/builder.rb:55
--- RubyGems
Gem.dir: /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems
Gem.path:
/var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems
Activated gems:
rack-1.5.2
bundler-1.9.2
rake-10.4.2
i18n-0.7.0
json-1.8.2-java
minitest-5.6.0
thread_safe-0.3.5-java
tzinfo-1.2.2
activesupport-4.2.1
bcrypt-3.1.10-java
colorize-0.7.7
net-ssh-2.9.2
net-scp-1.2.1
sshkit-1.7.1
capistrano-3.0.1
capistrano-bundler-1.1.2
capistrano-rbenv-2.0.1
ffi-1.9.8-java
childprocess-0.5.6
choice-0.2.0
dbd-jdbc-0.1.6-java
pdf-core-0.2.5
ttfunk-1.2.2
prawn-1.2.1
dberkom-sinatra-prawn-0.9.2.2
deprecated-2.0.1
dbi-0.4.5
tilt-1.4.1
haml-4.0.6
url_mount-0.2.1
http_router-0.11.1
iso_country_codes-0.6.1
jdbc-jtds-1.3.0.1
jruby-jars-1.7.15
jruby-openssl-0.9.7-java
mime-types-1.25.1
polyglot-0.3.5
treetop-1.4.15
mail-2.5.4
mizuno-0.6.9
moneta-0.7.20
multipart-post-2.0.0
padrino-support-0.12.5
rack-protection-1.5.3
sinatra-1.4.6
thor-0.19.1
padrino-core-0.12.5
padrino-helpers-0.12.5
padrino-admin-0.12.5
padrino-cache-0.12.5
padrino-gen-0.12.5
padrino-mailer-0.12.5
padrino-0.12.5
padrino-flash-0.2.0
pdfkit-0.8.2
prawn-table-0.1.2
rubyzip-0.9.9
sass-3.4.13
sinatra-flash-0.3.0
--- Bundler
Bundler.bundle_path: /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems
Bundler.root: /var/lib/tomcat8/enterprise/ROOT/WEB-INF
Gemfile: /var/lib/tomcat8/enterprise/ROOT/WEB-INF/Gemfile
Settings:
gemfile = /var/lib/tomcat8/enterprise/ROOT/WEB-INF/Gemfile
without = development:test:assets
bin_path = /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/bundler-1.9.2/bin/bundle
--- JRuby-Rack Config
compat_version = RUBY1_9
default_logger = org.jruby.rack.logging.StandardOutLogger@1c8dbd49
equals = <error: >
err = org.apache.tomcat.util.log.SystemLogHandler@78b1d3
filter_adds_html = true
filter_verifies_resource = false
ignore_environment = false
initial_memory_buffer_size =
initial_runtimes =
jms_connection_factory =
jms_jndi_properties =
logger = org.jruby.rack.logging.ServletContextLogger@3bf8b26a
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_memory_buffer_size =
maximum_runtimes =
num_initializer_threads =
out = org.apache.tomcat.util.log.SystemLogHandler@64c50834
rackup =
rackup_path =
rewindable = true
runtime_arguments =
runtime_environment =
runtime_timeout_seconds =
serial_initialization = false
servlet_context = org.apache.catalina.core.ApplicationContextFacade@75d74400
throw_init_exception = false
12-Nov-2015 16:52:32.493 SEVERE [secure.enterprisecreditunion.org-startStop-1] org.apache.catalina.core.ApplicationContext.log ERROR: initialization failed
org.jruby.rack.RackInitializationException: Permission denied - /var/lib/tomcat8/enterprise/ROOT/WEB-INF/log
from org/jruby/RubyDir.java:443:in `mkdir'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:247:in `fu_mkdir'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:221:in `mkdir_p'
from org/jruby/RubyArray.java:1693:in `reverse_each'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:219:in `mkdir_p'
from org/jruby/RubyArray.java:1613:in `each'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:205:in `mkdir_p'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/logger.rb:305:in `setup!'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/logger.rb:278:in `logger'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/logger.rb:16:in `logger'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/loader.rb:55:in `load!'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/config/boot.rb:8:in `(root)'
from org/jruby/RubyKernel.java:1071:in `require'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1:in `(root)'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
from org/jruby/RubyBasicObject.java:1533:in `instance_eval'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/config.ru:5:in `(root)'
from /var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
at org.jruby.rack.RackInitializationException.wrap(RackInitializationException.java:29)
at org.jruby.rack.RackApplicationFactoryDecorator.init(RackApplicationFactoryDecorator.java:104)
at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:50)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4720)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jruby.exceptions.RaiseException: (EACCES) Permission denied - /var/lib/tomcat8/enterprise/ROOT/WEB-INF/log
at org.jruby.RubyDir.mkdir(org/jruby/RubyDir.java:443)
at RUBY.fu_mkdir(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:247)
at RUBY.mkdir_p(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:221)
at org.jruby.RubyArray.reverse_each(org/jruby/RubyArray.java:1693)
at RUBY.mkdir_p(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:219)
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)
at RUBY.mkdir_p(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/1.9/fileutils.rb:205)
at RUBY.setup!(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/logger.rb:305)
at RUBY.logger(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/logger.rb:278)
at RUBY.logger(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/logger.rb:16)
at RUBY.load!(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/padrino-core-0.12.5/lib/padrino-core/loader.rb:55)
at RUBY.(root)(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/config/boot.rb:8)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1071)
at RUBY.(root)(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1)
at RUBY.require(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/lib/jruby-stdlib-1.7.18.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55)
at org.jruby.RubyBasicObject.instance_eval(org/jruby/RubyBasicObject.java:1533)
at RUBY.(root)(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/config.ru:5)
at RUBY.initialize(/var/lib/tomcat8/enterprise/ROOT/WEB-INF/gems/gems/rack-1.5.2/lib/rack/builder.rb:55)
12-Nov-2015 16:52:32.503 SEVERE [secure.enterprisecreditunion.org-startStop-1] org.apache.jasper.EmbeddedServletOptions.<init> The scratchDir you specified: /var/lib/tomcat8/work/Catalina/secure.enterprisecreditunion.org/ROOT is unusable.
答案1
权限被拒绝-/var/lib/tomcat8/enterprise/ROOT/WEB-INF/log
和
Errno::EACCES:权限被拒绝-/var/lib/tomcat8/enterprise/ROOT/WEB-INF/log
我会先解决这些问题。谁知道这是否能解决问题呢。
也许
mkdir -p /var/lib/tomcat8/enterprise/ROOT/WEB-INF/log
是一个开始的地方