FabMo / FabMo-Engine

The FabMo Engine - A software and apps ecosystem for digital fabrication.
http://gofabmo.org/
Apache License 2.0
55 stars 22 forks source link

The engine hangs on start-up #37

Closed gordonab closed 9 years ago

gordonab commented 9 years ago

In the process of testing the VU command changes and I can't get the engine to start without hanging. It gets to the info: Connecting to G2... most of the time and made it to info: Configuring G2 once. An error message is returned if I wait long enough:

events.js:72 throw er; // Unhandled 'error' event

But, I can't locate the events.js to try and fix the issue.

ryansturmer commented 9 years ago

Events.js is a node internal library... the error isn't actually there. Can you set the log_level to 'debug' in config/data/engine.json and send me the output?

gordonab commented 9 years ago

Thanks for the detailed instructions. Here is the output when attempting to start the server. Let me know if you need me to try anything.

info: Loading engine configuration... [server] info: Applying engine configuration... [server] info: Connecting to G2... [server] debug: <----1412258153697---- {"r":{"fv":0.970,"fb":47.08,"hp":3,"hv":0,"msg":"SYSTEM READY"},"f":[1,0,0,8377]} [g2] debug: ----1412258153700----> {"gun":0} [g2] debug: ----1412258153701----> M30 [g2] debug: ----1412258153702----> {"sr":null} [g2] debug: ----1412258153704----> {"sr":null} [g2] debug: <----1412258153708---- {"sr":{"line":0,"vel":0.00,"mpox":0.000,"mpoy":0.000,"mpoz":0.000,"mpoa":0.000,"coor":1,"o fsa":0.000,"ofsx":0.000,"ofsy":0.000,"ofsz":0.000,"dist":0,"unit":1,"stat":3,"homz":0,"homy":0,"homx":0,"momo":4}} [g2] info: Configuring G2... [server] debug: State change: idle -> ,3 [gcode] debug: <----1412258153713---- {"r":{"gun":0},"f":[1,0,10,6836]} [g2] debug: <----1412258153714---- {"r":{},"f":[1,0,4,4397]} [g2] debug: <----1412258153715---- {"sr":{"stat":4}} [g2] debug: State change: idle -> 3,4 [gcode] debug: <----1412258153716---- {"r":{"sr":{"line":0,"vel":0.00,"mpox":0.000,"mpoy":0.000,"mpoz":0.000,"mpoa":0.000,"coor" :1,"ofsa":0.000,"ofsx":0.000,"ofsy":0.000,"ofsz":0.000,"dist":0,"unit":1,"stat":4,"homz":0,"homy":0,"homx":0,"momo":4}}, "f":[1,0,12,6203]} [g2] debug: ----1412258153719----> {"gun":0} [g2] debug: ----1412258153720----> {"gco":2} [g2] debug: ----1412258153720----> {"1ma":0} [g2] debug: ----1412258153721----> {"2ma":1} [g2] debug: ----1412258153721----> {"3ma":2} [g2] debug: ----1412258153722----> {"4ma":3} [g2] debug: ----1412258153722----> {"5ma":4} [g2] debug: ----1412258153723----> {"6ma":5} [g2] debug: ----1412258153723----> {"1sa":1.8} [g2] debug: ----1412258153724----> {"2sa":1.8} [g2] debug: ----1412258153725----> {"3sa":1.8} [g2] debug: ----1412258153725----> {"4sa":1.8} [g2] debug: ----1412258153726----> {"5sa":1.8} [g2] debug: ----1412258153726----> {"6sa":1.8} [g2] debug: ----1412258153727----> {"1tr":0.5} [g2] debug: ----1412258153727----> {"2tr":0.5} [g2] debug: ----1412258153728----> {"3tr":0.5} [g2] debug: ----1412258153729----> {"4tr":0.5} [g2] debug: ----1412258153729----> {"5tr":0.5} [g2] debug: ----1412258153730----> {"6tr":0.5} [g2] debug: ----1412258153730----> {"1mi":10} [g2] debug: ----1412258153731----> {"2mi":10} [g2] debug: ----1412258153732----> {"3mi":10} [g2] debug: ----1412258153732----> {"4mi":10} [g2] debug: ----1412258153733----> {"5mi":10} [g2] debug: ----1412258153733----> {"6mi":10} [g2] debug: ----1412258153734----> {"xvm":360} [g2] debug: ----1412258153735----> {"yvm":360} [g2] debug: ----1412258153737----> {"zvm":360} [g2] debug: ----1412258153739----> {"xfr":720} [g2] debug: ----1412258153741----> {"yfr":720} [g2] debug: ----1412258153743----> {"zfr":720} [g2] debug: ----1412258153745----> {"ja":5000} [g2] debug: ----1412258153747----> {"xjm":2500000} [g2] debug: ----1412258153748----> {"yjm":2500000} [g2] debug: ----1412258153750----> {"zjm":2500000} [g2] debug: ----1412258153752----> {"xtm":25} [g2] debug: ----1412258153753----> {"ytm":19} [g2] debug: ----1412258153755----> {"ztm":6.5} [g2] debug: ----1412258153757----> {"xjh":10000000000} [g2] debug: ----1412258153759----> {"yjh":10000000000} [g2] debug: ----1412258153760----> {"zjh":10000000000} [g2] debug: ----1412258153762----> {"ajh":10000000000} [g2] debug: ----1412258153764----> {"bjh":10000000000} [g2] debug: ----1412258153766----> {"cjh":10000000000} [g2] debug: ----1412258153768----> {"xsn":1} [g2] debug: ----1412258153770----> {"ysn":1} [g2] debug: ----1412258153772----> {"zsn":0} [g2] debug: ----1412258153773----> {"asn":0} [g2] debug: ----1412258153775----> {"xsx":0} [g2] debug: ----1412258153777----> {"ysx":0} [g2] debug: ----1412258153779----> {"zsx":0} [g2] debug: ----1412258153781----> {"asx":0} [g2] debug: ----1412258153783----> {"xsv":60} [g2] debug: ----1412258153785----> {"ysv":60} [g2] debug: ----1412258153786----> {"zsv":60} [g2] debug: ----1412258153788----> {"asv":60} [g2] debug: ----1412258153790----> {"xlv":30} [g2] debug: ----1412258153792----> {"ylv":30} [g2] debug: ----1412258153793----> {"zlv":30} [g2] debug: ----1412258153795----> {"alv":30} [g2] debug: ----1412258153797----> {"xzb":0.375} [g2] debug: ----1412258153799----> {"yzb":0.375} [g2] debug: ----1412258153801----> {"zzb":0.375} [g2] debug: ----1412258153803----> {"xlb":0.125} [g2] debug: ----1412258153805----> {"ylb":0.125} [g2] debug: ----1412258153806----> {"zlb":0.125} [g2] debug: ----1412258153808----> {"g55x":0} [g2] debug: ----1412258153810----> {"g55y":0} [g2] debug: ----1412258153812----> {"st":0} [g2] debug: <----1412258153814---- {"r":{"sr":{"line":0,"vel":0.00,"mpox":0.000,"mpoy":0.000,"mpoz":0.000,"mpoa":0.000,"coor" :1,"ofsa":0.000,"ofsx":0.000,"ofsy":0.000,"ofsz":0.000,"dist":0,"unit":1,"stat":4,"homz":0,"homy":0,"homx":0,"momo":4}}, "f":[1,0,12,6203]} [g2] debug: <----1412258153816---- {"r":{"gun":0},"f":[1,0,10,6836]} [g2] debug: <----1412258153822---- {"r":{"gco":2},"f":[1,0,10,6591]} [g2] debug: <----1412258153823---- {"r":{"1ma":0},"f":[1,0,10,7975]} [g2] debug: <----1412258153824---- {"r":{"2ma":1},"f":[1,0,10,2463]} [g2] debug: <----1412258153826---- {"r":{"3ma":2},"f":[1,0,10,3786]} [g2] debug: <----1412258153827---- {"r":{"4ma":3},"f":[1,0,10,8273]} [g2] debug: <----1412258153829---- {"r":{"5ma":4},"f":[1,0,10,2761]} [g2] debug: <----1412258153831---- {"r":{"6ma":5},"f":[1,0,10,4084]} [g2] debug: <----1412258153837---- {"r":{"1sa":1.800},"f":[1,0,12,328]} [g2] debug: <----1412258153838---- {"r":{"2sa":1.800},"f":[1,0,12,2462]} [g2] debug: <----1412258153839---- {"r":{"3sa":1.800},"f":[1,0,12,1432]} [g2] debug: <----1412258153841---- {"r":{"4sa":1.800},"f":[1,0,12,402]} [g2] debug: <----1412258153843---- {"r":{"5sa":1.800},"f":[1,0,12,9371]} [g2] debug: <----1412258153845---- {"r":{"6sa":1.800},"f":[1,0,12,1506]} [g2] debug: <----1412258153846---- {"r":{"1tr":0.5000},"f":[1,0,12,9836]} [g2] debug: <----1412258153851---- {"r":{"2tr":0.5000},"f":[1,0,12,6382]} [g2] debug: <----1412258153851---- {"r":{"3tr":0.5000},"f":[1,0,12,2928]} [g2] debug: <----1412258153853---- {"r":{"4tr":0.5000},"f":[1,0,12,9473]} [g2] debug: <----1412258153855---- {"r":{"5tr":0.5000},"f":[1,0,12,6019]} [g2] debug: <----1412258153856---- {"r":{"6tr":0.5000},"f":[1,0,12,2565]} [g2] debug: <----1412258153859---- {"r":{"1mi":10,"msg":"* WARNING * Setting non-standard microstep value"},"f":[1,0,11,8 662]} [g2] debug: <----1412258153860---- {"r":{"2mi":10,"msg":"* WARNING * Setting non-standard microstep value"},"f":[1,0,11,6 726]} [g2] debug: <----1412258153861---- {"r":{"3mi":10,"msg":"* WARNING * Setting non-standard microstep value"},"f":[1,0,11,4 790]} [g2] debug: <----1412258153864---- {"r":{"4mi":10,"msg":"* WARNING * Setting non-standard microstep value"},"f":[1,0,11,2 854]} [g2] debug: <----1412258153865---- {"r":{"5mi":10,"msg":"* WARNING * Setting non-standard microstep value"},"f":[1,0,11,9 18]} [g2] debug: <----1412258153867---- {"r":{"6mi":10,"msg":"* WARNING * Setting non-standard microstep value"},"f":[1,0,11,8 981]} [g2] debug: <----1412258153872---- {"r":{"xvm":360},"f":[1,0,12,1600]} [g2] debug: <----1412258153873---- {"r":{"yvm":360},"f":[1,0,12,3650]} [g2] debug: <----1412258153875---- {"r":{"zvm":360},"f":[1,0,12,5700]} [g2] debug: <----1412258153876---- {"r":{"xfr":720},"f":[1,0,12,7327]} [g2] debug: <----1412258153878---- {"r":{"yfr":720},"f":[1,0,12,9377]} [g2] debug: <----1412258153880---- {"r":{"zfr":720},"f":[1,0,12,1428]} [g2] debug: <----1412258153881---- {"r":{"ja":5000},"f":[1,0,12,2225]} [g2] debug: <----1412258153887---- {"r":{"xjm":2},"f":[1,0,16,5484]} [g2] debug: <----1412258153888---- {"r":{"yjm":2},"f":[1,0,16,9157]} [g2] debug: <----1412258153889---- {"r":{"zjm":2},"f":[1,0,16,2831]} [g2] debug: <----1412258153890---- {"r":{"xtm":25.000},"f":[1,0,11,3224]} [g2] debug: <----1412258153892---- {"r":{"ytm":19.000},"f":[1,0,11,4651]} [g2] debug: <----1412258153894---- {"r":{"ztm":6.500},"f":[1,0,12,1424]} [g2] debug: <----1412258153895---- {"r":{"xjh":10000},"f":[1,0,20,10]} [g2] debug: <----1412258153900---- {"r":{"yjh":10000},"f":[1,0,20,8979]} [g2] debug: <----1412258153902---- {"r":{"zjh":10000},"f":[1,0,20,1114]} [g2] debug: <----1412258153903---- {"r":{"ajh":10000},"f":[1,0,20,1552]} [g2] debug: <----1412258153904---- {"r":{"bjh":10000},"f":[1,0,20,3686]} [g2] debug: <----1412258153907---- {"r":{"cjh":10000},"f":[1,0,20,2656]} [g2] debug: <----1412258153917---- {"r":{"xsn":1},"f":[1,0,10,4745]} [g2] debug: <----1412258153919---- {"r":{"ysn":1},"f":[1,0,10,8418]} [g2] debug: <----1412258153925---- {"r":{"zsn":0},"f":[1,0,10,1278]} [g2] debug: <----1412258153926---- {"r":{"asn":0},"f":[1,0,10,5265]} [g2] debug: <----1412258153927---- {"r":{"xsx":0},"f":[1,0,10,7003]} [g2] debug: <----1412258153929---- {"r":{"ysx":0},"f":[1,0,10,677]} [g2] debug: <----1412258153930---- {"r":{"zsx":0},"f":[1,0,10,1186]} [g2] debug: <----1412258153932---- {"r":{"asx":0},"f":[1,0,10,5173]} [g2] debug: <----1412258153933---- {"r":{"xsv":60},"f":[1,0,11,5585]} [g2] debug: <----1412258153939---- {"r":{"ysv":60},"f":[1,0,11,474]} [g2] debug: <----1412258153940---- {"r":{"zsv":60},"f":[1,0,11,2198]} [g2] debug: <----1412258153941---- {"r":{"asv":60},"f":[1,0,11,9478]} [g2] debug: <----1412258153943---- {"r":{"xlv":30},"f":[1,0,11,2134]} [g2] debug: <----1412258153944---- {"r":{"ylv":30},"f":[1,0,11,7022]} [g2] debug: <----1412258153946---- {"r":{"zlv":30},"f":[1,0,11,1911]} [g2] debug: <----1412258153948---- {"r":{"alv":30},"f":[1,0,11,6027]} [g2] debug: <----1412258153949---- {"r":{"xzb":0.375},"f":[1,0,14,2097]} [g2] debug: <----1412258153954---- {"r":{"yzb":0.375},"f":[1,0,14,4231]} [g2] debug: <----1412258153955---- {"r":{"zzb":0.375},"f":[1,0,14,3201]} [g2] debug: <----1412258153955---- {"r":{"xlb":0.125},"f":[1,0,14,7103]} [g2] debug: <----1412258153957---- {"r":{"ylb":0.125},"f":[1,0,14,9237]} [g2] debug: <----1412258153959---- {"r":{"zlb":0.125},"f":[1,0,14,8207]} [g2] debug: <----1412258153961---- {"r":{"g55x":0.000},"f":[1,0,11,6317]} [g2] debug: <----1412258153965---- {"r":{"g55y":0.000},"f":[1,0,11,8367]} [g2]

jlucidar commented 9 years ago

the web server doesn't start, anything running on port 8080 ? Ryan, did you change the port with the new settings stuff ?

ryansturmer commented 9 years ago

i'm back in town and looking at this now, guys. Sorry for the delay.

The default port is 9876 now, since the detection server defaults to 8080 - was this your intent, jimmy?

ryansturmer commented 9 years ago

@gordonab

I bet this is a bug we've seen before.

Go to the config directory, and under both default and data remove the configuration setting for st - you are using an older G2 firmware that doesn't support setting the switch type, and I think that it's crashing the system.

jlucidar commented 9 years ago

yes, that's probably the problem (the st setting). I will remove it from the master branch. For the port, Windows show display a popup asking if you allow the engine to uset. the default port should be configurable. I used 8080 on all my systems, but If you try to run the dashboard on the same computer, you need to have two distinct ports. That's probably why I put 9876 (even if I don't remember doing it ...)

gordonab commented 9 years ago

Getting rid of the ST in the G2 file worked, as well as changing the address to 9876. Is the later going to be a permanent change or is it going back to 8080?

jlucidar commented 9 years ago

We didn't really decide what the port numbers will be ... We should start a discussion on it, ...