discord-tickets / bot

The most popular open-source and self-hosted ticket management bot for Discord - a free alternative to the premium and white-label plans of other popular ticketing bots.
https://discordtickets.app
GNU General Public License v3.0
946 stars 478 forks source link

[BUG] NOT STARTING #553

Open djdiaguuu123 opened 3 months ago

djdiaguuu123 commented 3 months ago

Is there an existing issue for this?

Current Behavior

console

npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/container/node_modules/abstract-logging
npm ERR! dest /home/container/node_modules/.abstract-logging-r8vZIw6I
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/container/node_modules/abstract-logging' -> '/home/container/node_modules/.abstract-logging-r8vZIw6I'

npm ERR! A complete log of this run can be found in: /home/container/.npm/_logs/2024-08-10T13_01_18_642Z-debug-0.log
########  ####  ######   ######   #######  ########  ########  
##     ##  ##  ##    ## ##    ## ##     ## ##     ## ##     ## 
##     ##  ##  ##       ##       ##     ## ##     ## ##     ## 
##     ##  ##   ######  ##       ##     ## ########  ##     ## 
##     ##  ##        ## ##       ##     ## ##   ##   ##     ## 
##     ##  ##  ##    ## ##    ## ##     ## ##    ##  ##     ## 
########  ####  ######   ######   #######  ##     ## ########  
######## ####  ######  ##    ## ######## ########  ######  
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##     ##  ##       ##  ##   ##          ##    ##       
   ##     ##  ##       #####    ######      ##     ######  
   ##     ##  ##       ##  ##   ##          ##          ## 
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##    ####  ######  ##    ## ########    ##     ######  
Discord Tickets (​https://discordtickets.app​) bot v4.0.19 by eartharoid
Sponsor this project at https://discordtickets.app/sponsor
node:internal/modules/cjs/loader:1080
  throw err;
  ^
Error: Cannot find module '.prisma/client/index'
Require stack:
- /home/container/node_modules/@prisma/client/index.js
- /home/container/src/client.js
- /home/container/src/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/home/container/node_modules/@prisma/client/index.js:2:6)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/container/node_modules/@prisma/client/index.js',
    '/home/container/src/client.js',
    '/home/container/src/index.js'
  ]
}
Node.js v18.17.0
container@daki~ Server marked as offline...
[Daki Daemon]: ---------- Detected server process in a crashed state! ----------
[Daki Daemon]: Exit code: 1
[Daki Daemon]: Out of memory: false
[Daki Daemon]: Checking server disk space usage, this could take a few seconds...
[Daki Daemon]: Updating process configuration files...
[Daki Daemon]: Ensuring file permissions are set correctly, this could take a few seconds...
container@daki~ Server marked as starting...
[Daki Daemon]: Pulling Docker container image, this could take a few minutes to complete...
[Daki Daemon]: Finished pulling Docker container image
:/home/container$ /start.sh
container@daki~ Server marked as running...
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/container/node_modules/JSONStream
npm ERR! dest /home/container/node_modules/.JSONStream-nRWwNyhN
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/container/node_modules/JSONStream' -> '/home/container/node_modules/.JSONStream-nRWwNyhN'

npm ERR! A complete log of this run can be found in: /home/container/.npm/_logs/2024-08-10T13_02_39_171Z-debug-0.log
########  ####  ######   ######   #######  ########  ########  
##     ##  ##  ##    ## ##    ## ##     ## ##     ## ##     ## 
##     ##  ##  ##       ##       ##     ## ##     ## ##     ## 
##     ##  ##   ######  ##       ##     ## ########  ##     ## 
##     ##  ##        ## ##       ##     ## ##   ##   ##     ## 
##     ##  ##  ##    ## ##    ## ##     ## ##    ##  ##     ## 
########  ####  ######   ######   #######  ##     ## ########  
######## ####  ######  ##    ## ######## ########  ######  
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##     ##  ##       ##  ##   ##          ##    ##       
   ##     ##  ##       #####    ######      ##     ######  
   ##     ##  ##       ##  ##   ##          ##          ## 
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##    ####  ######  ##    ## ########    ##     ######  
Discord Tickets (​https://discordtickets.app​) bot v4.0.19 by eartharoid
Sponsor this project at https://discordtickets.app/sponsor
node:internal/modules/cjs/loader:1080
  throw err;
  ^
Error: Cannot find module '.prisma/client/index'
Require stack:
- /home/container/node_modules/@prisma/client/index.js
- /home/container/src/client.js
- /home/container/src/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/home/container/node_modules/@prisma/client/index.js:2:6)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/container/node_modules/@prisma/client/index.js',
    '/home/container/src/client.js',
    '/home/container/src/index.js'
  ]
}
Node.js v18.17.0

Expected Behavior

Start

Steps To Reproduce

No response

Environment

- OS: Linux
- Node:18
- NPM:7.6.3
- Bot: 4.0.19

Anything else?

No response

eartharoid commented 3 months ago

Can you send the npm logs from before the bot starts?

djdiaguuu123 commented 3 months ago

I have alredy fixed this issue. I had to old version of node js. I have another issue, I've installed bot but my web panel not working. Server not responding. I am using daki.cc. Is there any option to config it? 10/08/24 14:38:56 [ERROR] (HTTP) Error: listen EADDRNOTAVAIL: address not available 141.195.113.222:4300 at Server.setupListenHandle [as _listen2] (node:net:1734:21) at listenInCluster (node:net:1799:12) at doListen (node:net:1948:7) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'EADDRNOTAVAIL', errno: -99, syscall: 'listen', address: '141.195.113.222', port: 4300 } Is there any way to host panel separatly on another web server?

eartharoid commented 3 months ago

Change HTTP_INTERNAL back to 0.0.0.0.

djdiaguuu123 commented 3 months ago

I changed it and now i have this: 10/08/24 21:56:23 [ERROR] (HTTP) Error: listen EADDRNOTAVAIL: address not available 141.195.113.222:4300 at Server.setupListenHandle [as _listen2] (node:net:1734:21) at listenInCluster (node:net:1799:12) at doListen (node:net:1948:7) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'EADDRNOTAVAIL', errno: -99, syscall: 'listen', address: '141.195.113.222', port: 4300 } Of course web panel still not working.

eartharoid commented 3 months ago

Sorry, I meant HTTP_HOST, not HTTP_INTERNAL.

djdiaguuu123 commented 3 months ago

This site is unreachable Server 141.195.113.222 taking too long to respond.

djdiaguuu123 commented 3 months ago

Now there arent any errors in console but it still not works.

djdiaguuu123 commented 3 months ago
DISCORD_SECRET=secret
DISCORD_TOKEN=token
DB_PROVIDER=mysql
HTTP_EXTERNAL=https://141.195.113.222:4300
HTTP_HOST=0.0.0.0
HTTP_PORT=4300
HTTP_INTERNAL=141.195.113.222
HTTP_TRUST_PROXY=true
INVALIDATE_TOKENS=
OVERRIDE_ARCHIVE=
PUBLIC_BOT=false
PUBLISH_COMMANDS=true
SUPER=405657136379592704
DB_CONNECTION_URL="sql"
ENCRYPTION_KEY=key

My ENV

djdiaguuu123 commented 3 months ago

As you wrote on discord, i have chandeg HTTP_INTERNAL to HTTP_INTERNAL=http://127.0.0.1:4300 . Still not working. Do you know how to fix this? The console shows me that it supposedly works on http://127.0.0.1:4300/ but when I go to the external IP address provided by the hosting it doesn't work and shows that the page is not responding.

djdiaguuu123 commented 3 months ago

My console now:

########  ####  ######   ######   #######  ########  ########  
##     ##  ##  ##    ## ##    ## ##     ## ##     ## ##     ## 
##     ##  ##  ##       ##       ##     ## ##     ## ##     ## 
##     ##  ##   ######  ##       ##     ## ########  ##     ## 
##     ##  ##        ## ##       ##     ## ##   ##   ##     ## 
##     ##  ##  ##    ## ##    ## ##     ## ##    ##  ##     ## 
########  ####  ######   ######   #######  ##     ## ########  
######## ####  ######  ##    ## ######## ########  ######  
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##     ##  ##       ##  ##   ##          ##    ##       
   ##     ##  ##       #####    ######      ##     ######  
   ##     ##  ##       ##  ##   ##          ##          ## 
   ##     ##  ##    ## ##   ##  ##          ##    ##    ## 
   ##    ####  ######  ##    ## ########    ##     ######  
Discord Tickets (​https://discordtickets.app​) bot v4.0.19 by eartharoid
Sponsor this project at https://discordtickets.app/sponsor
 11/08/24 20:48:25  [INFO] (AUTOCOMPLETE) Loaded "category" autocompleter
 11/08/24 20:48:25  [INFO] (AUTOCOMPLETE) Loaded "references" autocompleter
 11/08/24 20:48:25  [INFO] (AUTOCOMPLETE) Loaded "tag" autocompleter
 11/08/24 20:48:25  [INFO] (AUTOCOMPLETE) Loaded "ticket" autocompleter
 11/08/24 20:48:25  [INFO] (BUTTONS) Loaded "claim" button
 11/08/24 20:48:25  [INFO] (BUTTONS) Loaded "close" button
 11/08/24 20:48:25  [INFO] (BUTTONS) Loaded "create" button
 11/08/24 20:48:25  [INFO] (BUTTONS) Loaded "edit" button
 11/08/24 20:48:25  [INFO] (BUTTONS) Loaded "unclaim" button
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "Create ticket from message" message command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "Pin message" message command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "add" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "claim" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "close" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "force-close" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "help" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "move" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "new" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "priority" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "release" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "remove" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "tag" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "tickets" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "topic" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "transcript" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "transfer" slash command
 11/08/24 20:48:25  [INFO] (COMMANDS) Loaded "Create ticket for user" user command
 11/08/24 20:48:25  [INFO] (MENUS) Loaded "create" menu
 11/08/24 20:48:25  [INFO] (MODALS) Loaded "feedback" modal
 11/08/24 20:48:25  [INFO] (MODALS) Loaded "questions" modal
 11/08/24 20:48:25  [INFO] (MODALS) Loaded "topic" modal
 11/08/24 20:48:30  [SUCCESS] Connected to Discord as "Helpdesk Varso#9070" over 1 shards
 11/08/24 20:48:30  [INFO] (PRISMA) quaint::pooled Starting a mysql pool with 25 connections.
 11/08/24 20:48:30  [SUCCESS] (HTTP) Listening at http://0.0.0.0:4300
 11/08/24 20:48:30  [INFO] Cached ticket count of 0 categories (0 open tickets)
 11/08/24 20:48:30  [INFO] Loaded 0 active cooldowns
 11/08/24 20:48:30  [INFO] Closed 0 deleted tickets
 11/08/24 20:48:30  [INFO] Automatically publishing commands...
 11/08/24 20:48:31  [INFO] Checking for updates...
 11/08/24 20:48:31  [SUCCESS] Published 18 commands
 11/08/24 20:48:31  [INFO] No updates available
 11/08/24 20:48:35  [SUCCESS] Posted client stats
eartharoid commented 3 months ago

Your HTTP_EXTERNAL value should start with http not https.

djdiaguuu123 commented 3 months ago

It still not works.

SLINIcraftet204 commented 1 week ago

Hey, I don't know if your bot is working by now, but if not, please try to remove the internal IP completely and if you don't use a reverse proxy (server-hosting reverse proxy is irrelevant), please set it to false. It could also be that your port is not enabled in the firewall of your system (under Debian and Ubuntu ufw by default or depending on whether another package like firewalld is installed)

Here's my config, which works perfectly:

DB_CONNECTION_URL="mysql://username:password@localhost/database"
DB_PROVIDER=mysql
DISCORD_SECRET=mydiscordsecret
DISCORD_TOKEN=mydiscordbottoken
ENCRYPTION_KEY=myencryptionkey
HTTP_EXTERNAL=http://staticpublicserverip:8169
HTTP_HOST=0.0.0.0
HTTP_INTERNAL=
HTTP_PORT=8169
HTTP_TRUST_PROXY=false
INVALIDATE_TOKENS=
NODE_ENV=production
OVERRIDE_ARCHIVE=
PUBLIC_BOT=false
PUBLISH_COMMANDS=false