MONITOR 1.4.7 does not seem to like my WiFi mesh setup for auto-uploads

The Problem: Repetier-Server Monitor v1.4.7 fails when auto-uploading from a device connected to an auxiliary node on a WiFi Mesh setup.

I am using a TP-Link Onemesh/Easymesh setup for coverage over my land. My workshop is pretty remote, using a TP-link AX21 that may or may not bridge between 3 TP-Link RE700xs depending on dynamic routing. The main router is a TP-link AXE5400.

All of my RepServer Pi3s are hardwired via Ethernet on the AX21 router in the workshop, which is in MESH mode

So, to conceptualize:   AX21 (workshop router in MESH mode, All pis are on this, and I am monitoring from this node)<->RE700x (Repeater node)<->AXE5400 (Main router).

When running RepServer Monitor from my workshop PC, any upload from the monitored folders usually fail-- seems to just stall and then after a while, give me an UPLOAD FAILED message through notifications. Sometimes it will work, but I've had it duplicate the files multiple times, only send a 0 byte file, but usually just fail completely.

The connection is STABLE - I've tested it extensively, and ping is OK, PL is OK, and it's not hopping nodes very often. The other test is uploading it from a device connected to the main AXE5400 router, and it seems to work fine.

I suspect it's some kind of bizarre network traversal that's confusing MONITOR. Of course, running a tracert only shows the direct path to the device i'm trying to upload to. 

Is there a way to look at what Monitor is doing behind the scenes to see why it's failing so consistently? 


Comments

  • Monitor is just using node to communicate using the os. Depending on where you upload it might also communicate directly from browser. So what you can do to debug this is starting monitor from commandline. That way you see node error messages in the console you started it. In addition add --dev to the monitor app as parameter to see the javascript debug tools. Go to console or network to see failures in datatransfer or javascript. Most likely it is a timeout issue. Can you say if the problematic connection is slow or fast?
  • Just tested it, it's around 30Mbps down/16.08Mbps up -- not AMAZING but certainly not too bad, should still be pulling 1-2mb/s upload. I will add --dev and report back after I do a few tests.
  • edited April 22
    Continued to crank away at it and even fired up Wireshark - the only real errors i am seeing are TCP Dup Acks while sniffing, and within the actual app, it only gives me an error when they fail- no sort of retransmit or routing issues.

    Annoyingly, it's like Schrodinger's cat. As i sniffed it, I have a test set of 20 GCodes that I use for debugging this - 18 were successful! 2 failed, but i can't correlate it to any specific error.

    Any specific filtering i should drill down to that may help further debug? I seem to get a lot of traffic on Port 3344 (Which is the RepServer ports, of course), and then stuff on 5104* and 5105* The TCP Dup ACKs that I was able to capture happened on Ports 51040, 51052.

    Normal RepServer Monitor operation seems to be happening on 51014 if i am just looking at the overview with only TCP traffic, with a lot more activity if i actually open a printer- Lots of websocket activity happens then.

    May I ask how the folder auto-uploader works in a little more detail, so I can refine my tests here?
  • 5104* seems to be electron communication browser with node backend. The upload is handled in background node using this function using axios and 10 minute timeout:
      ipcMain.on('executeUpload', (event, ana) => {
    try {
    let form = new RSFormData()
    let id = ana.path + '/' + ana.filename
    bufferedFiles[id] = ana
    if (ana.command === 1) {
    // queue
    form.append('autostart', 'false')
    } else if (ana.command === 2) {
    form.append('autostart', 'true')
    } else if (ana.command === 3) {
    form.append('group', ana.group === 'Default' ? '#' : ana.group)
    }
    form.append('a', 'upload')
    ana.extraParams.forEach(x => {
    form.append(x.key, x.value)
    })
    let fullPath = watchedDirectory + '/' + ana.path + '/' + ana.filename
    if (ana.url === null) {
    fs.unlinkSync(fullPath)
    return
    }
    form.append('name', ana.filename)
    if (!fs.existsSync(fullPath)) {
    console.log('file ' + fullPath + ' was deleted before send')
    return
    }
    console.log('uploading ' + fullPath)
    form.append('filename', fsPromises.open(fullPath, 'r')
    // function (next) {next(fs.createReadStream(fullPath)) }
    , {
    filename: ana.filename
    })
    axios.create({
    headers: form.getHeaders(),
    maxBodyLength: 100 * 1024 * 1024 * 1024 * 1024,
    maxContentLength: 100 * 1024 * 1024 * 1024 * 1024,
    timeout: 600000 // 10 minutes timeout
    }).post(ana.url, form)
    // axios.post(ana.url, form, config)
    .then(() => {
    // success
    fs.unlinkSync(fullPath)
    delete bufferedFiles[id]
    win.webContents.send('os_notify', 0, 'Upload Finished', 'Uploading ' + ana.filename + ' finished.')
    }, (e) => {
    console.error('Upload failed', e)
    // fail
    ana.retry++
    if (ana.retry < 4) {
    setTimeout(() => {
    handleUpload(ana)
    }, 4000 * ana.retry)
    } else { // put back to test later
    let srv = serverDirs[ana.serverUUID]
    ana.retry = 0
    srv.fileList[id] = ana
    delete bufferedFiles[id]
    win.webContents.send('os_notify', 1, 'Upload Failed', 'Uploading ' + ana.filename + ' failed.')
    }
    })
    } catch (e) {
    console.log('error in executeUpload', e)
    }
    })
    }

    You should see the messages in console where you started the monitor for the upload. Port 3344 is used for websocket connection to all connected servers.

    Unfortunately the node file is in app.asar so not directly visible and not modifyable, otherwise it would be in background.js. Anyhow as long as files are not that big 10 minute timeout should be no problem.
Sign In or Register to comment.