Akka IO演员Akka死信

时间:2015-03-05 04:38:32

标签: postgresql io debian sbt akka

StackOverflow上的第一个问题!

无论如何,关于手头的话题:

我安装了Debian 8.0(Jessie或测试版)。出于某种原因,我让eve-central.com的API在某种程度上变得时髦,因为它不是从我服务器上的另一个脚本抓取发布的数据并将其放入PostgreSQL,它基本上是错误并继续运行,但是没有从其他脚本导入数据。

root@MN-VM-Host01:~/evec/core# sbt run
[info] Loading project definition from /root/evec/core/project
[info] Set current project to eve-central-ng (in build file:/root/evec/core/)
[info] Running com.evecentral.Boot
22:27:25,422 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
22:27:25,423 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
22:27:25,423 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/root/evec/core/target/scala-2.10/classes/logback.xml]
22:27:25,501 |-INFO in ReconfigureOnChangeFilter{invocationCounter=0} - Will scan for changes in [[/root/evec/core/target/scala-2.10/classes/logback.xml]] every 60 seconds.
22:27:25,501 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter
22:27:25,502 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
22:27:25,506 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
22:27:25,531 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
22:27:25,571 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
22:27:25,574 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
22:27:25,600 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@22:14 - no applicable action for [maxHistory], current pattern is [[configuration][appender][rollingPolicy][timeBasedFileNamingAndTriggeringPolicy][maxHistory]]
22:27:25,606 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used
22:27:25,608 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern logs/evec.log-%d{yyyy-MM-dd}.%i for the active file
22:27:25,611 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6a158dc7 - The date pattern is 'yyyy-MM-dd' from file name pattern 'logs/evec.log-%d{yyyy-MM-dd}.%i'.
22:27:25,611 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6a158dc7 - Roll-over at midnight.
22:27:25,615 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6a158dc7 - Setting initial period to Wed Mar 04 22:00:47 CST 2015
22:27:25,617 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Cleaning on start up
22:27:25,617 |-INFO in ch.qos.logback.core.rolling.helper.SizeAndTimeBasedArchiveRemover@296d1f3f - first clean up after appender initialization
22:27:25,617 |-INFO in ch.qos.logback.core.rolling.helper.SizeAndTimeBasedArchiveRemover@296d1f3f - periodsElapsed = 64
22:27:25,625 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
22:27:25,626 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: logs/evec.log
22:27:25,626 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [logs/evec.log]
22:27:25,627 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [cc.spray.can] to INFO
22:27:25,628 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
22:27:25,628 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
22:27:25,628 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
22:27:25,630 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1a936409 - Registering current configuration as safe fallback point
22:27:25,422 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
22:27:25,423 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
22:27:25,423 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/root/evec/core/target/scala-2.10/classes/logback.xml]
22:27:25,501 |-INFO in ReconfigureOnChangeFilter{invocationCounter=0} - Will scan for changes in [[/root/evec/core/target/scala-2.10/classes/logback.xml]] every 60 seconds.
22:27:25,501 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter
22:27:25,502 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
22:27:25,506 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
22:27:25,531 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
22:27:25,571 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
22:27:25,574 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
22:27:25,600 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@22:14 - no applicable action for [maxHistory], current pattern is [[configuration][appender][rollingPolicy][timeBasedFileNamingAndTriggeringPolicy][maxHistory]]
22:27:25,606 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used
22:27:25,608 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern logs/evec.log-%d{yyyy-MM-dd}.%i for the active file
22:27:25,611 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6a158dc7 - The date pattern is 'yyyy-MM-dd' from file name pattern 'logs/evec.log-%d{yyyy-MM-dd}.%i'.
22:27:25,611 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6a158dc7 - Roll-over at midnight.
22:27:25,615 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6a158dc7 - Setting initial period to Wed Mar 04 22:00:47 CST 2015
22:27:25,617 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Cleaning on start up
22:27:25,617 |-INFO in ch.qos.logback.core.rolling.helper.SizeAndTimeBasedArchiveRemover@296d1f3f - first clean up after appender initialization
22:27:25,617 |-INFO in ch.qos.logback.core.rolling.helper.SizeAndTimeBasedArchiveRemover@296d1f3f - periodsElapsed = 64
22:27:25,625 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
22:27:25,626 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: logs/evec.log
22:27:25,626 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [logs/evec.log]
22:27:25,627 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [cc.spray.can] to INFO
22:27:25,628 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
22:27:25,628 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
22:27:25,628 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
22:27:25,630 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@1a936409 - Registering current configuration as safe fallback point

[INFO] [03/04/2015 22:27:26.778] [evec-akka.actor.default-dispatcher-2] [akka://evec/user/IO-HTTP/listener-0] Bound to /0.0.0.0:80
[INFO] [03/04/2015 22:27:26.780] [evec-akka.actor.default-dispatcher-4] [akka://evec/deadLetters] Message [akka.io.Tcp$Bound] from Actor[akka://evec/user/IO-HTTP/listener-0#417259830] to Actor[akka://evec/deadLetters] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.

我正在使用SBT版本0.13.6,我清楚地记得像Akka Actors 2.3.5这样的东西打破了整个事情......在Debian 8中有没有办法恢复说,2.1.4?

编辑:以下是Boot.Scala的内容(由我执行命令" sbt run"在标记目录中现在位于/ evec / core /处调用的文件):

package com.evecentral

import akka.actor.{Actor, ActorSystem, Props}
import akka.io.IO
import akka.routing.SmallestMailboxRouter
import akka.util.Timeout
import com.evecentral.api._
import com.evecentral.dataaccess._
import com.evecentral.datainput.{StatisticsCaptureActor, UnifiedUploadParsingActor, UploadStorageActor}
import com.evecentral.routes.RouteFinderActor
import com.evecentral.util.ActorNames
import com.typesafe.config.ConfigFactory
import org.slf4j.LoggerFactory
import spray.can.Http
import spray.http.StatusCodes._
import spray.routing._
import spray.routing.Directives.{complete, requestUri}
import spray.util.LoggingContext

import scala.concurrent.duration._

object Boot extends App {

  val config = ConfigFactory.load()
  val system = ActorSystem("evec")

  val systemsMap = StaticProvider.systemsMap
  val stationsMAp = StaticProvider.stationsMap
  val typesMap = StaticProvider.typesMap
  LoggerFactory.getLogger(getClass)
  val log = LoggerFactory.getLogger("boot")
  // initialize SLF4J early


  // "Singleton" actors
  log.info("Booting GetOrdersActor")
  val ordersActor = system.actorOf(Props[GetOrdersActor].withRouter(new SmallestMailboxRouter(10)), ActorNames.getorders)
  log.info("Booting GetHistStats")
  val gethiststats = system.actorOf(Props[GetHistStats], ActorNames.gethiststats)
  log.info("Booting StatisticsCaptureActor")
  val statCap = system.actorOf(Props[StatisticsCaptureActor], ActorNames.statCapture)
  log.info("Booting UploadStorageActor")
  val unifiedActor = system.actorOf(Props[UploadStorageActor].withRouter(new SmallestMailboxRouter(3)), ActorNames.uploadstorage)
  log.info("Booting RouteActor")
  val routeActor = system.actorOf(Props[RouteFinderActor], ActorNames.routefinder)
  log.info("Booting OrderCacheActor")
  val statCache = system.actorOf(Props[OrderCacheActor], ActorNames.statCache)
  log.info("Booting UnifiedUploadParsingActor")
  val parser = system.actorOf(Props[UnifiedUploadParsingActor].withRouter(new SmallestMailboxRouter(10)), ActorNames.unifiedparser)

  def catchAllHandler() =
    ExceptionHandler {
      case e: Exception =>
        requestUri { uri =>
          log.error("Exception at URI " + uri, e)
          complete(InternalServerError, "An internal error occurred. Here is a debugging stacktrace. \n" +
            "Please report issues to https://github.com/theatrus/eve-central.com\n\n" + e.getStackTraceString)
        }
    }


  class APIServiceActor extends Actor with APIv2Service with APIv3Service {
    def actorRefFactory = context
    implicit val route = RoutingSettings.default
    implicit val exception = ExceptionHandler.default
    def receive = runRoute(handleExceptions(catchAllHandler()) { v2Service ~ api3Service })

    override implicit val timeout: Timeout = 60.seconds
  }
  log.info("Booting APIServiceActor")
  val apiModule = system.actorOf(Props[APIServiceActor].withRouter(new SmallestMailboxRouter(10)), ActorNames.http_apiv3)

  IO(Http)(system) ! Http.Bind(apiModule, interface = "0.0.0.0", port = 80)

}

0 个答案:

没有答案