1

Following my previous question How to show an entity from in the Wirecloud MapViewer widget , I installed rush, and when I intend to start the contextBroker from the folder /etc/sysconfig I get the following results:

[root@fiware sysconfig]# contextBroker -rush localhost:1234 -https -key /etc/sysconfig/localhost.key -cert /etc/sysconfig/localhost.pem
E@19:00:10  exitFunc[1009]: unlink(/tmp/contextBroker.pid): No such file or directory
[root@fiware sysconfig]# F@19:00:10  ***[1063]: Connected to mongo at localhost:orion
E@19:00:10  restStart[764]: MHD_start_daemon failed
restStart: error 3
E@19:00:10  orionExit[998]: restStart: error

Although I get "MHD_start_daemon failed" when I check if the rush and the contextBroker are running, with the "netstat -tupln" command, I get the following result :

[root@fiware /]# netstat -tupln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:5001                0.0.0.0:*                   LISTEN      28973/node          
tcp        0      0 0.0.0.0:27017               0.0.0.0:*                   LISTEN      1622/mongod         
tcp        0      0 0.0.0.0:6379                0.0.0.0:*                   LISTEN      28942/./home/locala 
tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN      1673/Xvnc           
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1234/rpcbind        
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      1673/Xvnc           
tcp        0      0 0.0.0.0:28017               0.0.0.0:*                   LISTEN      1622/mongod         
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      12809/sshd          
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1372/cupsd          
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1576/master         
tcp        0      0 0.0.0.0:54363               0.0.0.0:*                   LISTEN      1252/rpc.statd      
tcp        0      0 0.0.0.0:1026                0.0.0.0:*                   LISTEN      20892/contextBroker 
tcp        0      0 :::6379                     :::*                        LISTEN      28942/./home/locala 
tcp        0      0 :::111                      :::*                        LISTEN      1234/rpcbind        
tcp        0      0 :::6001                     :::*                        LISTEN      1673/Xvnc           
tcp        0      0 :::22                       :::*                        LISTEN      12809/sshd          
tcp        0      0 ::1:631                     :::*                        LISTEN      1372/cupsd          
tcp        0      0 ::1:25                      :::*                        LISTEN      1576/master         
tcp        0      0 :::42975                    :::*                        LISTEN      1252/rpc.statd      
tcp        0      0 :::1026                     :::*                        LISTEN      20892/contextBroker 
udp        0      0 0.0.0.0:36688               0.0.0.0:*                               1252/rpc.statd      
udp        0      0 0.0.0.0:985                 0.0.0.0:*                               1234/rpcbind        
udp        0      0 0.0.0.0:5353                0.0.0.0:*                               1361/avahi-daemon   
udp        0      0 0.0.0.0:1004                0.0.0.0:*                               1252/rpc.statd      
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               1234/rpcbind        
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               1372/cupsd          
udp        0      0 0.0.0.0:51640               0.0.0.0:*                               1361/avahi-daemon   
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               1131/dhclient       
udp        0      0 :::985                      :::*                                    1234/rpcbind        
udp        0      0 :::111                      :::*                                    1234/rpcbind        
udp        0      0 :::39336                    :::*                                    1252/rpc.statd

And then I return to "https://mashup.lab.fi-ware.org" and I put the following input on each widget/operator:

NGSI Source

NGSI server URL: thiisorioncontextbroker:1026/ (with http no https)

NGSI proxy URL: https://ngsiproxy.lab.fi-ware.org/

NGSI entities: City

NGSI Attributes: position

NGSI Entity to Poi

Coordinates attribute: position

But nothing shows up in the map again :( .

After have runned the following command I got an ssl error:

[root@fiware sysconfig]# curl -k https://localhost:1026/version
curl: (35) SSL connect error

----------------------------------------------------------------------------------

I killed the contextBroker running process and start again, and then I runned the following command again:

[root@fiware sysconfig]# curl -k https://localhost:1026/version
<orion>
  <version>0.14.0</version>
  <uptime>0 d, 0 h, 15 m, 18 s</uptime>
  <git_hash>5e3d210e4b15fa9ebbfa07c93dd41f8b41697d0e</git_hash>
  <compile_time>nodate</compile_time>
  <compiled_by>fermin</compiled_by>
  <compiled_in>centollo</compiled_in>
</orion>

The contextBroker url with https protocol (https://YYY.YYY.YYY.YYY:1026) works perfectly with NGSIUpdater widget. So I'm also using in the wirecloud widget/operator https://YYY.YYY.YYY.YYY:1026 instead of http://YYY.YYY.YYY.YYY:1026, but I still don't get the marks (PoI) to be shown in the MapViewer.

Running netstat -tupln again show me the following results:

tcp        0      0 0.0.0.0:27017               0.0.0.0:*                   LISTEN      1622/mongod         
tcp        0      0 0.0.0.0:6379                0.0.0.0:*                   LISTEN      28942/./home/locala 
tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN      1673/Xvnc           
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1234/rpcbind        
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      1673/Xvnc           
tcp        0      0 0.0.0.0:28017               0.0.0.0:*                   LISTEN      1622/mongod         
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      12809/sshd          
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1372/cupsd          
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1576/master         
tcp        0      0 0.0.0.0:54363               0.0.0.0:*                   LISTEN      1252/rpc.statd      
tcp        0      0 0.0.0.0:1026                0.0.0.0:*                   LISTEN      26631/contextBroker 
tcp        0      0 :::6379                     :::*                        LISTEN      28942/./home/locala 
tcp        0      0 :::111                      :::*                        LISTEN      1234/rpcbind        
tcp        0      0 :::6001                     :::*                        LISTEN      1673/Xvnc           
tcp        0      0 :::22                       :::*                        LISTEN      12809/sshd          
tcp        0      0 ::1:631                     :::*                        LISTEN      1372/cupsd          
tcp        0      0 ::1:25                      :::*                        LISTEN      1576/master         
tcp        0      0 :::42975                    :::*                        LISTEN      1252/rpc.statd      
tcp        0      0 :::1026                     :::*                        LISTEN      26631/contextBroker 
udp        0      0 0.0.0.0:36688               0.0.0.0:*                               1252/rpc.statd      
udp        0      0 0.0.0.0:985                 0.0.0.0:*                               1234/rpcbind        
udp        0      0 0.0.0.0:5353                0.0.0.0:*                               1361/avahi-daemon   
udp        0      0 0.0.0.0:1004                0.0.0.0:*                               1252/rpc.statd      
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               1234/rpcbind        
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               1372/cupsd          
udp        0      0 0.0.0.0:54968               0.0.0.0:*                               26706/local         
udp        0      0 0.0.0.0:51640               0.0.0.0:*                               1361/avahi-daemon   
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               1131/dhclient       
udp        0      0 :::985                      :::*                                    1234/rpcbind        
udp        0      0 :::111                      :::*                                    1234/rpcbind        
udp        0      0 :::39336                    :::*                                    1252/rpc.statd 

Thanks for all the great support from fiware people.

4

2 回答 2

0

似乎代理拒绝启动,因为已经有一个代理正在运行(在同一端口上)。

在开始测试之前,请确保没有代理正在运行。

于 2014-12-02T09:50:02.830 回答
0

考虑到问题评论,使用https://github.com/telefonicaid/fiware-orion/blob/master/scripts/httpsPrepare.sh脚本生成密钥和证书文件。

...
openssl genrsa -out "$keyFileName" 1024 > /dev/null 2>&1
openssl req -days 365 -out "$certFileName" -new -x509 -key "$keyFileName" -subj "$OPTIONS" > /dev/null 2>&1

此外,您需要启动并运行 Rush(您用于-rush localhost:1234启动 Orion,但我没有看到任何进程在监听 1234,所以我理解 Rush 没有启动)。据我了解,这是在另一个问题中讨论的。

于 2014-12-04T20:46:16.537 回答