我正在尝试使用以下方式在端口 80 上部署我的项目
play start 80
play "start 80"
play "start -Dhttp.port=8080"
它给了我这个错误:
org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:80
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
at play.core.server.NettyServer$$anonfun$10.apply(NettyServer.scala:134)
at play.core.server.NettyServer$$anonfun$10.apply(NettyServer.scala:131)
at scala.Option.map(Option.scala:145)
我在这里发现了一个类似的问题
无法在 ec2 上启动 play! 服务器(play! 框架)
但答案sudo play start 80
是
sudo: play: command not found
我是否遗漏了什么?
更新:我也尝试过
sudo /home/ubuntu/play-2.2.0/play start 80
它没有给出错误,但浏览器仍然说无法与 mydomain 上的服务器建立连接,play "start 8080"
完美运行
sudo netstat -nlp | grep LISTEN
tcp 0 0 0.0.0.0:57983 0.0.0.0:* LISTEN 950/beam
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 799/mysqld
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 910/epmd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 645/sshd
tcp6 0 0 :::9000 :::* LISTEN 8273/java
tcp6 0 0 :::5672 :::* LISTEN 950/beam
tcp6 0 0 :::22 :::* LISTEN 645/sshd
unix 2 [ ACC ] SEQPACKET LISTENING 6142 266/udevd /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 5941 1/init @/com/ubuntu/upstart
unix 2 [ ACC ] STREAM LISTENING 7577 756/acpid /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 8113 799/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 7399 664/dbus-daemon /var/run/dbus/system_bus_socket