Lagom -LagomServiceLocatorStart:无法启动嵌入式服务定位器或服务网关?

时间:2017-01-27 19:56:37

标签: scala akka lagom

我刚开始使用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)

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

由于

1 个答案:

答案 0 :(得分:1)

您应该使用lagomServiceLocatorPort设置而不是lagomServiceLocatorStart

更改端口
lagomServiceLocatorPort in ThisBuild := 9005

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