-6

I'm having real difficulty with a server on our load balance cluster and cant understand why. In the catalina log the following appears. It had been another site before and I removed it to see if that was the problem but now its a different site.

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.
user3385136
  • 121
  • 1
  • 5
  • Errno::EACCES: Permission denied - /var/lib/tomcat8/enterprise/ROOT/WEB-INF/log – Froggiz Nov 12 '15 at 17:03
  • Maybe you removed this folder and it is no more existing, or you don't have enought rights to write into it – Froggiz Nov 12 '15 at 17:04
  • 1
    You forgot to ask a question. What's your question exactly? And why did you stop in the middle of describing the problem? (Does the file referred to in the error message exist? What are its permissions? Etcetera.) – David Schwartz Nov 12 '15 at 17:09

1 Answers1

3

Permission denied - /var/lib/tomcat8/enterprise/ROOT/WEB-INF/log

and

Errno::EACCES: Permission denied - /var/lib/tomcat8/enterprise/ROOT/WEB-INF/log

I would work on clearing those first. Who knows it may solve the problem.

Perhaps

mkdir -p  /var/lib/tomcat8/enterprise/ROOT/WEB-INF/log

would be a place to start

user9517
  • 114,104
  • 20
  • 206
  • 289
  • this answer has already been given in comment – Froggiz Nov 12 '15 at 17:16
  • 3
    @Froggiz - it's not an answer then is it. Comments are for erm comments, answers are for answers – user9517 Nov 12 '15 at 17:16
  • Cheers to Iain and Froggiz for the help. It was a case of accidentally restarting tomcat as root which meant all files were ownder by root rather than tomcat user. Anyway hope it hasnt caused too much bother. – user3385136 Nov 12 '15 at 18:08