jiezhi
V2EX  ›  Cloud9

[求助] 在 raspberry pi 上安装了 cloud 9,本地可以打开,局域网内另外机器访问不了

  •  
  •   jiezhi · Nov 12, 2015 · 7243 views
    This topic created in 4030 days ago, the information mentioned may be changed or developed.

    按照这里在树莓派上安装好了 c9 ,执行node server.js也可以正常运行了:

    ➜  c9sdk git:(master) ✗ node server.js
    Starting standalone
    Connect server listening at http://127.0.0.1:8181
    CDN: version standalone initialized /home/pi/Documents/c9sdk/build
    Started '/home/pi/Documents/c9sdk/configs/standalone' with config 'standalone'!
    

    通过lynx 127.0.0.1:8181也可以在本地正常访问,但是通过电脑访问 http://pi_ip:8181 却无法访问( ssh 可以正常连接该 pi ),我想知道到底是哪个地方没配置好么,还是打开方式不对?

    PS:pi based on centos

    Supplement 1  ·  Nov 13, 2015

    谢谢各位,参考这里执行了如下命令:

    ➜  c9sdk git:(master) ✗ ./server.js -l 0.0.0.0
    Starting standalone
    Authentication is required when not running on localhost.
    If you would like to expose this service to other hosts or the Internet
    at large, please specify -a user:pass to set a username and password
    (or use -a : to force no login).
    Use --listen localhost to only listen on the localhost interface and
    and suppress this message.
    
    Connect server listening at http://127.0.0.1:8181
    CDN: version standalone initialized /home/pi/Documents/c9sdk/build
    Started '/home/pi/Documents/c9sdk/configs/standalone' with config 'standalone'!
    ^C%
    

    嗯,加个用户名和密码就可以了

    ➜  c9sdk git:(master) ✗ ./server.js -l 0.0.0.0 -a admin:123
    Starting standalone
    Warning: running Cloud9 without using HTTP authentication.
    Run using --listen localhost instead to only expose Cloud9 to localhost,
    or use -a username:password to setup HTTP authentication
    
    Connect server listening at http://192.168.1.184:8181
    Using basic authentication
    CDN: version standalone initialized /home/pi/Documents/c9sdk/build
    Started '/home/pi/Documents/c9sdk/configs/standalone' with config 'standalone'!
    cache /home/pi/Documents/c9sdk/build/standalone/skin/default/dark.css
    wrapping module lib/architect/architect
    wrapping module async
    wrapping module smith
    wrapping module vfs-socket/consumer
    

    在另外的机器可以访问啦啦

    6 replies  •  2015-11-12 22:50:33 +08:00
    zeacev
    zeacev
    Nov 12, 2015 via Android
    1
    我就想知道这东西怎么在 Linux 下安装成功, Ubuntu 和 CentOS 下装了不下十次都莫名其妙不成功
    kendetrics
    kendetrics
    Nov 12, 2015
    2
    防火墙,或者路由器开了内网隔离
    shunia
    shunia
    Nov 12, 2015❤️1
    3
    127.0.0.1? 是不是应该指定 0.0.0.0:8181
    shunia
    shunia
    Nov 12, 2015
    4
    另外现在这东西是不是叫 ace 啦?
    JJaicmkmy
    JJaicmkmy
    Nov 12, 2015 via iPad❤️1
    5
    三楼正解,应该监听 0.0.0.0
    iloveayu
    iloveayu
    Nov 12, 2015 via Android❤️1
    6
    @shunia +1 127.0.0.1 只能本机访问
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   914 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 21:04 · PVG 05:04 · LAX 13:04 · JFK 16:04
    ♥ Do have faith in what you're doing.