Giter Club home page Giter Club logo

Comments (15)

kmariano avatar kmariano commented on July 19, 2024

skynet uses elasticsearch currently for logging events. Do you have elasticsearch installed in your heroku instance?

from meshblu.

KAXER avatar KAXER commented on July 19, 2024

Hi, kmariano
No, I don't have, but what kind of add-ons I need to install:
1.SearchBox ElasticSearch
2.Found ElasticSearch
3.Bonsai ElasticSearch

Thank you for your guideline

from meshblu.

 avatar commented on July 19, 2024

You should be able to remove the elasticsearch section from the config.js file to suppress the elastic search logging on the platform.

Could you provide us with a better stack trace? There are no skynet-related errors in your output.

Thanks,
Chris

from meshblu.

KAXER avatar KAXER commented on July 19, 2024

Hi, Chris
I tried removing elasticsearch section in the config.js and in the platform, but I have same result.

One thing important, I'm using C9, in C9 I can run your app correctly, but when I try to deploy in heroku this message appear also:
"Your repository contain untracked files, these won't be deployed to Heroku"
"Do you want to continue?"

So in this moment I don't know where is the problem, in heroku or in the repo...
can you help me?

from meshblu.

 avatar commented on July 19, 2024

It sounds like C9 may be modifying files prior to your deployment to Heroku. #notsure

Heroku also does not allow local file access. You will need to turn off logging in the config.js by setting log: false

More error logs would help us...

from meshblu.

KAXER avatar KAXER commented on July 19, 2024

More tracks:
When I run the application on C9, terminal display this errors:

Your code is running at 'https://skynet-c9-syccon.c9.io'.
Important: use 'process.env.PORT' as the port and 'process.env.IP' as the host in your scripts!
info: socket.io started
Skynet connected to MQTT broker
No MQTT server found.
SSSSS kk tt
SS kk kk yy yy nn nnn eee tt
SSSSS kkkkk yy yy nnn nn ee e tttt
SS kk kk yyyyyy nn nn eeeee tt
SSSSS kk kk yy nn nn eeeee tttt
yyyyy
Skynet development environment loaded...
Error: bind EACCES
at errnoException (dgram.js:454:11)
at dgram.js:207:28
at /var/lib/stickshift/538265a8e0b8cdf95600046a/app-root/data/873260/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:177:31
at dns.js:72:18
at /var/lib/stickshift/538265a8e0b8cdf95600046a/app-root/data/873260/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:177:31
at process._tickDomainCallback (node.js:459:13)
at process. (/var/lib/stickshift/538265a8e0b8cdf95600046a/app-root/data/873260/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/index.js:18:15)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:901:3
restify listening at http://127.4.9.1:8080

from meshblu.

 avatar commented on July 19, 2024

Heroku chooses random ports to assign for your app. You'll need to modify SkyNet to use Heroku's environment port variable.

from meshblu.

KAXER avatar KAXER commented on July 19, 2024

Hi, thank you for your help , I change the port and host by a variable ('process.env.PORT' , 'process.env.IP'), in server.js file:

var mqttclient = mqtt.createClient(process.env.PORT, process.env.IP, mqttsettings);
coapPort = coapConfig.port || process.env.PORT;
coapHost = coapConfig.host || process.env.IP;

But C9 display this errors :(

Running Node Process
Your code is running at 'https://skynet-c9-syccon.c9.io'.
Important: use 'process.env.PORT' as the port and 'process.env.IP' as the host in your scripts!
info: socket.io started
Skynet connected to MQTT broker
No MQTT server found.
SSSSS kk tt
SS kk kk yy yy nn nnn eee tt
SSSSS kkkkk yy yy nnn nn ee e tttt
SS kk kk yyyyyy nn nn eeeee tt
SSSSS kk kk yy nn nn eeeee tttt
yyyyy
Skynet development environment loaded...
Error: bind EACCES
at errnoException (dgram.js:454:11)
at dgram.js:207:28
at /var/lib/stickshift/539bee974382ec6b2000020e/app-root/data/873260/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:177:31
at dns.js:72:18
at /var/lib/stickshift/539bee974382ec6b2000020e/app-root/data/873260/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:177:31
at process._tickDomainCallback (node.js:459:13)
at process. (/var/lib/stickshift/539bee974382ec6b2000020e/app-root/data/873260/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/index.js:18:15)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:901:3
restify listening at http://127.2.187.129:8080

from meshblu.

KAXER avatar KAXER commented on July 19, 2024

Also in Heroku when I try to run the app , log file display me this:
Jun 16 09:37:33 sycconet heroku/router: at=error code=H10 desc="App crashed" method=GET path="/" host=sycconet.herokuapp.com request_id=dfc1b0ca-9561-4f6d-838f-5ad7b7cebc07 fwd="63.70.73.50" dyno= connect= service= status=503 bytes=
Jun 16 09:37:33 sycconet heroku/router: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sycconet.herokuapp.com request_id=f284230a-6fc7-4ba6-921b-5973cd1a0c53 fwd="63.70.73.50" dyno= connect= service= status=503 bytes=

from meshblu.

 avatar commented on July 19, 2024

It looks like you may have missed the environment variables on restify for http.

from meshblu.

 avatar commented on July 19, 2024

Since Heroku probably only gives your app 1 port, you may need to restrict skynet to 1 protocol (maybe http which includes websockets) try also disabling MQTT and coap after you make your environment variable change for restify.

from meshblu.

KAXER avatar KAXER commented on July 19, 2024

Hi, Chris
What kind of hosting do you recommend to deploy skynet ?
Maybe Heroku is not my best option

from meshblu.

 avatar commented on July 19, 2024

I'm convinced that you can get SkyNet to run on Heroku by limiting the install to 1 port running HTTP and WebSockets. I agree that it's probably not the best option.

We run skynet.im cloud on Amazon AWS; however, I have run it on Digital Ocean as well - basically another server with VPS or SSH access allowing you to run under multiple ports.

I have even run SkyNet on my Raspberry Pi :)

from meshblu.

chrismatthieu avatar chrismatthieu commented on July 19, 2024

Our config.js has been updated to support environment variables on all parameters. This should be more friendly with Heroku; however, you will still only be able to run Meshblu on 1 port for HTTP and WebSockets. MQTT and CoAP require additional ports and Heroku only allows 1 per app. You could simply disable MQTT and CoAP by leaving their environment variables out of the deploy.

from meshblu.

KAXER avatar KAXER commented on July 19, 2024

Thank You Chris.

from meshblu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.