Firestorm not cloneing?

Any idea why firestorm wont actually clone to my other PB’s? All v3, all running 3.18, all on same LAN, visible to Firestorm, etc…

I click clone on my “good” PB, check the boxes on my other 3 PBs, click the red clone button, and a little popup of the clone progress flashes for about 2 seconds and then nothing. The patterns on the clone-ees dont change.

Any idea where I could look?

HI @cryo2579 ,
Do you get anything on Firestorm’s console/logs? If running via pm2, try pm2 logs command.

Sweet, thanks for that command!

A ton, actually.

1|server | deleting ASqNuSEqwtCFB8HBf from 192.168.1.64
1|server | deleting kcv3KAYLDbnEdJvBC from 192.168.1.61
1|server | unable to clone patterns { FetchError: request to http://192.168.1.6 4/delete?path=/p/ASqNuSEqwtCFB8HBf failed, reason: read ECONNRESET
1|server | at ClientRequest. (/home/pi/Firestorm/node_modules/no de-fetch/lib/index.js:1461:11)
1|server | at ClientRequest.emit (events.js:198:13)
1|server | at ClientRequest.EventEmitter.emit (domain.js:448:20)
1|server | at Socket.socketErrorListener (_http_client.js:401:9)
1|server | at Socket.emit (events.js:198:13)
1|server | at Socket.EventEmitter.emit (domain.js:448:20)
1|server | at emitErrorNT (internal/streams/destroy.js:91:8)
1|server | at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
1|server | at process._tickCallback (internal/process/next_tick.js:63:19)
1|server | message:
1|server | ‘request to http://192.168.1.64/delete?path=/p/ASqNuSEqwtCFB8HBf failed, reason: read ECONNRESET’,
1|server | type: ‘system’,
1|server | errno: ‘ECONNRESET’,
1|server | code: ‘ECONNRESET’ }
1|server | deleting BGxcyKwr9jwmu3BnZ from 192.168.1.62
1|server | deleting D84ftKDTWhfwyWiTA from 192.168.1.62
1|server | deleting zHFhAJEBGR5JRjZMh from 192.168.1.62
1|server | deleting Pt2dW6CzX3FFCeRsM from 192.168.1.62
1|server | deleting zLmrj6skAcbLpNjJJ from 192.168.1.62
1|server | deleting YgyHMNe6MiZHWEmcn from 192.168.1.62
1|server | deleting fbtqn4Mdd9PTxi8Hv from 192.168.1.62
1|server | deleting kQqEfrTtc8GnQ2SZY from 192.168.1.62
1|server | deleting MWxEvvSLnPv8d9EKa from 192.168.1.62
1|server | deleting L9bzgsEt6WGPkB53X from 192.168.1.62
1|server | deleting QraaBkRMgtNL2B9JX from 192.168.1.62
1|server | deleting HhMhNZmZzLEqoDHGg from 192.168.1.62
1|server | deleting Z4zaynXD55mETxcao from 192.168.1.62
1|server | deleting fdQoJeCHnd8XrAPL3 from 192.168.1.62
1|server | deleting M2vgw8gg5hrLcud2n from 192.168.1.62
1|server | deleting Gob4GzmRoGr3tPJHk from 192.168.1.62
0|server | listening on 80
0|server | >
0|server | { Error: bind EADDRINUSE 0.0.0.0:1889
0|server | at state.handle.lookup (dgram.js:242:18)
0|server | at process._tickCallback (internal/process/next_tick.js:63:19)
0|server | at Function.Module.runMain (internal/modules/cjs/loader.js:834:1 1)
0|server | at startup (internal/bootstrap/node.js:283:19)
0|server | at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
0|server | errno: ‘EADDRINUSE’,
0|server | code: ‘EADDRINUSE’,
0|server | syscall: ‘bind’,
0|server | address: ‘0.0.0.0’,
0|server | port: 1889 }
PM2 | App [server:0] exited with code [1] via signal [SIGINT]

Oddly enough, that was the first time this behavior was displayed:

on 192.168.1.62, ALL of the patterns were deleted.

Hmm, connection reset, connectivity issues perhaps? Or just flooded with too many requests and it dropped one. Perhaps improved error handling in Firestorm would help here.

Have you tried this a few times, and if so does it always error out? In the same spot, or different places?

The code that does cloning is here:

It fetches the pattern list from both, and deletes patterns (based on ID) that are on the destination but not the source. Then patterns are copied over. The error above indicates a delete failed, and that likely threw an error that prevented the copy part from happening.

This chunk repeats itself ~ every 5 seconds.

0|server | listening on 80
0|server | >
0|server | { Error: bind EADDRINUSE 0.0.0.0:1889
0|server | at state.handle.lookup (dgram.js:242:18)
0|server | at process._tickCallback (internal/process/next_tick.js:63:19)
0|server | at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
0|server | at startup (internal/bootstrap/node.js:283:19)
0|server | at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
0|server | errno: ‘EADDRINUSE’,
0|server | code: ‘EADDRINUSE’,
0|server | syscall: ‘bind’,
0|server | address: ‘0.0.0.0’,
0|server | port: 1889 }
PM2 | App [server:0] exited with code [1] via signal [SIGINT]
PM2 | App [server:0] starting in -fork mode-
PM2 | App [server:0] online

Trying to clone .63 onto .62

This resulted in most of .62’s patterns being deleted

Can’t find any rhyme or reason as to why certain patterns stayed. Some are home grown, some are uploaded

PM2 | App [server:0] exited with code [1] via signal [SIGINT]
PM2 | App [server:0] starting in -fork mode-
PM2 | App [server:0] online
1|server | clonePrograms { from: 9237565, to: [ ‘12644925’ ] }
1|server | sending to 9237565 at 192.168.1.63 {“getConfig”:true,“listPrograms”:true}
1|server | sending to 12644925 at 192.168.1.62 {“getConfig”:true,“listPrograms”:true}
1|server | destKeys [ ‘zChviggocKCpEQCSh’,
1|server | ‘Sh2iNDNLW8BMtGHow’,
1|server | ‘k3h4w2k22g5xRF7aJ’,
1|server | ‘WFYrAajbFs8oCaX2a’,
1|server | ‘ic7wm9wYxaeNTEueM’,
1|server | ‘tXfdf6Rtu8xBzuF65’,
1|server | ‘PeCT9yNWuJwdcSniT’,
1|server | ‘868qdEqqG6nG2vSXQ’,
1|server | ‘HteQPKT4GGpQhC9MK’,
1|server | ‘eoYnDFwcB9kzDamFD’,
1|server | ‘exXMyeBWPi3LuWSsW’,
1|server | ‘7KmjZGft4DiS9s8uE’,
1|server | ‘mTYCqDFz5M5oc6o2g’,
1|server | ‘itE2EpYJy6g92pGL5’,
1|server | ‘cgcr5MvY8j4FkyEY9’,
1|server | ‘SZvKFhcnF7LKpvqDo’,
1|server | ‘Ed4yFK25qAE978fpn’ ]
1|server | sourceKeys [ ‘7XT2JNLkLaXc3erFX’,
1|server | ‘vkpGsR88dcJmXfevp’,
1|server | ‘Ta9zpcfS6LbbsMSTk’,
1|server | ‘9YNBonyhXfyFjpYzJ’,
1|server | ‘WpNe44BMPk6mf9cLy’,
1|server | ‘rLmiYoqHLLRW2D9RC’,
1|server | ‘vtMpngfkgNKQBmJjX’,
1|server | ‘TA8GSkxFfaEyXW9Fo’,
1|server | ‘6PxFY3tpeTMNK5JSq’,
1|server | ‘dLfLrThh34erAxPaj’,
1|server | ‘WYqLzxdDWMRX3GveN’,
1|server | ‘wrgLMHq33MW8AaBvr’,
1|server | ‘fsywHjfwXYqm4jouf’,
1|server | ‘BxgkrQTHPkhcM6a24’,
1|server | ‘LR4KPE7qNStxaFMaA’,
1|server | ‘wDn9FrZh8zZfKweL4’,
1|server | ‘wPnJGj5d5hzgeLbZD’ ]
1|server | keysToRemove [ ‘zChviggocKCpEQCSh’,
1|server | ‘Sh2iNDNLW8BMtGHow’,
1|server | ‘k3h4w2k22g5xRF7aJ’,
1|server | ‘WFYrAajbFs8oCaX2a’,
1|server | ‘ic7wm9wYxaeNTEueM’,
1|server | ‘tXfdf6Rtu8xBzuF65’,
1|server | ‘PeCT9yNWuJwdcSniT’,
1|server | ‘868qdEqqG6nG2vSXQ’,
1|server | ‘HteQPKT4GGpQhC9MK’,
1|server | ‘eoYnDFwcB9kzDamFD’,
1|server | ‘exXMyeBWPi3LuWSsW’,
1|server | ‘7KmjZGft4DiS9s8uE’,
1|server | ‘mTYCqDFz5M5oc6o2g’,
1|server | ‘itE2EpYJy6g92pGL5’,
1|server | ‘cgcr5MvY8j4FkyEY9’,
1|server | ‘SZvKFhcnF7LKpvqDo’,
1|server | ‘Ed4yFK25qAE978fpn’ ]
1|server | deleting zChviggocKCpEQCSh from 192.168.1.62
1|server | deleting Sh2iNDNLW8BMtGHow from 192.168.1.62
1|server | deleting k3h4w2k22g5xRF7aJ from 192.168.1.62
1|server | deleting WFYrAajbFs8oCaX2a from 192.168.1.62
1|server | deleting ic7wm9wYxaeNTEueM from 192.168.1.62
1|server | deleting tXfdf6Rtu8xBzuF65 from 192.168.1.62
1|server | deleting PeCT9yNWuJwdcSniT from 192.168.1.62
1|server | deleting 868qdEqqG6nG2vSXQ from 192.168.1.62
1|server | deleting HteQPKT4GGpQhC9MK from 192.168.1.62
1|server | deleting eoYnDFwcB9kzDamFD from 192.168.1.62
1|server | deleting exXMyeBWPi3LuWSsW from 192.168.1.62
1|server | deleting 7KmjZGft4DiS9s8uE from 192.168.1.62
0|server | listening on 80

See above, it may seem arbitrary, but it works based on the internal ID (not name), so your destination probably didn’t have many pattern IDs in common.

The “Error: bind EADDRINUSE 0.0.0.0:1889” issue looks like you might have multiple copies running. Do you have multiple entries in pm2, or another copy running manually? It looks like that copy is failing to start (probably from the bind error), and pm2 is restarting it every 5 seconds.

See if you have multiple pm2 entires:

pm2 list 
1 Like

Lol, you must’ve sensed I was reading through the manual of pm2.

Yep, not sure how, but I have two running. I tried killing process 0, no dice. I’ll reboot and see if that helps.
*
pi@raspberrypi:~ $ pm2 list
┌─────┬───────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼───────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ server │ default │ 0.1.0 │ fork │ 20144 │ 2s │ 479… │ online │ 100% │ 37.2mb │ pi │ disabled │
│ 1 │ server │ default │ 0.1.0 │ fork │ 965 │ 42h │ 1 │ online │ 0% │ 66.1mb │ pi │ disabled │
└─────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

Gotcha. So if I’m following you, even though the patterns code might be the same, their IDs assigned by the system are not. Would it be best for me to delete ALL patterns on everything except one PB and have those get cloned over?

Yep, the ID is randomly assigned when a new pattern is created. Edits save to the same ID.

I’d clear up the duplicate instance in pm2 before continuing.

You could clear out the destination PB first, that would reduce the amount of work clone has to do. It’s going to overwrite every pattern anyway! Also, I would do this one at a time if you are having problems. Just don’t get the source and destination mixed up. I’d definitely recommend exporting any patterns you want to keep as backups just in case!

Are IDs kept in the .epe or lost? So if I write a pattern, and save it, and upload it to the pattern library, when someone grabs it, and uploads it to their PB, it gets a new #?
Wondering about how we can upgrade patterns? (or is that not possible?)

They are not in the .epe. They’re only kept for successive edits to that pattern on that one board. The exact same pattern will have different program IDs on different boards.

1 Like

OK, so wierd thing.

It worked once.

I stopped that rogue pm2 process. Deleted everything off of .62

Tried cloning, got the same error message.

Tried cloning again for shits and giggles, and it worked.

Now, tried the process again with a different one (same source), not working.

EDIT: Worked again. Looks like after deleting, it goes through a purge of IDs that maybe aren’t there? And then once their wiped away, it succesfully puts the IDs correctly