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 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 matlab有关常微分方程的问题求解决
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法