InnovaCo / hyper-facade

Other
1 stars 0 forks source link

Запросы через WS не отрабатывают #21

Closed maqdev closed 8 years ago

maqdev commented 8 years ago
  1. При выполнении GET запроса через WS, посылаю такую команду:
{"request":{"uri":{"pattern":"/revault/content/abc"},"headers":{"method":["get"],"messageId":["100500"]}},"body":null}

В ответ ничего не получаю, в логах ошибка:

[WARN] [03/13/2016 23:15:13.439] [Inn-akka.actor.default-dispatcher-3] [akka://Inn/user/simple-service-actor/wrkr-4/Subscr-100500] event eu.inn.hyperbus.model.DynamicRequest[eu.inn.hyperbus.model.DynamicBodyContainer]:{"request":{"uri":{"pattern":"/revault/content/abc"},"headers":{"method":["get"],"messageId":["100500"]}},"body":{"http_x_forwarded_for":"/127.0.0.1:49723"}} will be dropped because resource state is not fetched yet
  1. При выполнении SUBSCRIBE запроса через WS, посылаю команду:
{"request":{"uri":{"pattern":"/revault/content/abc"},"headers":{"method":["subscribe"],"messageId":["100500"]}},"body":null}

В ответ ничего не получаю, в логах ошибка:

scala.MatchError: ParameterToken(path,PathMatchType) (of class eu.inn.hyperbus.transport.api.uri.ParameterToken)
    at eu.inn.facade.raml.UriMatcher$.matchUri(UriMatcher.scala:35)
    at eu.inn.facade.raml.RamlConfig$$anonfun$matchUri$2.apply(RamlConfig.scala:23)
    at eu.inn.facade.raml.RamlConfig$$anonfun$matchUri$2.apply(RamlConfig.scala:22)
    at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:778)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:777)
    at eu.inn.facade.raml.RamlConfig.matchUri(RamlConfig.scala:22)
    at eu.inn.facade.raml.RamlConfig.resourceUri(RamlConfig.scala:14)
    at eu.inn.facade.events.FeedSubscriptionActor.fetchResource(FeedSubscriptionActor.scala:106)
    at eu.inn.facade.events.FeedSubscriptionActor$$anonfun$filterAndSubscribe$1.apply(FeedSubscriptionActor.scala:99)
    at eu.inn.facade.events.FeedSubscriptionActor$$anonfun$filterAndSubscribe$1.apply(FeedSubscriptionActor.scala:89)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
    at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
INF 23:14:01.951 rbus.transport.api.TransportManager New `onEvent` subscription on RequestMatcher(Some(Uri(Specific(/revault/content/{path:*})#path -> Specific(abc))),Map(method -> RegexMatcher(feed:.*))): #2fe4ac8b. TransportSubscription(eu.inn.hyperbus.transport.DistributedAkkaServerTransport@3ca7ccba,eu.inn.hyperbus.transport.distributedakka.DAkkaSubscription@27fab599) 
maqdev commented 8 years ago

Это точно исправлено? Проверил через revault. Посылаю GET запрос из пункта 1. Получаю в ответ в логе

[WARN] [03/15/2016 00:27:49.975] [Inn-akka.actor.default-dispatcher-17] [akka://Inn/user/simple-service-actor/wrkr-9/Subscr-100500] event eu.inn.hyperbus.model.DynamicRequest[eu.inn.hyperbus.model.DynamicBodyContainer]:{"request":{"uri":{"pattern":"/revault/content/abc"},"headers":{"method":["get"],"messageId":["100500"]}},"body":{"http_x_forwarded_for":"/127.0.0.1:60412"}} will be dropped because resource state is not fetched yet

В WS фронтэнд не получает ответа.

maqdev commented 8 years ago

SUBSCRIBE тоже не отработал. В hyperbus уходит запрос с методом "subscribe", такого не должно быть.

TRA 00:29:18.398 eu.inn.hyperbus.HyperBus            hyperBus <~ eu.inn.hyperbus.model.DynamicRequest[eu.inn.hyperbus.model.DynamicBodyContainer]:{"request":{"uri":{"pattern":"/revault/content/{path:*}","args":{"path":"hyperbus"}},"headers":{"method":["subscribe"],"messageId":["100500"]}},"body":{"http_x_forwarded_for":"/127.0.0.1:60559"}} 
INF 00:29:18.421 rbus.transport.api.TransportManager New `onEvent` subscription on RequestMatcher(Some(Uri(Specific(/revault/content/{path:*})#path -> Specific(hyperbus))),Map(method -> RegexMatcher(feed:.*))): #6f665248. TransportSubscription(eu.inn.hyperbus.transport.DistributedAkkaServerTransport@290e362c,eu.inn.hyperbus.transport.distributedakka.DAkkaSubscription@e57477d) 
ERR 00:29:18.429 eu.inn.facade.http.RequestMapper$   Can't handle request. #7hAf6--DrtNbE2DoOvNA2PZM7kPKk5 
eu.inn.hyperbus.transport.distributedakka.HandlerIsNotFound: No handler were found for eu.inn.hyperbus.model.DynamicRequest[eu.inn.hyperbus.model.DynamicBodyContainer]:{"request":{"uri":{"pattern":"/revault/content/{path:*}","args":{"path":"hyperbus"}},"headers":{"method":["subscribe"],"messageId":["100500"]}},"body":{"http_x_forwarded_for":"/127.0.0.1:60559"}}
    at eu.inn.hyperbus.transport.distributedakka.CommandActor.handleRequest(impl.scala:230) ~[hyperbus-t-distributed-akka_2.11-0.1.62.jar:0.1.62]
    at eu.inn.hyperbus.transport.distributedakka.SubscriptionActor$$anonfun$started$1.applyOrElse(impl.scala:213) ~[hyperbus-t-distributed-akka_2.11-0.1.62.jar:0.1.62]
    at akka.actor.Actor$class.aroundReceive(Actor.scala:480) ~[akka-actor_2.11-2.4.1.jar:na]
    at eu.inn.hyperbus.transport.distributedakka.SubscriptionActor.aroundReceive(impl.scala:103) ~[hyperbus-t-distributed-akka_2.11-0.1.62.jar:0.1.62]
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526) ~[akka-actor_2.11-2.4.1.jar:na]
    at akka.actor.ActorCell.invoke(ActorCell.scala:495) ~[akka-actor_2.11-2.4.1.jar:na]
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257) ~[akka-actor_2.11-2.4.1.jar:na]
    at akka.dispatch.Mailbox.run(Mailbox.scala:224) ~[akka-actor_2.11-2.4.1.jar:na]
    at akka.dispatch.Mailbox.exec(Mailbox.scala:234) ~[akka-actor_2.11-2.4.1.jar:na]
    at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [scala-library-2.11.7.jar:na]
    at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [scala-library-2.11.7.jar:na]
    at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [scala-library-2.11.7.jar:na]
    at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [scala-library-2.11.7.jar:na]
[ERROR] [03/15/2016 00:29:18.436] [ForkJoinPool-3-worker-7] [akka://Inn/user/simple-service-actor/wrkr-a/Subscr-100500] Service answered with error #7hAf6--DrtNbE2DoOvNA2PZM7kPKk5. Stopping actor

в фронте через WS получил следующую ошибку:

RESPONSE: {"response":{"status":500,"headers":{"messageId":["7hAf6--DruhYx8LmmVj0jKXD9DfiVa"],"correlationId":["100500akka://Inn/user/simple-service-actor/wrkr-a/Subscr-100500"]}},"body":{"code":"internal_server_error","description":"Unhandled error #7hAf6--DrtNbE2DoOvNA2PZM7kPKk5","errorId":"7hAf6--DrtNbE2DoOvNA2PZM7kPKk5"}}