doujiangqu2823 2013-10-01 00:03
浏览 84
已采纳

Go Revel框架端口9000已在使用中

I'm following along with the Go Revel framework nicely until I go to run the test app:

$ revel run myapp

which gives me the all the correct output but also gives the following error:

ERROR 2013/09/30 19:51:41 harness.go:167: Failed to start reverse proxy: listen tcp 
<nil>:9000: address already in use

When I run this:

$ sudo lsof -n -i4TCP:9000 | grep LISTEN

I get this:

COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
php-fpm 11007 root   11u  IPv4 0xffffff801441dde0      0t0  TCP localhost:cslistener (LISTEN)
php-fpm 11008 _www    0u  IPv4 0xffffff801441dde0      0t0  TCP localhost:cslistener (LISTEN)
php-fpm 11009 _www    0u  IPv4 0xffffff801441dde0      0t0  TCP localhost:cslistener (LISTEN)
php-fpm 11010 _www    0u  IPv4 0xffffff801441dde0      0t0  TCP localhost:cslistener (LISTEN)

I have a PHP-NGINX app running on port 80 and don't want to lose that but have no idea whether this means this PHP app is blocking my Go app from running.

Can anyone chime in?

I'm running on MacOS X 10.7.5.

  • 写回答

4条回答

  • doutian4046 2013-10-01 01:17
    关注

    You can change the port of a revel application with either:

    1. Editing the config/app.conf file and setting

      http.port = 8888
      
    2. Running your revel application with a parameter specifying the port. You'll also need to specify either dev or prod to state your environment:

      revel run myapp dev 8888
      
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条