Microgateway cannot start in Windows 10

When I start the microgateway, it throws error as below. I am using Windows 10, nodejs v9.10.1 and edgemicro 2.5.15

PROCESS PID : 11152
fs.js:667
  return binding.open(pathModule.toNamespacedPath(path),
                 ^


Error: ENOENT: no such file or directory, open 'pipe\C:\Users\demo\edgemicro.pid'
    at Object.fs.openSync (fs.js:667:18)
    at Object.fs.writeFileSync (fs.js:1326:33)
    at Object.fs.appendFileSync (fs.js:1372:6)
    at edgeconfig.get (C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\cli\lib\gateway.js:122:12)
    at C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\lib\network.js:132:13
    at C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\lib\network.js:329:9
    at C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\lib\async.js:726:13
    at C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\lib\async.js:52:16
    at done (C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\lib\async.js:246:17)
    at C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\lib\async.js:44:16
    at C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\lib\async.js:723:17
    at C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\lib\async.js:167:37
    at _loadStatus (C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\lib\network.js:354:9)
    at Request._callback (C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\lib\network.js:225:17)
    at Request.self.callback (C:\Users\demo\scoop\persist\nvm\nodejs\v9.10.1\node_modules\edgemicro\node_modules\microgateway-config\node_modules\request\request.js:186:22)
    at Request.emit (events.js:180:13)
Solved Solved
1 5 374
1 ACCEPTED SOLUTION

Former Community Member
Not applicable

I'll look into this problem Raymond.

Although they are not likely to be related, please don't use Node.js v9. Version 9 doesn't have LTS. v8 is the latest version with LTS.

View solution in original post

5 REPLIES 5

Former Community Member
Not applicable

I'll look into this problem Raymond.

Although they are not likely to be related, please don't use Node.js v9. Version 9 doesn't have LTS. v8 is the latest version with LTS.

Hi @srinandans,

Similar Microgateway issue\error here for different customer on Windows Server 2012:

------------------------------------------------------------------

current nodejs version is v8.11.1

current edgemicro version is 2.5.15

PROCESS PID : 5368

fs.js:646

return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);

^

Error: ENOENT: no such file or directory, open 'pipe\C:\Users\_nambir\edgemicro.pid'

at Object.fs.openSync (fs.js:646:18)

at Object.fs.writeFileSync (fs.js:1299:33)

at Object.fs.appendFileSync (fs.js:1345:6)

at edgeconfig.get (C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\cli\lib\gateway.js:122:12)

at C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-config\lib\network.js:132:1

3

at C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-config\lib\network.js:329:9

at C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\l

ib\async.js:726:13

at C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\l

ib\async.js:52:16

at done (C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-config\node_modules\a

sync\lib\async.js:246:17)

at C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\l

ib\async.js:44:16

at C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\l

ib\async.js:723:17

at C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-config\node_modules\async\l

ib\async.js:167:37

at _loadStatus (C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-config\lib\net

work.js:354:9)

at Request._callback (C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-config\l

ib\network.js:217:17)

at Request.self.callback (C:\Users\_nambir\AppData\Roaming\npm\node_modules\edgemicro\node_modules\microgateway-conf

ig\node_modules\request\request.js:186:22)

at emitTwo (events.js:126:13)

I am using nvm on windows and I change my nodejs from v9.10.1 to v8.11.1, unfortunately, it does not work.

I look into the source code, I found the function getIPCFilePath return path.join('\\\\?\\pipe', process.cwd(), defaultIPCFileName) if the platform is windows. The result path become ''\\\\?\\pipe\\C:\\Users\\chinra\edgemicro.pid'. Why join '\\\\?\\pipe' in the path prefix?

  getIPCFilePath: function getIPCFilePath() {
    if (!isWin) {
      return path.join(process.cwd(), defaultIPCFileName + '.sock');
    } else {
      return path.join('\\\\?\\pipe', process.cwd(), defaultIPCFileName);
    }
  },
  getPIDFilePath: function getPIDFilePath() {
    return path.join(process.cwd(), defaultIPCFileName + '.pid');
  },  

Former Community Member
Not applicable

Please try now. 2.5.16 (with the fix for Windows) was just published.

Thanks, @srinandans, it is work now.