Fresh install of NodeBB 1.11.1 on Debian GNU/Linux 9 (stretch) issues

Technical Support
  • Hi Guys!
    First of all thank you for all your work & sharing NodeBB with us!

    It is my "first ever install" of NodeBB therefore I might have done some elementary mistakes. I was following steps from the documentation below, unfortunately I did not managed to get to the point of "working setup NodeBB screen".

    https://github.com/nodesource/distributions
    https://docs.nodebb.org/installing/os/debian/

    Debian & installed software versions

    ---------------------------------
    
    root@s01:~#  uname -a 
    Linux s01 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
    
    ---------------------------------
    
    root@s01:~# cat /etc/os-release 
    PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
    NAME="Debian GNU/Linux"
    VERSION_ID="9"
    VERSION="9 (stretch)"
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
    
    ---------------------------------
    
    root@s01:~# nodejs --version
    v11.4.0
    root@s01:~# npm --version
    6.4.1
    
    ---------------------------------
    
    root@s01:~# aptitude show build-essential                                                                                                                                                                
    Package: build-essential                 
    Version: 12.3
    State: installed
    
    (...)
    
    ---------------------------------
    

    Installation & setup of NodeBB

    ---------------------------------
    
    root@s01:/home/webservices/domains/example.com# git clone -b v1.11.x https://github.com/NodeBB/NodeBB.git nodebb
    Cloning into 'nodebb'...
    remote: Enumerating objects: 24, done.
    remote: Counting objects: 100% (24/24), done.
    remote: Compressing objects: 100% (19/19), done.
    remote: Total 163377 (delta 6), reused 11 (delta 5), pack-reused 163353
    Receiving objects: 100% (163377/163377), 48.73 MiB | 10.97 MiB/s, done.
    Resolving deltas: 100% (124771/124771), done.
    root@s01:/home/webservices/domains/example.com# cd nodebb/
    root@s01:/home/webservices/domains/example.com/nodebb# ./nodebb setup
    package.json not found.
    Populating package.json...
    OK
    Dependencies outdated or not yet installed.
    Installing them now...
    
    npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    
    > [email protected] install /home/webservices/domains/example.com/nodebb/node_modules/benchpressjs
    > cd rust/benchpress-rs && npm install
    
    npm WARN lifecycle [email protected]~install: cannot run in wd [email protected] neon build >> build.log 2>&1 || exit 0 (wd=/home/webservices/domains/example.com/nodebb/node_modules/benchpressjs/rust/benchpress-rs)
    npm notice created a lockfile as package-lock.json. You should commit this file.
    added 86 packages from 84 contributors and audited 123 packages in 15.229s
    found 0 vulnerabilities
    
    
    > [email protected] install /home/webservices/domains/example.com/nodebb/node_modules/sharp
    > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
    
    info sharp Using cached /root/.npm/_libvips/libvips-8.7.0-linux-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=11.4.0 runtime=node arch=x64 platform=linux)
    make: Entering directory '/home/webservices/domains/example.com/nodebb/node_modules/sharp/build'
      TOUCH Release/obj.target/libvips-cpp.stamp
      CXX(target) Release/obj.target/sharp/src/common.o
    In file included from ../src/common.cc:24:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/common.cc:22:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/metadata.o
    In file included from ../src/metadata.cc:19:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/metadata.cc:18:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/stats.o
    In file included from ../src/stats.cc:20:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/stats.cc:19:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/operations.o
    In file included from ../src/common.h:23:0,
                     from ../src/operations.cc:23:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/common.h:22,
                     from ../src/operations.cc:23:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/pipeline.o
    In file included from ../src/pipeline.cc:27:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/pipeline.cc:26:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/sharp.o
    In file included from ../src/sharp.cc:16:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/sharp.cc:15:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      CXX(target) Release/obj.target/sharp/src/utilities.o
    In file included from ../src/utilities.cc:19:0:
    ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
    ../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
                                                                                  ^
    In file included from /root/.node-gyp/11.4.0/include/node/v8.h:26:0,
                     from /root/.node-gyp/11.4.0/include/node/node.h:63,
                     from ../src/utilities.cc:18:
    /root/.node-gyp/11.4.0/include/node/v8.h:2538:31: note: declared here
                     Local<String> ToString(Isolate* isolate) const);
                                   ^
    /root/.node-gyp/11.4.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
      SOLINK_MODULE(target) Release/obj.target/sharp.node
      COPY Release/sharp.node
    make: Leaving directory '/home/webservices/domains/example.com/nodebb/node_modules/sharp/build'
    
    > [email protected] postinstall /home/webservices/domains/example.com/nodebb/node_modules/preact
    > node -e "console.log('\u001b[35m\u001b[1mLove Preact? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/preact/donate\u001b[0m')"
    
    Love Preact? You can now donate to our open collective:
     > https://opencollective.com/preact/donate
    npm notice created a lockfile as package-lock.json. You should commit this file.
    added 624 packages from 747 contributors and audited 4314 packages in 165.443s
    found 5 vulnerabilities (1 low, 4 moderate)
      run `npm audit fix` to fix them, or `npm audit` for details
    OK
    
    [benchpressjs] Unable to build or find a suitable native module, falling back to JS version
    2018-12-15T16:36:25.746Z [2912] - info: NodeBB Setup Triggered via Command Line
    
    Welcome to NodeBB v1.11.1!
    
    This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
    Press enter to accept the default setting (shown in brackets).
    URL used to access this NodeBB (http://localhost:4567) 
    
    ---------------------------------
    

    Access to setup

    ---------------------------------
    
    root@s01:~# curl http://localhost:4567
    curl: (7) Failed to connect to localhost port 4567: Connection refused
    
    ---------------------------------
    
    root@s01:~# iptables -L
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    root@s01:~# 
    
    ---------------------------------
    

    Questions

    1.) Why there are so many warnings & deprecated notices? Is that normal? Should I use different version of nodejs?
    2.) Is that secure "found 5 vulnerabilities (1 low, 4 moderate)"?
    3.) Why I am not able to access "http://localhost:4567" using curl from the same machine ... what is necessary to improve in my installation process?
    4.) As in the future I will be using Nginx to reverse proxy to "http://localhost:4567" ... which user should I use to start NodeBB? www-data? root? other?

    Thank you very much for your help!

    Cheers!

  • I recommend two things:

    • Use the Ubuntu installation docs, they're the most maintained. It's essentially the same as Debian
    • Use Node 10
  • @PitaJ thank you very much for the reply!

    1.) Can you advice me which user should I use to go through the installation process? www-data? root? other?

    2.) Does it matter which user runs the command "./nodebb start" after successful setup?

    Does user mentioned in points nr (1) and (2) really matter as the service will be available anyway on http://localhost:4567?

    Thank you for your help!

  • @squre said in Fresh install of NodeBB 1.11.1 on Debian GNU/Linux 9 (stretch) issues:

    @PitaJ thank you very much for the reply!

    1.) Can you advice me which user should I use to go through the installation process? www-data? root? other?

    I suggest creating a new nodebb user with a home directory and installing NodeBB into a folder in nodebb's home directory.

    Please don't install or run NodeBB as root.

    2.) Does it matter which user runs the command "./nodebb start" after successful setup?

    Yes, due to file system ownership and permissions. You should run ./nodebb start as the nodebb user if you follow my previous suggestions.

    Does user mentioned in points nr (1) and (2) really matter as the service will be available anyway on http://localhost:4567?

    Only in the "don't use root" sense. Otherwise it doesn't really matter.

  • @PitaJ Got it, thanks a lot for your suggestions. I will try the installation process once again today.


Suggested Topics


  • 0 Votes
    12 Posts
    846 Views

    @JaredBusch said in How can I migrate from redis to postgresql/mongodb:

    Found a pull request for nodebb-plugin-import that gives it postgresql capability.

    Well, it seem that I cannot install v1.12.1 as required by this plugin.

    npm never successfully builds.

    [jbusch@obelisk nodebb]$ sudo -u nodebb ./nodebb setup package.json not found. Populating package.json... OK Dependencies outdated or not yet installed. Installing them now... npm notice npm notice New minor version of npm available! 8.3.1 -> 8.12.2 npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.12.2 npm notice Run npm install -g [email protected] to update! npm notice npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/pg npm ERR! pg@"^7.4.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer pg@"^8" from [email protected] npm ERR! node_modules/pg-cursor npm ERR! pg-cursor@"^2.0.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See /home/nodebb/.npm/eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! /home/nodebb/.npm/_logs/2022-06-18T01_31_52_584Z-debug-0.log Error installing dependencies! message: Command failed: npm install --production stdout: null stderr: null /opt/nodebb/src/cli/package-install.js:54 throw e; ^ Error: Command failed: npm install --production at checkExecSyncError (node:child_process:828:11) at Object.execSync (node:child_process:902:15) at Object.installAll (/opt/nodebb/src/cli/package-install.js:45:9) at Object.<anonymous> (/opt/nodebb/src/cli/index.js:60:18) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) { status: 1, signal: null, output: [ null, null, null ], pid: 1461, stdout: null, stderr: null } [jbusch@obelisk nodebb]$

    Built just fine to v2.2.0 though.

    [jbusch@obelisk nodebb]$ sudo -u nodebb ./nodebb setup Dependencies outdated or not yet installed. Installing them now... npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10. npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: support for ECMAScript is superseded by `uglify-js` as of v3.13.0 npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 added 922 packages, and audited 923 packages in 2m 76 packages are looking for funding run `npm fund` for details 5 high severity vulnerabilities Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. OK 2022-06-18T01:40:58.599Z [1600] - info: NodeBB Setup Triggered via Command Line Welcome to NodeBB v2.2.0! This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed. Press enter to accept the default setting (shown in brackets).

    7d8a5a66-30f5-4d65-a5ec-ac395ecd0178-image.png

  • 0 Votes
    2 Posts
    199 Views

    It seems that the Docker was not able to execute all parallel builds.

    The solution I found is:

    Run the setup with option: ./nodebb setup --skip-builds Manually run the build in serial mode: ./nodebb build --series

    That solved the issue.

  • Migrate Nodebb

    Solved Technical Support
    0 Votes
    3 Posts
    2k Views

    @bri Thanks i have already moved my nodebb 🙂

  • nginx reverse proxy nodebb

    Solved Technical Support
    0 Votes
    4 Posts
    3k Views

    Yes, the url in config.json should be equal to exactly the URL at which you access your site. It usually shouldn't be localhost or an IP address.

  • 0 Votes
    12 Posts
    5k Views

    @rod haha, appreciate your help and comments.