Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

www.libelektra.org is not updated (a7.libelektra.org is) #2897

Open
markus2330 opened this issue Aug 18, 2019 · 9 comments

Comments

@markus2330
Copy link
Contributor

commented Aug 18, 2019

Due to renames of the website, the website build job broke. To fix it:

  • fix website deployment
  • make restapi working again
  • revert 0021936

Workaround: a7.libelektra.org gets updates, but is only executed for master

@markus2330 markus2330 self-assigned this Aug 18, 2019

@markus2330 markus2330 added this to the 0.9.1 milestone Aug 18, 2019

@markus2330 markus2330 added the urgent label Aug 18, 2019

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Aug 18, 2019

Current status: https://build.libelektra.org/jenkins/job/elektra-website/721/console

+ kdb run-website-backend
terminate called after throwing an instance of 'cppcms::json::bad_value_cast'
  what():  cppcms::json::bad_cast: Can't write undefined value to stream
Aborted
Build step 'Execute shell' marked build as failure

Most likely some configuration keys were (not) renamed.

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Aug 18, 2019

There are already errors earlier in the log:

npm ERR! Linux 3.2.68-vs2.3.2.17-beng
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--unsafe-perm"
npm ERR! node v6.14.1
npm ERR! npm  v3.10.10
npm ERR! path /usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/.staging/@types/prop-types-f494f49b
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/.staging/@types/prop-types-f494f49b' -> '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/nodeunit/node_modules/tap/node_modules/@types/prop-types'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/.staging/@types/prop-types-f494f49b' -> '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/nodeunit/node_modules/tap/node_modules/@types/prop-types'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/elektra_backend/share/elektra/tool_data/website-frontend/npm-debug.log
markus2330 added a commit that referenced this issue Aug 18, 2019
@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Aug 18, 2019

@Namoshek do you have any idea about this npm ERR?

/usr/local/elektra_backend/share/elektra/tool_data/website-frontend contains the data.

I wonder which place I forgot to rename (#2886) because in your scripts you actually used everywhere variables.

@Namoshek

This comment has been minimized.

Copy link
Contributor

commented Aug 18, 2019

Doesn't seem like you forgot to rename anything, there is really good variable usage everywhere in the scripts. Only the documentation header is still the same. 😅

Can you grab and paste the npm-debug.log output? And did you simply rename the directory on the server or what did you do? Nginx config updated? Is there a package-lock.json on the server (according to a quick search, this seems to be a common issue... whyever)?

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Aug 18, 2019

Thank you for the quick reply!

Can you grab and paste the npm-debug.log output?

npm-debug.log

It consists of many many ENOENT and ends with:

42096 verbose stack Error: ENOENT: no such file or directory, rename '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/.staging/@types/prop-types-dbe1f68c' -> '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/grunt-concat/node_modules/tap/node_modules/@types/prop-types'
42096 verbose stack     at destStatted (/usr/lib/node_modules/npm/lib/install/action/finalize.js:25:7)
42096 verbose stack     at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:264:29
42096 verbose stack     at FSReqWrap.oncomplete (fs.js:123:15)
42096 verbose stack
42096 verbose stack Error: ENOENT: no such file or directory, rename '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/.staging/@types/prop-types-dbe1f68c' -> '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/grunt-concat/node_modules/tap/node_modules/@types/prop-types'
42096 verbose stack     at Error (native)
42097 verbose cwd /usr/local/elektra_backend/share/elektra/tool_data/website-frontend
42098 error Linux 3.2.68-vs2.3.2.17-beng
42099 error argv "/usr/bin/node" "/usr/bin/npm" "install" "--unsafe-perm"
42100 error node v6.14.1
42101 error npm  v3.10.10
42102 error path /usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/.staging/@types/prop-types-dbe1f68c
42103 error code ENOENT
42104 error errno -2
42105 error syscall rename
42106 error enoent ENOENT: no such file or directory, rename '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/.staging/@types/prop-types-dbe1f68c' -> '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/grunt-concat/node_modules/tap/node_modules/@types/prop-types'
42107 error enoent ENOENT: no such file or directory, rename '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/.staging/@types/prop-types-dbe1f68c' -> '/usr/local/elektra_backend/share/elektra/tool_data/website-frontend/node_modules/grunt-concat/node_modules/tap/node_modules/@types/prop-types'
42107 error enoent This is most likely not a problem with npm itself
42107 error enoent and is related to npm not being able to find a file.
42108 verbose exit [ -2, true ]

And did you simply rename the directory on the server or what did you do?

Until now I mostly did changes in the source directory (and in the build job, I renamed it from elektra-homepage to elektra-website).

Nginx config updated?

Not yet, as the installation failed much earlier.

Is there a package-lock.json on the server (according to a quick search, this seems to be a common issue... whyever)?

At least not at the installation path.

We removed everything in the beginning of the deployment script, so this should not be the issue.

@Namoshek

This comment has been minimized.

Copy link
Contributor

commented Aug 18, 2019

Hm ok, the logs are not quite helpful. If the install directory is a new one, I don't see where our scripts can fail. So I suspect an issue with npm which did not occur previously due to some caching maybe.

The node and npm versions on the server are quite old. Latest LTS version of node is 10.16.3 with npm version 6.9.0 included. We are still on 6.14.1 (node) / 3.10.10 (npm). So I would start with an update of those if no other software prevents an update.

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Aug 18, 2019

With newer npm it fails with different errors.

2019-08-18T19_24_08_690Z-debug.log

I now added a redirect page to a7.libelektra.org (unfortunately there is an quite old version and the https certificate is outdated)

@Namoshek

This comment has been minimized.

Copy link
Contributor

commented Aug 18, 2019

Seems like an issue with concurrent reads and writes. Can you try to raise the limit with ulimit -n 20000 or some other limit higher than the current one and rerun the build?

@markus2330 markus2330 removed the urgent label Aug 19, 2019

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Aug 19, 2019

Thank you that did it for my local installation! I now have built it locally and copied it to the webserver. Build job is disabled.

It is still open why it does not build on the build server but it seems like it is not due to the rename, otherwise I could not have built it locally?

I now try with purged npm cache (removed ~/.npm) and if it does not work I will upgrade nodejs/npm (and maybe the whole distro, too).

markus2330 added a commit that referenced this issue Aug 19, 2019
markus2330 added a commit that referenced this issue Aug 19, 2019
markus2330 added a commit that referenced this issue Aug 23, 2019
markus2330 added a commit that referenced this issue Aug 24, 2019

@markus2330 markus2330 changed the title website down www.libelektra.org is not updated (a7.libelektra.org is) Aug 29, 2019

@markus2330 markus2330 removed their assignment Aug 29, 2019

@markus2330 markus2330 added the build label Aug 29, 2019

markus2330 added a commit that referenced this issue Aug 31, 2019
markus2330 added a commit that referenced this issue Aug 31, 2019
markus2330 added a commit that referenced this issue Sep 7, 2019
markus2330 added a commit that referenced this issue Sep 8, 2019
sanssecours added a commit that referenced this issue Sep 8, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue Sep 11, 2019
markus2330 added a commit that referenced this issue Sep 11, 2019
Piankero added a commit to Piankero/libelektra that referenced this issue Sep 12, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue Sep 13, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.