tteck / Proxmox

Proxmox VE Helper-Scripts
https://Helper-Scripts.com
MIT License
13.29k stars 2.07k forks source link

Tianji Script - Install Fails #3729

Closed keywal closed 2 weeks ago

keywal commented 2 weeks ago

Please verify that you have read and understood the guidelines.

yes

A clear and concise description of the issue.

Error during installation as it begins to 'Initialize Application'

What settings are you currently utilizing?

Default Settings

Which Linux distribution are you employing?

Debian 12

If relevant, including screenshots or a code block can be helpful in clarifying the issue.

Initialize Application
[ERROR] in line 23: exit code 0: while executing command "$@" > /dev/null 2>&1
The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.

Please provide detailed steps to reproduce the issue.

Install with default settings until eventual error. Tried 3 different times and get the same error.

keywal commented 2 weeks ago

Re-ran in verbose

 ✓ Installed Dependencies
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org bookworm-security InRelease                                   
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease                                  
Get:4 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB] 
Get:5 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages [9,154 B]
Fetched 21.3 kB in 0s (64.5 kB/s) 
Reading package lists... Done
 ✓ Set up Repositories
Reading package lists... Done pm2   
Building dependency tree... Done
Reading state information... Done
 \The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 31.7 MB of archives.
After this operation, 197 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_20.x nodistro/main amd64 nodejs amd64 20.17.0-1nodesource1 [31.7 MB]
Fetched 31.7 MB in 1s (59.8 MB/s)
 /Selecting previously unselected package nodejs.
(Reading database ... 30628 files and directories currently installed.)
Preparing to unpack .../nodejs_20.17.0-1nodesource1_amd64.deb ...
Unpacking nodejs (20.17.0-1nodesource1) ...
 -Setting up nodejs (20.17.0-1nodesource1) ...
 \Processing triggers for man-db (2.11.2-2) ...

added 1 package in 718ms

1 package is looking for funding
  run `npm fund` for details
npm notice
npm notice New patch version of npm available! 10.8.2 -> 10.8.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.3
npm notice To update run: npm install -g npm@10.8.3
npm notice

added 138 packages in 5s

13 packages are looking for funding
  run `npm fund` for details
 ✓ Installed Node.js, pnpm & pm2
 /Scope: all 7 workspace projects
 -Lockfile is up to date, resolution step is skipped
 \Packages: +2915
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Pr
   ╭──────────────────────────────────────────────────────────────────╮
   │                                                                  │
   │                Update available! 9.7.1 → 9.10.0.                 │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v9.10.0   │
   │                Run "pnpm add -g pnpm" to update.                 │
   │                                                                  │
   │         Follow @pnpmjs for updates: https://x.com/pnpmjs         │
   │                                                                  │
   ╰──────────────────────────────────────────────────────────────────╯

Downloading @ant-design/charts@1.4.2: 7.06 MB/7.06 MB, done
PrDownloading antd@5.13.1: 9.10 MB/9.10 MB, done
PrDownloading mapbox-gl@1.13.3: 6.84 MB/6.84 MB, done
Downloading @maplibre/maplibre-gl-style-spec@19.3.3: 13.34 MB/13.34 MB, done
Downloading monaco-editor@0.46.0: 17.27 MB/17.27 MB, done
Downloading next@14.1.3: 20.77 MB/20.77 MB, done
PrDownloading @next/swc-linux-x64-musl@14.1.3: 46.39 MB/46.39 MB, done
PrDownloading react-icons@4.12.0: 21.22 MB/21.22 MB, done
PrDownloading @next/swc-linux-x64-gnu@14.1.3: 38.79 MB/38.79 MB, done
Downloading antd@5.12.5: 9.02 MB/9.02 MB, done
PrDownloading monaco-editor@0.31.1: 13.97 MB/13.97 MB, done
Progress: resolved 2915, reused 0, downloaded 2837, added 2915, done
 -node_modules/.pnpm/@prisma+engines@5.14.0/node_modules/@prisma/engines: Running postinstall script, done in 1.7s
node_modules/.pnpm/esbuild@0.19.11/node_modules/esbuild: Running postinstall script, done in 103ms
nonode_modules/.pnpm/esbuild@0.20.1/node_modules/esbuild: Running postinstall script, done in 100ms
node_modules/.pnpm/msw@2.2.13_typescript@5.5.4/node_modules/msw: Running postinstall script, done in 118ms
node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild: Running postinstall script, done in 65ms
nonode_modules/.pnpm/@prisma+engines@4.16.2/node_modules/@prisma/engines: Running postinstall script, done in 1.4s
nonode_modules/.pnpm/isolated-vm@4.7.2/node_modules/isolated-vm: Running install script, done in 1s
 /node_modules/.pnpm/puppeteer@21.7.0_typescript@5.5.4/node_modules/puppeteer: Running postinstall script, done in 10m 10.6s
nonode_modules/.pnpm/esbuild@0.23.0/node_modules/esbuild: Running postinstall script, done in 86ms
node_modules/.pnpm/core-js-pure@3.36.0/node_modules/core-js-pure: Running postinstall script, done in 46ms
 |node_modules/.pnpm/core-js@3.36.0/node_modules/core-js: Running postinstall script, done in 46ms
 \node_modules/.pnpm/postman-code-generators@1.8.0/node_modules/postman-code-generators: Running postinstall script, done in 20.5s
nonode_modules/.pnpm/react-vertical-timeline-component@3.6.0_react@18.3.1/node_modules/react-vertical-timeline-component: Running postinstall script, done in 42ms
node_modules/.pnpm/prisma@5.14.0/node_modules/prisma: Running preinstall script, done in 46ms
 -node_modules/.pnpm/@prisma+client@4.16.2_prisma@5.14.0/node_modules/@prisma/client: Running postinstall script, done in 401ms
node_modules/.pnpm/@prisma+client@5.14.0_prisma@5.14.0/node_modules/@prisma/client: Running postinstall script, done in 416ms
 /
dependencies:
+ dayjs 1.11.10
+ eventemitter-strict 1.0.1
+ zod 3.22.2

devDependencies:
+ @release-it/conventional-changelog 8.0.1
+ @types/fs-extra 11.0.3
+ @types/node 18.17.12
+ @types/tar 6.1.10
+ concurrently 8.2.2
+ cross-env 7.0.3
+ dotenv 16.4.5
+ fs-extra 11.2.0
+ prettier-plugin-tailwindcss 0.5.12
+ release-it 17.0.1
+ tar 6.1.15
+ ts-node 10.9.1
+ tsx 4.16.2
+ typescript 5.5.4
+ vite 5.0.12

src/shared postinstall$ pnpm build
[10 lines collapsed]
│ ESM dist/index.mjs     2.50 KB
│ ESM dist/index.mjs.map 5.17 KB
│ ESM ⚡️ Build success in 21ms
│ CJS dist/index.js     3.25 KB
│ CJS dist/index.js.map 5.63 KB
│ CJS ⚡️ Build success in 23ms
│ DTS Build start
│ DTS ⚡️ Build success in 733ms
│ DTS dist/index.d.ts  1.76 KB
│ DTS dist/index.d.mts 1.76 KB
└─ Done in 1.9s
packages/client-sdk prepare$ tsc
└─└─ Done in 1.2s
packages/react prepare$ tsc
└─└─ Done in 869ms
 /src/server postinstall$ pnpm db:generate
[12 lines collapsed]
│ ```
│ import { PrismaClient } from '@prisma/client/edge'
│ const prisma = new PrismaClient()
│ ```
│ See other ways of importing Prisma Client: http://pris.ly/d/importing-client
│ ┌─────────────────────────────────────────────────────────────┐
│ │  Deploying your app to serverless or edge functions?        │
│ │  Try Prisma Accelerate for connection pooling and caching.  │
│ │  https://pris.ly/cli/--accelerate                           │
│ └─────────────────────────────────────────────────────────────┘
└─└─ Done in 2.8s
Done in 10m 44.5s
 |
> tianji@1.14.7 build /opt/tianji
> pnpm build:tracker && pnpm build:app && pnpm build:geo

 \
> tianji@1.14.7 build:tracker /opt/tianji
> tsx scripts/build-tracker.ts

 -Start Build Tracker
 \vite v5.0.12 building for production...
✓ 1 modules transformed.
src/client/public/tracker.js  2.52 kB │ gzip: 1.45 kB
✓ built in 81ms
Build Tracker Completed
 \
> tianji@1.14.7 build:app /opt/tianji
> pnpm build:server && pnpm build:client

 -
> tianji@1.14.7 build:server /opt/tianji
> cd src/server && pnpm build

 -
> @tianji/server@ build /opt/tianji/src/server
> tsc

 /
> tianji@1.14.7 build:client /opt/tianji
> cd src/client && pnpm build

 /
> @tianji/client@ build /opt/tianji/src/client
> vite build

 /
♻️  Generating routes...
 -✅ Processed routes in 1354ms
vite v5.0.12 building for production...
 \Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
../../node_modules/.pnpm/next-themes@0.2.1_next@14.1.3_@babel+core@7.24.0_@opentelemetry+api@1.4.1_react-dom@18.2.0_re_xb3gvkmgbce35oh5icj5cpe7am/node_modules/next-themes/dist/index.module.js (1:1576) A comment

"/*#__PURE__*/"

in "../../node_modules/.pnpm/next-themes@0.2.1_next@14.1.3_@babel+core@7.24.0_@opentelemetry+api@1.4.1_react-dom@18.2.0_re_xb3gvkmgbce35oh5icj5cpe7am/node_modules/next-themes/dist/index.module.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
../../node_modules/.pnpm/next-themes@0.2.1_next@14.1.3_@babel+core@7.24.0_@opentelemetry+api@1.4.1_react-dom@18.2.0_re_xb3gvkmgbce35oh5icj5cpe7am/node_modules/next-themes/dist/index.module.js (1:2992) A comment

"/*#__PURE__*/"

in "../../node_modules/.pnpm/next-themes@0.2.1_next@14.1.3_@babel+core@7.24.0_@opentelemetry+api@1.4.1_react-dom@18.2.0_re_xb3gvkmgbce35oh5icj5cpe7am/node_modules/next-themes/dist/index.module.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
✓ 10902 modules transformed.
../server/public/index.html                                 0.48 kB │ gzip:   0.31 kB
../server/public/assets/VisitorLeafletMap-76MTxHGz.css     15.10 kB │ gzip:   6.38 kB
../server/public/assets/VisitorLarkMap-SQqtPNUP.css        18.46 kB │ gzip:   3.43 kB
../server/public/assets/index-SPv5Mh6h.css                 74.41 kB │ gzip:  13.74 kB
../server/public/assets/utils-E00GV0qE.js                   0.06 kB │ gzip:   0.08 kB
../server/public/assets/viewer-omzaYe7G.js                  0.26 kB │ gzip:   0.21 kB
../server/public/assets/editor-DX5h8uTY.js                  1.21 kB │ gzip:   0.64 kB
../server/public/assets/main-XDbo1JSo.js                   15.96 kB │ gzip:   5.57 kB
../server/public/assets/VisitorLeafletMap-qwGql5r8.js     154.93 kB │ gzip:  45.44 kB
../server/public/assets/plugins-hujPnZ12.js               647.47 kB │ gzip: 201.36 kB
../server/public/assets/VisitorLarkMap-FFUgYMeh.js      1,562.51 kB │ gzip: 424.96 kB
../server/public/assets/index-ycfFIHNB.js               1,838.63 kB │ gzip: 473.61 kB
../server/public/assets/index-r0lWscSc.js               3,132.48 kB │ gzip: 955.59 kB

(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 28.95s
 -
> tianji@1.14.7 build:geo /opt/tianji
> tsx scripts/build-geo.ts

 \Saved geo database: /opt/tianji/geo/GeoLite2-City.mmdb
 ✓ Initial Setup complete
 \CREATE DATABASEabase   
CREATE ROLE
 |GRANT
ALTER DATABASE
ALTER ROLE
 ✓ Set up PostgreSQL database
 ✓ .env successfully set up

changed 138 packages in 4s

13 packages are looking for funding
  run `npm fund` for details
 -
                        -------------

__/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
 _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
  _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
   _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
    _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
     _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
      _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
       _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
        _\///______________\///______________\///__\///////////////__

                          Runtime Edition

        PM2 is a Production Process Manager for Node.js applications
                     with a built-in Load Balancer.

                Start and Daemonize any application:
                $ pm2 start app.js

                Load Balance 4 instances of api.js:
                $ pm2 start api.js -i 4

                Monitor in production:
                $ pm2 monitor

                Make pm2 auto-boot at server restart:
                $ pm2 startup

                To go further checkout:
                http://pm2.io/

                        -------------

 \[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
 |[PM2] PM2 Successfully daemonized
[PM2][Module] Installing NPM pm2-logrotate module
[PM2][Module] Calling [NPM] to install pm2-logrotate ...

added 178 packages in 3s

22 packages are looking for funding
  run `npm fund` for details
[PM2][Module] Module downloaded
[PM2][WARN] Applications pm2-logrotate not running, starting...
[PM2] App [pm2-logrotate] launched (1 instances)
Module: pm2-logrotate
$ pm2 set pm2-logrotate:max_size 10M
$ pm2 set pm2-logrotate:retain 30
$ pm2 set pm2-logrotate:compress false
$ pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss
$ pm2 set pm2-logrotate:workerInterval 30
$ pm2 set pm2-logrotate:rotateInterval 0 0 * * *
$ pm2 set pm2-logrotate:rotateModule true
Modules configuration. Copy/Paste line to edit values.
[PM2][Module] Module successfully installed and launched
[PM2][Module] Checkout module options: `$ pm2 conf`
 -┌────┬──────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name             │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
└────┴──────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
Module
┌────┬──────────────────────────────┬───────────────┬──────────┬──────────┬──────┬──────────┬──────────┬──────────┐
│ id │ module                       │ version       │ pid      │ status   │ ↺    │ cpu      │ mem      │ user     │
├────┼──────────────────────────────┼───────────────┼──────────┼──────────┼──────┼──────────┼──────────┼──────────┤
│ 0  │ pm2-logrotate                │ 2.7.0         │ 13618    │ online   │ 0    │ 0%       │ 29.6mb   │ root     │
└────┴──────────────────────────────┴───────────────┴──────────┴──────────┴──────┴──────────┴──────────┴──────────┘
 /
> @tianji/server@ db:migrate:apply /opt/tianji/src/server
> prisma migrate deploy

 /Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "2UXtDRe1ysZD@127.0.0.1:5432/tianji_db", schema "public" at "tianji"

Error: P1001: Can't reach database server at `tianji:5432`

Please make sure your database server is running at `tianji:5432`.
 ELIFECYCLE  Command failed with exit code 1.
 -
[ERROR] in line 87: exit code 0: while executing command $STD pnpm db:migrate:apply
nektovse commented 2 weeks ago

Same problem, I tried to install NextCloudPi and PhotoPrism and I keep getting the error:

[ERROR] in line 23: exit code 0: while executing command "$@" > /dev/null 2>&1 The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.

tteck commented 2 weeks ago

@MickLesk mind taking a look at this

MickLesk commented 2 weeks ago

I'll check it today

Kortadoo commented 2 weeks ago

I have the same issue indeed. "$@" > /dev/null 2>&1

nektovse commented 2 weeks ago

Verbose concluded:

` Installing NextCloudPi... etc/library.sh: line 17: php: command not found -Installing lamp

[ERROR] in line 31: exit code 0: while executing command $STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh) `

tteck commented 2 weeks ago

@nektovse this was an issue with Tianji, why are you mentioning NextCloud?

keywal commented 2 weeks ago

Thanks folks! Confirmed resolved in 1fd5114.

nektovse commented 2 weeks ago

@нектовсе это была проблема с Tianji, почему вы упоминаете NextCloud?

Because when I run other scripts I get the same error:

Initialize Application [ERROR] in line 23: exit code 0: while executing command "$@" > /dev/null 2>&1

I assumed that the error was the same and that it was a common problem.

nektovse commented 2 weeks ago

@tteck

I already realized that the problems are not the same, unfortunately.

This is a problem on my Internet side, namely: https://packages.sury.org/php/apt.gpg blocks the connection from my country.

Thanks for your concern