← All tasks
javascriptlog4js-node/log4js-node #1189Not a task: not reproduced

file appender fails with EEXIST

envgap__log4js-node__log4js-node-1189

01 / FAILURE SIGNATURE

As reported upstream

Error: EEXIST: file already exists, mkdir '/tmp'
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
b3e7849a435f062996aa57202966b8e44e2f6446
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

log4js-node/log4js-node #1189 · read the original issue
Why is this trying to create a directory that already exists?



The code is simple:



```

log4js.configure({

            appenders: {

                logs: {

                    type: 'file',

                    filename: '/tmp/ucp-index.log',

                },

            },

            categories: {

                index: { appenders: ['logs'], level: 'debug' },

                default: { appenders: ['logs'], level: 'debug' },

            },

        });

        logger = log4js.getLogger('index');

```



Throws this error every time:



```

Error: EEXIST: file already exists, mkdir '/tmp'

    at Object.fs.mkdirSync (fs.js:872:3)

    at Object.module.exports.makeDirSync (sys/node_modules/streamroller/node_modules/fs-extra/lib/mkdirs/make-dir.js:23:13)

    at RollingFileStream._renewWriteStream (sys/node_modules/streamroller/lib/RollingFileWriteStream.js:241:8)

    at new RollingFileWriteStream (sys/node_modules/streamroller/lib/RollingFileWriteStream.js:76:10)

    at new RollingFileStream (sys/node_modules/streamroller/lib/RollingFileStream.js:18:5)

    at openTheStream (sys/node_modules/log4js/lib/appenders/file.js:17:18)

    at fileAppender (sys/node_modules/log4js/lib/appenders/file.js:59:16)

    at Object.configure (sys/node_modules/log4js/lib/appenders/file.js:117:10)

    at clustering.onlyOnMaster (sys/node_modules/log4js/lib/appenders/index.js:89:27)

    at Object.onlyOnMaster (sys/node_modules/log4js/lib/clustering.js:85:50)

```



This didn't happen yesterday, then I ran `npm i` and now `streamroller` is updated and things are breaking.



This is `log4js` 6.4.1.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]