0

这是我在应用程序文件夹中的文件:

# app.rb
require 'sinatra'

get '/' do
  "Hello World!"
end

# config.ru
require './app'

run Sinatra::Application

我已经安装了扭矩箱:gem install torquebox-server -v 3.1.2

当我运行时,torquebox run -b 0.0.0.0我看到很多输出,但似乎开始正常。

[WARNING] torquebox-knob.yml has not been deployed. Starting TorqueBox anyway.
Booting AS7 from configuration /home/qaexpert/.rvm/gems/jruby-1.7.19@global/gems/torquebox-server-3.1.2-java/jboss/standalone/configuration/standalone.xml
/home/qaexpert/.rvm/gems/jruby-1.7.19@global/gems/torquebox-server-3.1.2-java/jboss/bin/standalone.sh -Djruby.home=/home/qaexpert/.rvm/rubies/jruby-1.7.19 --server-config=standalone.xml -b 0.0.0.0
JAVA_OPTS already set in environment; overriding default settings with values: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4St
ack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/qaexpert/.rvm/gems/jruby-1.7.19@global/gems/torquebox-server-3.1.2-java/jboss

  JAVA: java

  JAVA_OPTS:  -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

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

17:32:40,686 INFO  [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1
17:32:40,836 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA
17:32:41,263 INFO  [org.torquebox.bootstrap] (ServerService Thread Pool -- 13) Bootstrapping TorqueBox
17:32:41,264 INFO  [org.torquebox.bootstrap] (ServerService Thread Pool -- 13) Bootstrapping TorqueBox with a JRuby home of /home/qaexpert/.rvm/rubies/jruby-1.7.19
17:32:41,460 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11) Initializing TorqueBox Core Subsystem
17:32:41,463 INFO  [org.torquebox.services.as] (ServerService Thread Pool -- 18) Initializing TorqueBox Services Subsystem
17:32:41,464 INFO  [org.torquebox.web.as] (ServerService Thread Pool -- 20) Initializing TorqueBox Web Subsystem
17:32:41,467 INFO  [org.torquebox.stomp.as] (ServerService Thread Pool -- 19) Initializing TorqueBox STOMP Subsystem
17:32:41,474 INFO  [org.torquebox.messaging.as] (ServerService Thread Pool -- 9) Initializing TorqueBox Messaging Subsystem
17:32:41,476 INFO  [org.torquebox.security.as] (ServerService Thread Pool -- 10) Initializing TorqueBox Auth Subsystem
17:32:41,476 INFO  [org.torquebox.jobs.as] (ServerService Thread Pool -- 16) Initializing TorqueBox Jobs Subsystem
17:32:41,492 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11) Welcome to TorqueBox AS - http://torquebox.org/
17:32:41,493 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11)   version........... 3.1.2
17:32:41,493 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11)   build............. 89
17:32:41,493 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11)   revision.......... f1a839e28f458433b59998e9ba4255caf5586295 + modifications
17:32:41,494 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11)   built with:
17:32:41,494 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11)     HornetQ......... 2.3.1.Final (Wild Hornet, 123)
17:32:41,494 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11)     JBossAS......... 7.2.x.slim.incremental.16
17:32:41,495 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11)     Infinispan...... 6.0.0.Final
17:32:41,495 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11)     Quartz.......... 2.1.5
17:32:41,495 INFO  [org.torquebox.core.as] (ServerService Thread Pool -- 11)     JRuby........... 1.7.19
17:32:41,620 WARN  [org.jboss.as.server] (Controller Boot Thread) JBAS015883: No security realm defined for native management service; all access will be unrestricted.
17:32:41,624 INFO  [org.xnio] (MSC service thread 1-16) XNIO Version 3.0.7.GA
17:32:41,627 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
17:32:41,627 WARN  [org.jboss.as.server] (Controller Boot Thread) JBAS015884: No security realm defined for http management service; all access will be unrestricted.
17:32:41,630 INFO  [org.xnio.nio] (MSC service thread 1-16) XNIO NIO Implementation Version 3.0.7.GA
17:32:41,638 INFO  [org.jboss.remoting] (MSC service thread 1-16) JBoss Remoting version 3.2.14.GA
17:32:41,663 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 30) JBAS011800: Activating Naming Subsystem
17:32:41,664 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 33) JBAS013171: Activating Security Subsystem
17:32:41,667 INFO  [org.jboss.as.security] (MSC service thread 1-1) JBAS013170: Current PicketBox version=4.0.15.Final
17:32:41,695 INFO  [org.jboss.as.remoting] (MSC service thread 1-16) JBAS017100: Listening on 127.0.0.1:9999
17:32:41,708 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service
17:32:41,711 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.15.Final)
17:32:41,806 WARN  [org.jboss.as.messaging] (MSC service thread 1-13) 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
17:32:41,850 INFO  [org.hornetq.core.server] (MSC service thread 1-12) HQ221000: live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=/home/qaexpert/.rvm/gems/jruby-1.7.19@global/gems/torquebox-server-3.1.2-java/jboss/standalone/data/messagingjournal,bindingsDirectory=/home/qaexpert/.rvm/gems/jruby-1.7.19@global/gems/torquebox-server-3.1.2-java/jboss/standalone/data/messagingbindings,largeMessagesDirectory=/home/qaexpert/.rvm/gems/jruby-1.7.19@global/gems/torquebox-server-3.1.2-java/jboss/standalone/data/messaginglargemessages,pagingDirectory=/home/qaexpert/.rvm/gems/jruby-1.7.19@global/gems/torquebox-server-3.1.2-java/jboss/standalone/data/messagingpaging)
17:32:41,852 INFO  [org.hornetq.core.server] (MSC service thread 1-12) HQ221006: Waiting to obtain live lock
17:32:41,866 INFO  [org.apache.coyote.http11] (MSC service thread 1-3) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/0.0.0.0:8080
17:32:41,874 INFO  [org.torquebox.core.runtime] (pool-2-thread-1) Creating ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, context: global)
17:32:41,875 INFO  [org.apache.coyote.http11] (MSC service thread 1-3) JBWEB003000: Coyote HTTP/1.1 starting on: http-/0.0.0.0:8080
17:32:41,879 INFO  [org.hornetq.core.server] (MSC service thread 1-12) HQ221013: Using NIO Journal
17:32:42,009 INFO  [org.infinispan.factories.GlobalComponentRegistry] (ServerService Thread Pool -- 46) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.0.0.Final
17:32:42,010 INFO  [org.hornetq.core.server] (MSC service thread 1-12) HQ221034: Waiting to obtain live lock
17:32:42,011 INFO  [org.hornetq.core.server] (MSC service thread 1-12) HQ221035: Live Server Obtained live lock
17:32:42,020 INFO  [org.jboss.as.remoting] (MSC service thread 1-13) JBAS017100: Listening on 0.0.0.0:4447
17:32:42,029 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-13) JBAS015012: Started FileSystemDeploymentService for directory /home/qaexpert/.rvm/gems/jruby-1.7.19@global/gems/torquebox-server-3.1.2-java/jboss/standalone/deployments
17:32:42,243 INFO  [org.infinispan.jmx.CacheJmxRegistration] (ServerService Thread Pool -- 46) ISPN000031: MBeans were successfully registered to the platform MBean server.
17:32:42,245 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 46) JBAS010281: Started __recoveryInfoCacheName__ cache from polyglot container
17:32:42,257 INFO  [org.infinispan.jmx.CacheJmxRegistration] (ServerService Thread Pool -- 46) ISPN000031: MBeans were successfully registered to the platform MBean server.
17:32:42,257 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 46) JBAS010281: Started sessions cache from polyglot container
17:32:42,627 INFO  [org.hornetq.core.server] (MSC service thread 1-12) HQ221020: Started Netty Acceptor version 3.6.2.Final-c0d783c 0.0.0.0:5455 for CORE protocol
17:32:42,628 INFO  [org.hornetq.core.server] (MSC service thread 1-12) HQ221020: Started Netty Acceptor version 3.6.2.Final-c0d783c 0.0.0.0:5445 for CORE protocol
17:32:42,629 INFO  [org.hornetq.core.server] (MSC service thread 1-12) HQ221007: Server is now live
17:32:42,630 INFO  [org.hornetq.core.server] (MSC service thread 1-12) HQ221001: HornetQ Server version 2.3.1.Final (Wild Hornet, 123) [eebc3d45-28c9-11e6-bf7b-df76385dd6dc]
17:32:42,651 INFO  [org.jboss.as.messaging] (ServerService Thread Pool -- 46) JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory
17:32:42,654 INFO  [org.hornetq.jms.server] (ServerService Thread Pool -- 47) HQ121005: Invalid "host" value "0.0.0.0" detected for "netty" connector. Switching to "sg1.msk.bonasource.ru". If this new address is incorrect please manually configure the connector to use the proper one.
17:32:42,655 INFO  [org.jboss.as.messaging] (ServerService Thread Pool -- 47) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
17:32:42,695 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-16) JBAS010406: Registered connection factory java:/JmsXA
17:32:42,719 INFO  [org.hornetq.ra] (MSC service thread 1-16) HornetQ resource adaptor started
17:32:42,719 INFO  [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-16) IJ020002: Deployed: file://RaActivatorhornetq-ra
17:32:42,721 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-5) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]
17:32:43,757 ERROR [stderr] (pool-2-thread-1) io/console not supported; tty will not be manipulated
17:32:44,202 INFO  [org.torquebox.core.runtime] (pool-2-thread-1) Created ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, context: global) in 2.32s
17:32:44,295 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
17:32:44,295 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015954: Admin console is not enabled
17:32:44,296 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.2.x.slim.incremental.16 "Janus" started in 3865ms - Started 104 of 156 services (52 services are passive or on-demand)

当我访问 localhost:8080 我得到 404。为什么?如何解决?

4

0 回答 0