Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

PermissionError when loading existing Rails app #225

Closed
batasrki opened this issue Sep 29, 2015 · 2 comments
Closed

PermissionError when loading existing Rails app #225

batasrki opened this issue Sep 29, 2015 · 2 comments

Comments

@batasrki
Copy link

Hello,

I've a Rails app, version 4.2.4 and am trying to get it running with the latest release of Torquebox, 3.1.2. In my development environment, I'm running RVM, so I've decided to install TB as a gem.

I'm getting a PermissionError when trying to load anything from the app/assets directory. This includes an SCSS stylesheet, a local JS file application.js and an image.

I'm attaching a screenshot for posterity. I've checked directory permissions and I am the owner of the entire directory and all files in it. TB is run using bundle exec and it shows up in the process list as my process. There are no search results around this.

Thanks.

permerror

@bbrowning
Copy link
Member

Is there a complete stack trace from Rails for this? I haven't seen any users hit this before either, so I'm not sure what's going on.

@batasrki
Copy link
Author

I'm attaching the stack traces below. First one is Rails log output, second one is Torquebox log from startup.

Started GET "/" for 127.0.0.1 at 2015-09-29 20:52:55 -0400
Processing by MccsController#index as HTML
Completed 401 Unauthorized in 400ms (ActiveRecord: 0.0ms)

Started GET "/users/sign_in" for 127.0.0.1 at 2015-09-29 20:52:56 -0400
Processing by Users::SessionsController#new as HTML
   (3.0ms)  SELECT `hospitals`.`name`, `hospitals`.`id` FROM `hospitals`
  Rendered users/shared/_links.html.erb (6.0ms)
  Rendered users/sessions/new.html.erb within layouts/application (77.0ms)
Completed 500 Internal Server Error in 561ms (ActiveRecord: 20.0ms)

ActionView::Template::Error (Permission denied - Permission denied):
    3: <head>
    4:   <title>MindMerge</title>
    5:   <%= stylesheet_link_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/cupertino/jquery-ui.min.css", :media => "all" %>
    6:   <%= stylesheet_link_tag "application", :media => "all" %>
    7:   <%= javascript_include_tag "application" %>
    8:   <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js" %>
    9:   <%= csrf_meta_tags %>
  app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___342442044_5770'
  app/controllers/users/sessions_controller.rb:7:in `new'


  Rendered /home/srdjan/.rvm/gems/jruby-1.7.19/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_source.erb (21.0ms)
  Rendered /home/srdjan/.rvm/gems/jruby-1.7.19/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (7.0ms)
  Rendered /home/srdjan/.rvm/gems/jruby-1.7.19/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (4.0ms)
  Rendered /home/srdjan/.rvm/gems/jruby-1.7.19/gems/actionpack-4.2.4/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (49.0ms)
 bundle exec torquebox deploy && bundle exec torquebox run
Deployed: mindmerge-knob.yml
    into: /home/srdjan/.rvm/gems/jruby-1.7.19/gems/torquebox-server-3.1.2-java/jboss/standalone/deployments
Booting AS7 from configuration /home/srdjan/.rvm/gems/jruby-1.7.19/gems/torquebox-server-3.1.2-java/jboss/standalone/configuration/standalone.xml
/home/srdjan/.rvm/gems/jruby-1.7.19/gems/torquebox-server-3.1.2-java/jboss/bin/standalone.sh -Djruby.home=/home/srdjan/.rvm/rubies/jruby-1.7.19 --server-config=standalone.xml
JAVA_OPTS already set in environment; overriding default settings with values: -Xms2048m -Xmx2048m 
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/srdjan/.rvm/gems/jruby-1.7.19/gems/torquebox-server-3.1.2-java/jboss

  JAVA: /usr/lib/jvm/java-8-oracle/bin/java

  JAVA_OPTS:  -server -XX:+UseCompressedOops -Xms2048m -Xmx2048m 

=========================================================================

20:48:45,443 INFO  [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
20:48:45,686 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
20:48:46,134 INFO  [org.torquebox.bootstrap] (ServerService Thread Pool -- 16) Bootstrapping TorqueBox
20:48:46,136 INFO  [org.torquebox.bootstrap] (ServerService Thread Pool -- 16) Bootstrapping TorqueBox with a JRuby home of /home/srdjan/.rvm/rubies/jruby-1.7.19
20:48:46,408 INFO  [org.torquebox.services.as] (ServerService Thread Pool -- 6) Initializing TorqueBox Services Subsystem
20:48:46,411 INFO  [org.torquebox.jobs.as] (ServerService Thread Pool -- 10) Initializing TorqueBox Jobs Subsystem
20:48:46,410 INFO  [org.torquebox.messaging.as] (ServerService Thread Pool -- 19) Initializing TorqueBox Messaging Subsystem
20:48:46,409 INFO  [org.torquebox.web.as] (ServerService Thread Pool -- 8) Initializing TorqueBox Web Subsystem
20:48:46,409 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3) Initializing TorqueBox Core Subsystem
20:48:46,408 INFO  [org.torquebox.stomp.as] (ServerService Thread Pool -- 9) Initializing TorqueBox STOMP Subsystem
20:48:46,413 INFO  [org.torquebox.security.as] (ServerService Thread Pool -- 13) Initializing TorqueBox Auth Subsystem
20:48:46,441 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3) Welcome to TorqueBox AS - http://torquebox.org/
20:48:46,442 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3)   version........... 3.1.2
20:48:46,443 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3)   build............. 89
20:48:46,443 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3)   revision.......... f1a839e28f458433b59998e9ba4255caf5586295 +modifications
20:48:46,444 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3)   built with:
20:48:46,444 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3)     JBossAS......... 7.2.x.slim.incremental.16
20:48:46,444 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3)     HornetQ......... 2.3.1.Final (Wild Hornet, 123)
20:48:46,445 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3)     Infinispan...... 6.0.0.Final
20:48:46,445 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3)     Quartz.......... 2.1.5
20:48:46,445 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 3)     JRuby........... 1.7.19
20:48:46,702 WARN  [org.jboss.as.server] (Controller Boot Thread) JBAS015883: No security realm defined for native management service; all access will be unrestricted.
20:48:46,710 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
20:48:46,712 WARN  [org.jboss.as.server] (Controller Boot Thread) JBAS015884: No security realm defined for http management service; all access will be unrestricted.
20:48:46,712 INFO  [org.xnio] (MSC service thread 1-11) XNIO Version 3.0.7.GA
20:48:46,720 INFO  [org.xnio.nio] (MSC service thread 1-11) XNIO NIO Implementation Version 3.0.7.GA
20:48:46,731 INFO  [org.jboss.remoting] (MSC service thread 1-11) JBoss Remoting version 3.2.14.GA
20:48:46,791 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 30) JBAS011800: Activating Naming Subsystem
20:48:46,805 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 33) JBAS013171: Activating Security Subsystem
20:48:46,844 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.15.Final)
20:48:46,863 INFO  [org.jboss.as.security] (MSC service thread 1-4) JBAS013170: Current PicketBox version=4.0.15.Final
20:48:46,893 INFO  [org.jboss.as.remoting] (MSC service thread 1-10) JBAS017100: Listening on 127.0.0.1:9999
20:48:46,963 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service
20:48:47,070 WARN  [org.hornetq.journal] (MSC service thread 1-7) HQ142000: You have a native library with a different version than expected
20:48:47,079 WARN  [org.jboss.as.messaging] (MSC service thread 1-7) JBAS011600: AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
20:48:47,129 INFO  [org.torquebox.core.runtime] (pool-1-thread-1) Creating ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, context: global)
20:48:47,238 INFO  [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003001: Coyote HTTP/1.1 initializing on : http-localhost/127.0.0.1:8080
20:48:47,282 INFO  [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003000: Coyote HTTP/1.1 starting on: http-localhost/127.0.0.1:8080
20:48:47,238 INFO  [org.hornetq.core.server] (MSC service thread 1-6) HQ221000: live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=/home/srdjan/.rvm/gems/jruby-1.7.19/gems/torquebox-server-3.1.2-java/jboss/standalone/data/messagingjournal,bindingsDirectory=/home/srdjan/.rvm/gems/jruby-1.7.19/gems/torquebox-server-3.1.2-java/jboss/standalone/data/messagingbindings,largeMessagesDirectory=/home/srdjan/.rvm/gems/jruby-1.7.19/gems/torquebox-server-3.1.2-java/jboss/standalone/data/messaginglargemessages,pagingDirectory=/home/srdjan/.rvm/gems/jruby-1.7.19/gems/torquebox-server-3.1.2-java/jboss/standalone/data/messagingpaging)
20:48:47,353 INFO  [org.hornetq.core.server] (MSC service thread 1-6) HQ221006: Waiting to obtain live lock
20:48:47,409 INFO  [org.hornetq.core.server] (MSC service thread 1-6) HQ221013: Using NIO Journal
20:48:47,421 INFO  [org.jboss.as.remoting] (MSC service thread 1-9) JBAS017100: Listening on 127.0.0.1:4447
20:48:47,434 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /home/srdjan/.rvm/gems/jruby-1.7.19/gems/torquebox-server-3.1.2-java/jboss/standalone/deployments
20:48:47,446 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "mindmerge-knob.yml" (runtime-name: "mindmerge-knob.yml")
20:48:47,537 INFO  [org.infinispan.factories.GlobalComponentRegistry] (ServerService Thread Pool -- 46) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Final
20:48:47,564 INFO  [org.hornetq.core.server] (MSC service thread 1-6) HQ221034: Waiting to obtain live lock
20:48:47,565 INFO  [org.hornetq.core.server] (MSC service thread 1-6) HQ221035: Live Server Obtained live lock
20:48:47,766 INFO  [org.infinispan.jmx.CacheJmxRegistration] (ServerService Thread Pool -- 46) ISPN000031: MBeans were successfully registered to the platform MBean server.
20:48:47,772 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 46) JBAS010281: Started __recoveryInfoCacheName__ cache from polyglot container
20:48:47,787 INFO  [org.infinispan.jmx.CacheJmxRegistration] (ServerService Thread Pool -- 46) ISPN000031: MBeans were successfully registered to the platform MBean server.
20:48:47,788 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 46) JBAS010281: Started sessions cache from polyglot container
20:48:47,847 INFO  [org.hornetq.core.server] (MSC service thread 1-6) HQ221020: Started Netty Acceptor version 3.6.2.Final-c0d783c 127.0.0.1:5455 for CORE protocol
20:48:47,849 INFO  [org.hornetq.core.server] (MSC service thread 1-6) HQ221020: Started Netty Acceptor version 3.6.2.Final-c0d783c 127.0.0.1:5445 for CORE protocol
20:48:47,852 INFO  [org.hornetq.core.server] (MSC service thread 1-6) HQ221007: Server is now live
20:48:47,852 INFO  [org.hornetq.core.server] (MSC service thread 1-6) HQ221001: HornetQ Server version 2.3.1.Final (Wild Hornet, 123) [27a4df3b-663e-11e5-8764-75e79c22c456] 
20:48:47,886 INFO  [org.jboss.as.messaging] (ServerService Thread Pool -- 46) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
20:48:47,888 INFO  [org.jboss.as.messaging] (ServerService Thread Pool -- 47) JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory
20:48:47,942 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-4) JBAS010406: Registered connection factory java:/JmsXA
20:48:47,983 INFO  [org.hornetq.ra] (MSC service thread 1-4) HornetQ resource adaptor started
20:48:47,985 INFO  [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-4) IJ020002: Deployed: file://RaActivatorhornetq-ra
20:48:47,988 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-4) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]
20:48:50,124 INFO  [org.torquebox.core.runtime] (pool-1-thread-1) Created ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, context: global) in 2.99s
20:48:50,572 INFO  [org.hornetq.core.server] (pool-5-thread-1) HQ221003: trying to deploy queue jms.queue./queues/torquebox/mindmerge/tasks/torquebox_backgroundable
20:48:50,583 INFO  [org.jboss.as.messaging] (pool-5-thread-1) JBAS011601: Bound messaging object to jndi name java:/queues/torquebox/mindmerge/tasks/torquebox_backgroundable
20:48:50,650 INFO  [org.torquebox.core.runtime.DefaultRubyRuntimePool] (pool-1-thread-3) Deferring start for messaging runtime pool.
20:48:50,648 INFO  [org.torquebox.core.runtime.DefaultRubyRuntimePool] (pool-1-thread-1) Deferring start for jobs runtime pool.
20:48:50,658 INFO  [org.torquebox.core.runtime] (pool-1-thread-2) Creating ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, app: mindmerge, context: web)
20:48:50,730 INFO  [org.quartz.impl.StdSchedulerFactory] (MSC service thread 1-10) Using default implementation for ThreadExecutor
20:48:50,768 INFO  [org.quartz.core.SchedulerSignalerImpl] (MSC service thread 1-10) Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
20:48:50,769 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-10) Quartz Scheduler v.2.1.5 created.
20:48:50,770 INFO  [org.quartz.simpl.RAMJobStore] (MSC service thread 1-10) RAMJobStore initialized.
20:48:50,771 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-10) Scheduler meta-data: Quartz Scheduler (v2.1.5) 'jboss.deployment.unit."mindmerge-knob.yml".job_scheduler' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 3 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.

20:48:50,772 INFO  [org.quartz.impl.StdSchedulerFactory] (MSC service thread 1-10) Quartz scheduler 'jboss.deployment.unit."mindmerge-knob.yml".job_scheduler' initialized from an externally provided properties instance.
20:48:50,772 INFO  [org.quartz.impl.StdSchedulerFactory] (MSC service thread 1-10) Quartz scheduler version: 2.1.5
20:48:50,772 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-10) JobFactory set to: org.torquebox.jobs.JobScheduler@326c0715
20:48:50,773 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread 1-10) Scheduler jboss.deployment.unit."mindmerge-knob.yml".job_scheduler_$_NON_CLUSTERED started.
20:48:51,132 INFO  [org.torquebox.core.runtime] (pool-1-thread-2) Setting up Bundler
20:48:55,592 ERROR [stderr] (pool-1-thread-2) NOTE: ActiveRecord 4.2 is not (yet) fully supported by AR-JDBC, please help us finish 4.2 support - check http://bit.ly/jruby-42 for starters
20:48:59,387 INFO  [org.torquebox.core.runtime] (pool-1-thread-2) Created ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, app: mindmerge, context: web) in 8.72s
20:48:59,402 INFO  [org.jboss.web] (ServerService Thread Pool -- 46) JBAS018210: Register web context: 
20:48:59,585 INFO  [org.jboss.as.server.deployment] (ServerService Thread Pool -- 24) JBAS018559: Deployed "mindmerge-knob.yml" (runtime-name : "mindmerge-knob.yml")
20:48:59,594 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
20:48:59,594 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015954: Admin console is not enabled
20:48:59,594 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.2.x.slim.incremental.16 "Janus" started in 14590ms - Started 145 of 213 services (67 services are passive or on-demand)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants