【问题标题】:Lagom -LagomServiceLocatorStart :Failed to start embedded Service Locator or Service Gateway?Lagom -LagomServiceLocatorStart : 无法启动嵌入式服务定位器或服务网关?
【发布时间】:2017-01-28 09:50:50
【问题描述】:

我刚开始使用 lagom ,正在尝试运行 lagom 示例,但我在启动服务器时遇到了错误。我遇到以下错误

     > runAll
     [info] Starting Kafka
     [info] Starting Cassandra
     ....Kafka Server closed unexpectedly.
     ......
     [info] Cassandra server running at 127.0.0.1:4000
    [error] p.c.s.NettyServer - Failed to listen for HTTP on /0.0.0.0:8000!
    [error] ({.}/*:lagomServiceLocatorStart) Failed to start embedded               

    Service Locator or Service Gateway. Hint: Are ports 8000 and 9010     
    already in use?
    [error] Total time: 32 s, completed Jan 28, 2017 1:19:03 AM

我在 build.sbt 中更改了三个参数仍然没有变化

     lagomServiceGatewayPort in ThisBuild := 9010
     lagomServiceLocatorStart in ThisBuild := 9005
     lagomServicesPortRange in ThisBuild := PortRange(40000, 45000)

任何想法,我做错了什么?

谢谢

【问题讨论】:

  • 我看文档的时候写的,一般不会发生,因为端口范围高,但是为什么无法启动。
  • 你在修改配置后是否在 sbt 中运行了reload
  • 是的,我已经重新加载它并再次构建它

标签: scala akka lagom


【解决方案1】:

您应该使用lagomServiceLocatorPort 设置而不是lagomServiceLocatorStart 更改端口

lagomServiceLocatorPort in ThisBuild := 9005

http://www.lagomframework.com/documentation/1.2.x/java/ServiceLocator.html#default-port

【讨论】:

    猜你喜欢
    • 2019-10-11
    • 2020-05-18
    • 2020-10-14
    • 1970-01-01
    • 2020-12-19
    • 1970-01-01
    • 2017-06-09
    • 1970-01-01
    • 2021-05-25
    相关资源
    最近更新 更多