Flowforge - Error loading settings file

Hey, I am having trouble getting any instance to start up in Flowforge. Its a local install on Amazon Linux 2. Any suggestions on how to troubleshoot? Thanks.

5/24/2023 7:21:34 PM
[system]
Starting Node-RED
5/24/2023 7:21:34 PM
[ ]
Error loading settings file: /opt/flowforge/var/projects/3a9d7b65-b6d2-4016-b4f9-de4d570d24d6/settings.js
5/24/2023 7:21:34 PM
[system]
Node-RED exited rc=0 signal=null

Hi @nohc

Do you have access to the settings file /opt/flowforge/var/projects/3a9d7b65-b6d2-4016-b4f9-de4d570d24d6/settings.js ?

If so, can you share it with me? The FlowForge launcher that generates the settings file shouldn't be able ot generate an invalid file - so it would be helpful to see what has gone wrong here.

Hey, sure thing. This happens with every project and I had removed that one already. Here is a newly created one. I have reinstalled via the install script a couple times and checked what I could think of. Thanks

module.exports = {
    flowFile: 'flows.json',
    flowFilePretty: true,
    adminAuth: require('@flowforge/nr-launcher/adminAuth')({
        baseURL: 'http://REDACTED:12080',
        forgeURL: 'http://REDACTED:3000',
        clientID: 'ffp_wX6cMTieNfctxWQotrd9w76W1TDKFEXdM8LLiVs5OJc',
        clientSecret: 'f4RCbQ-HdNcIxtiuSFw1Ql0pSzg0AghmlUKvG9fgBkBc0JXcm25xs5_jwc05ESfj'
    }),
    credentialSecret: '2496af9faf1f0bda427a9a47d384e4d6db162c292e8110435521ca9c81594254',
    httpAdminRoot: '',
    ui: { path: '/ui'},
    disableEditor: false,
    
    
    tcpInAllowInboundConnections: true,
    udpInAllowInboundConnections: true,
    httpServerOptions: {
        "trust proxy": true
    },
    storageModule: require('@flowforge/nr-launcher/storage'),
    httpStorage: {
        projectID: '87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2',
        baseURL: 'http://REDACTED:3000/storage',
        token: 'fft_CRUbaXKecJ4R0j2mY4yYjGhlfPvpr1DaIkXBxUwe8hs'
    },
    
    logging: {
        console: { level: 'info', metric: false, audit: false, handler: () => {
                const levelNames = {
                    10: "fatal",
                    20: "error",
                    30: "warn",
                    40: "info",
                    50: "debug",
                    60: "trace",
                    98: "audit",
                    99: "metric"
                }
                return (msg) => {
                    let message = msg.msg;
                    try {
                        if (typeof message === 'object' && message !== null && message.toString() === '[object Object]' && message.message) {
                            message = message.message;
                        }
                    } catch(e){
                        message = 'Exception trying to log: '+util.inspect(message);
                    }
                    console.log(JSON.stringify({
                        ts: Date.now(),
                        level: levelNames[msg.level],
                        type: msg.type,
                        name: msg.name,
                        id:msg.id,
                        msg: message
                    }))
                }
            }

        },
        auditLogger: {
            level: 'off', audit: true, handler: require('@flowforge/nr-launcher/auditLogger'),
            loggingURL: 'http://REDACTED:3000/logging',
            projectID: '87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2',
            token: 'fft_CRUbaXKecJ4R0j2mY4yYjGhlfPvpr1DaIkXBxUwe8hs'
        }
    },
    nodesDir: ["/opt/flowforge/app/node_modules/@flowforge/nr-launcher/node_modules/@flowforge/nr-project-nodes","/opt/flowforge/app/node_modules/@flowforge/nr-project-nodes","/opt/flowforge/app/node_modules/@flowforge/nr-launcher/node_modules/@flowforge/nr-file-nodes","/opt/flowforge/app/node_modules/@flowforge/nr-file-nodes","/opt/flowforge/app/node_modules/@flowforge/nr-launcher"],
    "forge-light": {"launcherVersion":"1.7.0","forgeURL":"http://REDACTED:3000","projectURL":"http://REDACTED:3000/project/87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2"},
    editorTheme: {
        theme: 'forge-light',
        page: {
            title: 'FlowForge',
            favicon: "/theme/css/favicon.ico",
        },
        header: {
            title: 'shiny-willow-warbler-1258',
            url: 'http://REDACTED:3000/project/87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2'
        },
        logout: {
            redirect: 'http://REDACTED:3000/project/87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2'
        },
        codeEditor: {
            lib: 'monaco'
        },
        
        tours: true
    },
    nodesExcludes: [],
    externalModules: {
        // autoInstall: true,
        palette: {
            allowInstall: true,
            allowUpload: false,
            denyList: [],
            allowList: ["*"]
        },
        modules: {
            allowInstall: true,
            denyList: [],
            allowList: ["*"]
        }
    },
    functionExternalModules: true,
    flowforge: {
        forgeURL: 'http://REDACTED:3000',
        teamID:  'Lx1zGx2DGP',
        projectID: '87bb59f8-f20a-4a13-9df7-2bfc77fcfdf2',
        launcherVersion: '1.7.0',
        fileStore: {"url":"http://localhost:3001","token":"fft_CRUbaXKecJ4R0j2mY4yYjGhlfPvpr1DaIkXBxUwe8hs"},
        
    },
    runtimeState: {
        enabled: true,
        ui: true
    }
}

Looks like all permissions are consistent and set to ec2-user. I don't see any other errors that I can find in any logs.

.0K -rw-rw-r-- 1 ec2-user ec2-user 119 May 25 09:59 out.log
4.0K -rw-rw-r-- 1 ec2-user ec2-user 115 May 25 09:59 package.json
8.0K -rw-rw-r-- 1 ec2-user ec2-user 4.4K May 25 09:59 settings.js

That settings file is valid. Most odd.

What version Node-RED did you specify in the stack?

Type Default / Node-RED 3.0.2
Template Default
Node-RED Version 3.0.2
Launcher Version 1.7.0
Node.js Version 16.20.0

There are 3 requires in the file (that is normal)

  • require('@flowforge/nr-launcher/adminAuth')
  • require('@flowforge/nr-launcher/storage')
  • require('@flowforge/nr-launcher/auditLogger')

Can you check they exist?

npm list @flowforge/nr-launcher/adminAuth
npm list @flowforge/nr-launcher/storage
npm list @flowforge/nr-launcher/auditLogger

They don't show up, actually.

@flowforge/flowforge-localfs@1.7.1 /opt/flowforge/app
└── (empty)

I'll do a clean install myself so I can check the exact expected location of those modules. Will report back a bit later this afternoon

Thanks, I sent a message through the Flowforge contact page as we are interested in using NR/FF to solve some use cases at my work. I have personally used NR for years in hobby life and was reluctant in getting our team to use it for solving enterprise problems (just out of pure caution) but have had moment after moment of "wow, I think this would totally work... and well," I was not even aware of the challenges Flowforge is addressing until a few days ago and had assumed it was more around commercial IoT/manufacturing, etc. I just wanted to connect the two messages in context for those discussions, independent of your gracious support here. Thanks!

1 Like

Hi @nohc

I've done a clean install locally within an ubuntu vm and everything is working.

The commands @Steve-Mcl asked you to run were not quite right - so the (empty) result was expected.

In the /opt/flowforge/app directory, can you run:

npm list @flowforge/nr-launcher

(without the extra path part at the end)

Here are the results of that command.

After I ran it, I just went ahead and removed the /opt/flowforge dir, recreated it, set permissions, copied the install folder over, ran the install script, etc. Same results when trying to start and instance.

@flowforge/flowforge-localfs@1.7.1 /opt/flowforge/app
└─┬ @flowforge/flowforge@1.7.1
└─┬ @flowforge/localfs@1.7.0
└── @flowforge/nr-launcher@1.7.0

projects]$ ls -lsh
total 0
0 drwxrwxr-x 3 ec2-user ec2-user 61 May 26 01:15

[2023-05-26T01:30:58.334Z] INFO: Starting project d6dea67c-f3b0-465b-b693-b9db4fc62d55 on port 12080
[2023-05-26T01:30:58.474Z] INFO: Set FORGE_NR_PATH to /opt/flowforge/var/stacks/3.0.2
[2023-05-26T01:30:59.230Z] INFO: AUDIT: event: stopped, type: project, id: d6dea67c-f3b0-465b-b693-b9db4fc62d55
[2023-05-26T01:31:53.603Z] INFO: AUDIT: event: project.started, type: project, id: d6dea67c-f3b0-465b-b693-b9db4fc62d55
[2023-05-26T01:31:54.110Z] INFO: AUDIT: event: stopped, type: project, id: d6dea67c-f3b0-465b-b693-b9db4fc62d55

The settings.js file gets created and saved once I change a setting in the UI for the instance. I didn't see it initally in the projects folder and thought maybe that was something. Permissions are all consistent.

I will look at that launcher code some and see if there is anything I can think of to try on my end to continue chasing this down.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.