2014-10-30 8 views
0

이 지시를 따르고 localhost:8080을 통해 프론트 엔드에 액세스 할 수 있지만 백엔드 쪽에서 hello.js가 실행되지 않은 것처럼 보입니다.Crossbar.io - WAMP 라우터가 작동하지 않습니다.

2014-10-30 23:52:33+0700 [Controller 48946] Log opened.

2014-10-30 23:52:33+0700 [Controller 48946] ============================== Crossbar.io ==============================

2014-10-30 23:52:33+0700 [Controller 48946] Crossbar.io 0.9.9 starting

2014-10-30 23:52:34+0700 [Controller 48946] Running on CPython using KQueueReactor reactor

2014-10-30 23:52:34+0700 [Controller 48946] Starting from node directory /Users/toannguyen/Documents/Local-Repo/crossbar-hello/.crossbar

2014-10-30 23:52:34+0700 [Controller 48946] Starting from local configuration '/Users/toannguyen/Documents/Local-Repo/crossbar-hello/.crossbar/config.json'

2014-10-30 23:52:34+0700 [Controller 48946] No WAMPlets detected in enviroment.

2014-10-30 23:52:34+0700 [Controller 48946] Starting Router with ID 'worker1' ..

2014-10-30 23:52:35+0700 [Router 48950] Log opened.

2014-10-30 23:52:36+0700 [Router 48950] Running under CPython using KQueueReactor reactor

2014-10-30 23:52:36+0700 [Router 48950] Entering event loop ..

2014-10-30 23:52:36+0700 [Controller 48946] Router with ID 'worker1' and PID 48950 started

2014-10-30 23:52:36+0700 [Controller 48946] Router 'worker1': realm 'realm1' started

2014-10-30 23:52:36+0700 [Controller 48946] Router 'worker1': role 'role1' started on realm 'realm1'

2014-10-30 23:52:36+0700 [Router 48950] Site starting on 8080

2014-10-30 23:52:36+0700 [Controller 48946] Router 'worker1': transport 'transport1' started

2014-10-30 23:52:36+0700 [Controller 48946] Starting Guest with ID 'worker2' ..

2014-10-30 23:52:36+0700 [Controller 48946] GuestWorkerClientProtocol.connectionMade

2014-10-30 23:52:36+0700 [Controller 48946] Guest with ID 'worker2' and PID 48951 started

2014-10-30 23:52:36+0700 [Controller 48946] Warning: cannot watch directory for changes - feature DirWatcher unavailable

2014-10-30 23:52:36+0700 [Controller 48946] Guest 'worker2': started

2014-10-30 23:52:36+0700 [Guest 48951] Upon execvpe /usr/bin/node ['/usr/bin/node', 'hello.js'] in environment id 4347382592

2014-10-30 23:52:36+0700 [Guest 48951] :Traceback (most recent call last):

2014-10-30 23:52:36+0700 [Guest 48951] File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/process.py", line 403, in _fork

2014-10-30 23:52:36+0700 [Guest 48951] path, uid, gid, executable, args, environment)

2014-10-30 23:52:36+0700 [Guest 48951] File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/process.py", line 453, in _execChild

2014-10-30 23:52:36+0700 [Guest 48951] os.execvpe(executable, args, environment)

2014-10-30 23:52:36+0700 [Guest 48951] File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 355, in execvpe

2014-10-30 23:52:36+0700 [Guest 48951] _execvpe(file, args, env)

2014-10-30 23:52:36+0700 [Guest 48951] File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 370, in _execvpe

2014-10-30 23:52:36+0700 [Guest 48951] func(file, *argrest)

2014-10-30 23:52:36+0700 [Guest 48951] OSError: [Errno 2] No such file or directory

2014-10-30 23:52:36+0700 [Controller 48946] GuestWorkerClientProtocol.connectionLost: [Failure instance: Traceback (failure with no frames): : A process has ended with a probable error condition: process ended with exit code 1. ]

2014-10-30 23:52:36+0700 [Controller 48946] GuestWorkerClientProtocol: guest ended with error 1

2014-10-30 23:52:36+0700 [Controller 48946] Guest excited with error [Failure instance: Traceback (failure with no frames): : A process has ended with a probable error condition: process ended with exit code 1. ]

그런 다음 프론트 엔드 채널에 게시를 유지하지만 'onhello', 서버가 수신되지 않았지만 아무것도 기록 : 나는 crossbar start를 실행 한 후이 로그입니다. 오류는 무엇이며 누구도이 문제를 해결할 수 있도록 도와 줄 수 있습니까? 감사.

답변

0

Crossbar.io에서 NodeJS 실행 파일을 찾을 수 없습니다. config.json에 정규화 된 경로가 필요합니다.

예. 우분투에, NodeJS가 /usr/bin/nodejs에 설치되며, 기본적으로 생성 된 Crossbar.io 노드 구성으로 그 일을하기 위해, 당신은 할 필요가 :

sudo ln -s /usr/bin/nodejs /usr/bin/node 

그래서 당신이

[email protected]:~/temp/node4$ ls -la /usr/bin/node 
lrwxrwxrwx 1 root root 15 Okt 31 09:35 /usr/bin/node -> /usr/bin/nodejs 
[email protected]:~/temp/node4$ ls -la /usr/bin/nodejs 
-rwxr-xr-x 1 root root 1462424 Mär 27 2014 /usr/bin/nodejs 
+0

덕분에 많이 얻을! Mac OS X을 사용하고 Node 실행 파일이/usr/local/bin에 있음을 확인하십시오. config.json과 모든 것이 작동하는 경로 변경하기 – user3324363