Closed tsh-box closed 7 years ago
can you post any js errors is the browsers developer console and the output of:
docker service logs app-light-graph
console error are as following
databox_container-manager.1.k1gabtbnwicv@databox | [Proxy] GET: /app-light-graph/ui => https://app-light-graph:8080/ui databox_container-manager.1.k1gabtbnwicv@databox | [databox-request] ExternalRequest https://app-light-graph:8080/ui databox_container-manager.1.k1gabtbnwicv@databox | [Proxy] ERROR: /app-light-graph/ui getaddrinfo EAI_AGAIN app-light-graph:8080 databox_container-manager.1.k1gabtbnwicv@databox | [Proxy] GET: /app-light-graph/ui => https://app-light-graph:8080/ui databox_container-manager.1.k1gabtbnwicv@databox | [databox-request] ExternalRequest https://app-light-graph:8080/ui databox_container-manager.1.k1gabtbnwicv@databox | [Proxy] ERROR: /app-light-graph/ui connect ECONNREFUSED 10.0.0.12:8080 databox_container-manager.1.k1gabtbnwicv@databox | [Proxy] GET: /app-light-graph/ui => https://app-light-graph:8080/ui databox_container-manager.1.k1gabtbnwicv@databox | [databox-request] ExternalRequest https://app-light-graph:8080/ui databox_container-manager.1.k1gabtbnwicv@databox | [Proxy] ERROR: /app-light-graph/ui connect ECONNREFUSED 10.0.0.12:8080 databox_container-manager.1.k1gabtbnwicv@databox | [Proxy] GET: /app-light-graph/ui => https://app-light-graph:8080/ui databox_container-manager.1.k1gabtbnwicv@databox | [databox-request] ExternalRequest https://app-light-graph:8080/ui databox_container-manager.1.k1gabtbnwicv@databox | [Proxy] ERROR: /app-light-graph/ui connect ECONNREFUSED 10.0.0.12:808 ///////////////////////////////////////////////////// I executed 'docker service logs app-light-graph' and logs are following
app-light-graph.1.7liqplhugt9v@databox | npm info lifecycle app-light-graph@0.1.0~start: Failed to exec start script
app-light-graph.1.oj4v8glhlyjz@databox | npm info lifecycle app-light-graph@0.1.0~start: Failed to exec start script
app-light-graph.1.kjomg9nux6a3@databox | npm info lifecycle app-light-graph@0.1.0~start: Failed to exec start script
app-light-graph.1.luchdb66iudn@databox | npm info lifecycle app-light-graph@0.1.0~start: Failed to exec start script
app-light-graph.1.luchdb66iudn@databox | npm ERR! code ELIFECYCLE
app-light-graph.1.7liqplhugt9v@databox | npm ERR! code ELIFECYCLE
app-light-graph.1.oj4v8glhlyjz@databox | npm ERR! code ELIFECYCLE
app-light-graph.1.kjomg9nux6a3@databox | npm ERR! code ELIFECYCLE
app-light-graph.1.kjomg9nux6a3@databox | npm ERR! errno 1
app-light-graph.1.luchdb66iudn@databox | npm ERR! errno 1
app-light-graph.1.7liqplhugt9v@databox | npm ERR! errno 1
app-light-graph.1.oj4v8glhlyjz@databox | npm ERR! errno 1
app-light-graph.1.oj4v8glhlyjz@databox | npm ERR! app-light-graph@0.1.0 start: node server.js
app-light-graph.1.kjomg9nux6a3@databox | npm ERR! app-light-graph@0.1.0 start: node server.js
app-light-graph.1.luchdb66iudn@databox | npm ERR! app-light-graph@0.1.0 start: node server.js
app-light-graph.1.7liqplhugt9v@databox | npm ERR! app-light-graph@0.1.0 start: node server.js
app-light-graph.1.7liqplhugt9v@databox | npm ERR! Exit status 1
app-light-graph.1.oj4v8glhlyjz@databox | npm ERR! Exit status 1
app-light-graph.1.kjomg9nux6a3@databox | npm ERR! Exit status 1
app-light-graph.1.luchdb66iudn@databox | npm ERR! Exit status 1
app-light-graph.1.luchdb66iudn@databox | npm ERR!
app-light-graph.1.7liqplhugt9v@databox | npm ERR!
app-light-graph.1.oj4v8glhlyjz@databox | npm ERR!
app-light-graph.1.kjomg9nux6a3@databox | npm ERR!
Right, I've just fixed the other issue and tested this one with the new code and can't replicate the error.
Can you give it another go and see if it works now? Use the master branch.
If it's still not working the errors from your web browsers console will be useful.
Cheers
Tosh
hi, I installed app-light-graph,the status of the installation is always suddenly changed such as running,created and exited.so I confirm with docker service ls
[root@localhost databox]# docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
39kdfam0kjor databox_app-server replicated 1/1 databoxsystems/app-server:latest :8181->8181/tcp
60nhrtlsdypd app-light-graph-store-json replicated 1/1 databoxsystems/store-json
a9zl57afvouz databox_container-manager replicated 1/1 databoxsystems/container-manager:latest :8989->8989/tcp
jefeljvlshsz databox_export-service replicated 1/1 databoxsystems/export-service:latest
jl3dgdgpkpxh databox_syslog replicated 1/1 databoxsystems/syslog:latest
wgu80a6zcygj databox_arbiter replicated 1/1 databoxsystems/arbiter:latest
wvx45n0totpj driver-sensingkit-store-json replicated 1/1 databoxsystems/store-json
y8fqlhgbr938 driver-sensingkit replicated 1/1 databoxsystems/driver-sensingkit
yl8dd75eddf1 app-light-graph replicated 1/1 databoxsystems/app-light-graph
[root@localhost databox]# docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
39kdfam0kjor databox_app-server replicated 1/1 databoxsystems/app-server:latest :8181->8181/tcp
60nhrtlsdypd app-light-graph-store-json replicated 1/1 databoxsystems/store-json
a9zl57afvouz databox_container-manager replicated 1/1 databoxsystems/container-manager:latest :8989->8989/tcp
jefeljvlshsz databox_export-service replicated 1/1 databoxsystems/export-service:latest
jl3dgdgpkpxh databox_syslog replicated 1/1 databoxsystems/syslog:latest
wgu80a6zcygj databoxarbiter replicated 1/1 databoxsystems/arbiter:latest
wvx45n0totpj driver-sensingkit-store-json replicated 1/1 databoxsystems/store-json
y8fqlhgbr938 driver-sensingkit replicated 1/1 databoxsystems/driver-sensingkit
yl8dd75eddf1 app-light-graph replicated 0/1 databoxsystems/app-light-graph_
The console log are as following when I clicked the app-light-graph app,
databox_container-manager.1.kzudxm31uejy@localhost.databox | [Proxy] GET: /app-light-graph/ui => https://app-light-graph:8080/ui databox_container-manager.1.kzudxm31uejy@localhost.databox | [databox-request] ExternalRequest https://app-light-graph:8080/ui databox_container-manager.1.kzudxm31uejy@localhost.databox | [Proxy] ERROR: /app-light-graph/ui connect ECONNREFUSED 10.0.1.14:8080 databox_container-manager.1.kzudxm31uejy@localhost.databox | [Proxy] GET: /app-light-graph/ui => https://app-light-graph:8080/ui databox_container-manager.1.kzudxm31uejy@localhost.databox | [databox-request] ExternalRequest https://app-light-graph:8080/ui databox_container-manager.1.kzudxm31uejy@localhost.databox | [Proxy] ERROR: /app-light-graph/ui getaddrinfo ENOTFOUND app-light-graph app-light-graph:8080
and I also confirm the Store Tab,app-light-graph store json is running
Thank you,
Whats the output of:
docker service logs app-light-graph
[root@localhost databox]# docker service logs app-light-graph
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm info it worked if it ends with ok
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm info it worked if it ends with ok
app-light-graph.1.xobwwbnyass5@localhost.databox | npm info it worked if it ends with ok
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm info it worked if it ends with ok
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm info using npm@5.3.0
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm info using npm@5.3.0
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm info using npm@5.3.0
app-light-graph.1.xobwwbnyass5@localhost.databox | npm info using npm@5.3.0
app-light-graph.1.xobwwbnyass5@localhost.databox | npm info using node@v8.2.0
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm info using node@v8.2.0
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm info using node@v8.2.0
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm info using node@v8.2.0
app-light-graph.1.d7gjw6ez14tr@localhost.databox |
app-light-graph.1.xobwwbnyass5@localhost.databox | npm info lifecycle app-light-graph@0.1.0~prestart: app-light-graph@0.1.0
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm info lifecycle app-light-graph@0.1.0~prestart: app-light-graph@0.1.0
app-light-graph.1.lg0fhwtmd3el@localhost.databox |
app-light-graph.1.lg0fhwtmd3el@localhost.databox | > app-light-graph@0.1.0 start /
app-light-graph.1.d7gjw6ez14tr@localhost.databox | > app-light-graph@0.1.0 start /
app-light-graph.1.xobwwbnyass5@localhost.databox | npm info lifecycle app-light-graph@0.1.0~start: app-light-graph@0.1.0
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm info lifecycle app-light-graph@0.1.0~start: app-light-graph@0.1.0
app-light-graph.1.u4nc7lxylipd@localhost.databox |
app-light-graph.1.lg0fhwtmd3el@localhost.databox | > node server.js
app-light-graph.1.d7gjw6ez14tr@localhost.databox | > node server.js
app-light-graph.1.xobwwbnyass5@localhost.databox |
app-light-graph.1.xobwwbnyass5@localhost.databox | > app-light-graph@0.1.0 start /
app-light-graph.1.u4nc7lxylipd@localhost.databox | > app-light-graph@0.1.0 start /
app-light-graph.1.lg0fhwtmd3el@localhost.databox |
app-light-graph.1.d7gjw6ez14tr@localhost.databox |
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm info lifecycle app-light-graph@0.1.0~prestart: app-light-graph@0.1.0
app-light-graph.1.xobwwbnyass5@localhost.databox | > node server.js
app-light-graph.1.u4nc7lxylipd@localhost.databox | > node server.js
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm info lifecycle app-light-graph@0.1.0~prestart: app-light-graph@0.1.0
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm info lifecycle app-light-graph@0.1.0~start: app-light-graph@0.1.0
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm info lifecycle app-light-graph@0.1.0~start: app-light-graph@0.1.0
app-light-graph.1.xobwwbnyass5@localhost.databox |
app-light-graph.1.u4nc7lxylipd@localhost.databox |
app-light-graph.1.u4nc7lxylipd@localhost.databox | url.js:102
app-light-graph.1.lg0fhwtmd3el@localhost.databox | url.js:102
app-light-graph.1.d7gjw6ez14tr@localhost.databox | url.js:102
app-light-graph.1.xobwwbnyass5@localhost.databox | url.js:102
app-light-graph.1.xobwwbnyass5@localhost.databox | throw new TypeError('Parameter "url" must be a string, not ' + typeof url);
app-light-graph.1.u4nc7lxylipd@localhost.databox | throw new TypeError('Parameter "url" must be a string, not ' + typeof url);
app-light-graph.1.lg0fhwtmd3el@localhost.databox | throw new TypeError('Parameter "url" must be a string, not ' + typeof url);
app-light-graph.1.d7gjw6ez14tr@localhost.databox | throw new TypeError('Parameter "url" must be a string, not ' + typeof url);
app-light-graph.1.d7gjw6ez14tr@localhost.databox | ^
app-light-graph.1.xobwwbnyass5@localhost.databox | ^
app-light-graph.1.u4nc7lxylipd@localhost.databox | ^
app-light-graph.1.lg0fhwtmd3el@localhost.databox | ^
app-light-graph.1.lg0fhwtmd3el@localhost.databox |
app-light-graph.1.d7gjw6ez14tr@localhost.databox |
app-light-graph.1.xobwwbnyass5@localhost.databox |
app-light-graph.1.u4nc7lxylipd@localhost.databox |
app-light-graph.1.u4nc7lxylipd@localhost.databox | TypeError: Parameter "url" must be a string, not undefined
app-light-graph.1.lg0fhwtmd3el@localhost.databox | TypeError: Parameter "url" must be a string, not undefined
app-light-graph.1.d7gjw6ez14tr@localhost.databox | TypeError: Parameter "url" must be a string, not undefined
app-light-graph.1.xobwwbnyass5@localhost.databox | TypeError: Parameter "url" must be a string, not undefined
app-light-graph.1.xobwwbnyass5@localhost.databox | at Url.parse (url.js:102:11)
app-light-graph.1.u4nc7lxylipd@localhost.databox | at Url.parse (url.js:102:11)
app-light-graph.1.lg0fhwtmd3el@localhost.databox | at Url.parse (url.js:102:11)
app-light-graph.1.d7gjw6ez14tr@localhost.databox | at Url.parse (url.js:102:11)
app-light-graph.1.d7gjw6ez14tr@localhost.databox | at Object.urlParse [as parse] (url.js:96:5)
app-light-graph.1.xobwwbnyass5@localhost.databox | at Object.urlParse [as parse] (url.js:96:5)
app-light-graph.1.u4nc7lxylipd@localhost.databox | at Object.urlParse [as parse] (url.js:96:5)
app-light-graph.1.lg0fhwtmd3el@localhost.databox | at Object.urlParse [as parse] (url.js:96:5)
app-light-graph.1.lg0fhwtmd3el@localhost.databox | at Object.node server.js
app-light-graph.1.xobwwbnyass5@localhost.databox | npm ERR! app-light-graph@0.1.0 start: node server.js
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm ERR! app-light-graph@0.1.0 start: node server.js
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm ERR! app-light-graph@0.1.0 start: node server.js
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm ERR! Exit status 1
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm ERR! Exit status 1
app-light-graph.1.xobwwbnyass5@localhost.databox | npm ERR! Exit status 1
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm ERR! Exit status 1
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm ERR!
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm ERR!
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm ERR!
app-light-graph.1.xobwwbnyass5@localhost.databox | npm ERR!
app-light-graph.1.xobwwbnyass5@localhost.databox | npm ERR! Failed at the app-light-graph@0.1.0 start script.
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm ERR! Failed at the app-light-graph@0.1.0 start script.
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm ERR! Failed at the app-light-graph@0.1.0 start script.
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm ERR! Failed at the app-light-graph@0.1.0 start script.
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
app-light-graph.1.xobwwbnyass5@localhost.databox | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
app-light-graph.1.lg0fhwtmd3el@localhost.databox |
app-light-graph.1.d7gjw6ez14tr@localhost.databox |
app-light-graph.1.xobwwbnyass5@localhost.databox |
app-light-graph.1.u4nc7lxylipd@localhost.databox |
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm ERR! A complete log of this run can be found in:
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm ERR! A complete log of this run can be found in:
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm ERR! A complete log of this run can be found in:
app-light-graph.1.xobwwbnyass5@localhost.databox | npm ERR! A complete log of this run can be found in:
app-light-graph.1.xobwwbnyass5@localhost.databox | npm ERR! /root/.npm/_logs/2017-07-25T10_09_40_741Z-debug.log
app-light-graph.1.u4nc7lxylipd@localhost.databox | npm ERR! /root/.npm/_logs/2017-07-25T10_09_21_174Z-debug.log
app-light-graph.1.lg0fhwtmd3el@localhost.databox | npm ERR! /root/.npm/_logs/2017-07-25T10_09_11_695Z-debug.log
app-light-graph.1.d7gjw6ez14tr@localhost.databox | npm ERR! /root/.npm/_logs/2017-07-25T10_09_30_903Z-debug.log
[root@localhost databox]#
Hi @laelaeaung, during the SLA process, did you bind the datasource exposed by the driver to this app? It should be a drop-down in the bottom before you hit launch.
The cause of this crash, for posterity, is that in your case, the environment variable DATASOURCE_DS_light
is undefined, so DATASOURCE_DS_light.href
is also undefined here, and url.parse
complains. Ideally we should have Databox refuse to start an app if the required sources aren't bound, or else the apps should indicate that they won't function due to missing datasources (because of permissions or otherwise) instead of just crashing, but that is not yet the case.
Hi! @yousefamar , I have running the driver-sensinkit but not yet bind with datasource that means the data from smart phone,is it right?
Yes, so when you click the app to launch it, it should give you an "SLA" page first, and in the bottom, it should ask you what to bind. That way you can connect the driver's store to the app.
OK,firstly i need to bind the datasource with driver(driver-sensinkit) and then app install will work,Is it right? Sorry for my confirm message again. :) Thanks you,
No I'm talking about between store and app. The terminology is a bit confusing here, since those are also called datasources. When you install an app, there should be the view where you can control permissions, and towards the bottom you can add these datasources.
I want to successfully install app-light-graph what should I do ,Could you tell me,please?
Screenshot kindly provided by @jptmoore, I've circled the part I mean in red:
yes,me too light is unbound state.
If you click it does it let you select the source from the driver you have running? Since if it's unset, that's what made the app crash before.
hi!
So ,I stopped the databox with ./stopDatabox.sh and then executed ./startDatabox.sh and installed the driver-sensingkit .When I confirmed the driver-sensingkit-store-json from Stores menu tab,Invalid API key is shown as following.
Why does occurs this error ?Yesterday ,there was no error .
Thank you,
Hi @laelaeaung, are you running in dev mode? Yesterday I made some changes to the arbiter, and it could be that you're using an old build. Apologies for the inconvenience. Could you first try to turn everything off and on again, by running ./stopDatabox.sh
and ./startDatabox.sh
?
Were you able to bind the source yesterday?
So ,I stopped the databox with ./stopDatabox.sh and then executed ./startDatabox.sh and installed the driver-sensingkit .
If you've already done that since then, could you try updating the local image of databox arbiter by running docker pull databoxsystems/arbiter
?
Yesterday,I cannot be bind with source. I executed 'docker pull databoxsystems/arbiter'
Ok, now could you restart Databox, and make sure the driver and the store are stopped, then start the driver and app, and see if you still can't bind?
How to restart Databox?
I mean ./stopDatabox.sh && ./startDatabox.sh.
I restarted databox and then reinstall the driver(driver-sensingkit ) and app(app-light-grap).It is still cannot be bound.Is it need to connect data from andriod app (eg.databox-source-mobile-debug.apk) ?
Have you connected the phone?
not yet connected,I have no andriod phone, Can I use the andriod os from the virtualBox.
Do you still get Invalid API key/token
?
Yes,I still get Invalid API key/token.Now I am install with dev mode like './startdataboc.sh dev' ,Is this error concern about with dev mode?I cannot install with dev mode because memory space is not enough.
Can you restart and try again, things should be fixed now.
I'm not sure if the app will work in the Android VM.
I'm hopefully adding some new apps in the next day or two, which don't need any external hardware.
I think in theory it should work, but the app UI might give you the wrong IP. You might have to use the VirtualBox Guest's IP, and you might have to configure some network settings too.
Edit: not to mention that of course the emulator does not have real sensors.
@Toshbrown , Yes,I can restart and try again.Tomorrow I will test with andriod phone :) I am looking forward to your new apps :) Thanks you
@yousefamar , Ok,Tomorrow I will test with the VirtualBox Guest's IP If any problem,I will ask you again :) Thank you.
I have added app-os-monitor to enable testing without any extra hardware or external accounts
Hello!Tosh Thanks you for your ready made app for test. Today I used the latest source code from me/databox(master branch).I have installed driver-os-monitor and I attached the figure that is installing app-os-monitor
now can be selected the datasource and when click install button ,there is no working ,I attached the console figure
I did it. :) The app-os-monitor can test without any extra hardware,Thanks you.
For Other app, Firstly,driver installation needs and then this driver must join with data(eg; light,GPS) from devices by uploading json,etc;,Is it right?
For Other app, previously,driver installation and it must join with data(eg; light,GPS) from devices ,Is it right?
:+1:
:) thanks you. Export service can be use in databox?
Yes, I believe that the export service is functional. It's not been heavily tested though.
As you have it working I'm going to close this issue now. Feel free open a new one if you find anything else.
Thank you,
I installed a app-light-graph . When I click the running app,the following error is shown and attached the UI screenshot