N8n on Red Hat 8

Describe the issue/error/question

Would be great if anyone can point to any good instruction how to get n8n working on Red Hat 8. :slight_smile:

Trying to install on n8n (npm) on Red Hat 8 - complains about deprecated packages and fails…
Currently on npm version 8.19.1 and node version v16.14.0

  • In the error log below, it seems lite some communication to github (node-pre-gyp) is failing.
    We have configured NPM to work with a proxy but it feels like this is breaking inside NPM.

What is the error message (if any)?

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]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to latest, [email protected] or [email protected]! Check these notes: REDACTED_TO_LINK_RESTRICTIONS_AS_NEW_USER
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
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 REDACTED_TO_LINK_RESTRICTIONS_AS_NEW_USER/blog/math-random for details.
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 REDACTED_TO_LINK_RESTRICTIONS_AS_NEW_USER/blog/math-random for details.
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 There’s Math.random(), and then there’s Math.random() · V8 for details.
npm WARN deprecated [email protected]: request has been deprecated, see REDACTED_TO_LINK_RESTRICTIONS_AS_NEW_USER
npm WARN deprecated [email protected]: [email protected]<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
(##################) ⠏ reify:n8n-nodes-base: timing reifyNode:node_modules/n8n/node_modules/monaco-editor Completed in 18475ms
(##################) ⠏ reify:n8n-nodes-base: timing reifyNode:node_modules/n8n/node_modules/monaco-editor Completed in 18475ms
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/n8n/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c – node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute ‘/usr/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=6 --node_napi_label=napi-v6 --python=/usr/bin/python3’ (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp info check checked for “/usr/local/lib/node_modules/n8n/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-x64/node_sqlite3.node” (not found)
npm ERR! node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.0.11/napi-v6-linux-glibc-x64.tar.gz
npm ERR! node-pre-gyp ERR! install request to https://github.com/TryGhost/node-sqlite3/releases/download/v5.0.11/napi-v6-linux-glibc-x64.tar.gz failed, reason: connect ETIMEDOUT 140.82.121.4:443
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v93 ABI, glibc) (falling back to source compile w

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]:

Hi @DkYSwe, welcome to the community! I am sorry to hear you’re having trouble.

This looks like a network problem to me. Is 140.82.121.4 the IP of your proxy?

As an alternative, have you perhaps considered using n8n’s docker image? This comes pre-built, so might be easier to deploy.

Hi and thanks for quick response.

The IP 140.82.121.4 is Github and seems unaccessible due to internal issues with proxies within npm. :frowning:

Yeah, the docker image could be the better way forward but the instruction provided assumes free Internet access from docker to pull down the images from some docker repo which is not specified. This is not feasible in our segmented network.

If instructions for docker could be more supportive (Which FQDN/Domains to whitelist to get it working) - I think it would be the best way forward.

Hey @DkYSwe,
if your server cannot pull docker images you could use the docker pull/save/load approach.

On a machine with access to docker repo.

docker pull n8nio/n8n:0.193.4
docker save --output n8n.tar n8nio/n8n:0.193.4

Upload n8n.tar to target server and execute

docker load --input n8n.tar
2 Likes

Thanks Marcus,
I could get the images downloaded and uploaded and loaded into the target system. :slight_smile:

Can you point to any documentation around startup variables or so? Eg. how to start with HTTP and not HTTPS…
(got an issue when trying to start; “Error: initializing source docker://localhost/n8nio/n8n:latest: pinging container registry localhost: Get “https://localhost/v2/”: x509: certificate is not valid for any names, but wanted to match localhost”)

Hey DkYSwe,
great that you got the docker image working. Usually when you start n8n without any special environment variables it will only start with http.

When you run the docker image it should be available under http://localhost:5678.

docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n

We also have documentation about running n8n with

This will also depend on how you are planning to make n8n available in your network.

I’ve never seen this error message. What do you do to get it?

Docker load worked as mentioned by you.
After that, the image seems to be there.

docker images
REPOSITORY           TAG         IMAGE ID      CREATED     SIZE
localhost/n8nio/n8n  0.193.4     73b2ef34c30f  2 days ago  530 MB

When Running ```
docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n localhost/n8nio/n8n

It returns

Trying to pull localhost/n8nio/n8n:latest…
Error: initializing source docker://localhost/n8nio/n8n:latest: pinging container registry localhost: Get “https://localhost/v2/”: x509: certificate is not valid for any names, but wanted to match localhost

Can you try running this

docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n:0.193.4

You have to give it the right image:tag, in this case n8nio/n8n:0.193.4.

2 Likes

You’re a rock Marcus! :slight_smile:
Thanks for the great support, it started up just nice and seems to work just fine!

2 Likes

Hey,

I feel so noobish… :smiley:

2 Issues

First issue

On restart, I loose the configuration and it reset’s to initial setup.
Startup service specifies:
ExecStart=/usr/bin/docker run -it --rm --name n8n -p 5678:5678 -v /root/.n8n n8nio/n8n:0.193.4

It seems like the restart default to new installation (setup)
( While n8n is up and running I find the following file do exist on a volume which get a new name:
/var/lib/containers/storage/volumes//_data/database.sqlite
)

Directory /root/.n8n doesn’t get updated.

Second issue

I had n8n running as service over the weekend with the nodes
imap - thehive - smtp

It didn’t trigger when it should but when I launched it in the dashboard it worked just fine.
Any idea what caused this?

Hey @DkYSwe,

It looks like you have added a volume with -v /root/.n8n but you not mapped it to anything so the settings will only exist while the volume is going.

You would need to use -v /root/.n8n:/home/node/.n8n, With the second issue It is hard to say why it didn’t trigger. Was the workflow activated on the top right?

2 Likes

Thanks Jon for the support. I had been to quick with the editing and stuff is now saved as it should.
Yes, the workflow was activated but will put some more tests.

Thanks again! :slight_smile:

2 Likes