jack-richards / bptf-autopricer

Automatically prices items using listing data from backpack.tf, with data from prices.tf acting as a baseline.
MIT License
24 stars 6 forks source link

Bptf-autopricer can't start. #9

Closed SuperIsakSwahn closed 4 months ago

SuperIsakSwahn commented 5 months ago

Havish said that it's the server that needs to be started, how do I do that? Here's the full log:

Microsoft Windows [Version 10.0.19045.3758] (c) Microsoft Corporation. All rights reserved.

C:\Users\Isak>cd C:\tf2autobot\bptf-autopricer-1.2.0 && pm2 start bptf-autopricer.js && pm2 logs [PM2] Spawning PM2 daemon with pm2_home=C:\Users\Isak.pm2 [PM2] PM2 Successfully daemonized [PM2] Starting C:\tf2autobot\bptf-autopricer-1.2.0\bptf-autopricer.js in fork_mode (1 instance) [PM2] Done. ┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐ │ id │ name │ mode │ ↺ │ status │ cpu │ memory │ ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤ │ 0 │ bptf-autopricer │ fork │ 0 │ online │ 14.1% │ 38.3mb │ └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘ [PM2][WARN] Current process list is not synchronized with saved list. Type 'pm2 save' to synchronize. [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option) C:\Users\Isak.pm2\pm2.log last 15 lines: PM2 | 2024-02-13T12:45:32: PM2 log: PM2 version : 5.3.1 PM2 | 2024-02-13T12:45:32: PM2 log: Node.js version : 20.11.0 PM2 | 2024-02-13T12:45:32: PM2 log: Current arch : x64 PM2 | 2024-02-13T12:45:32: PM2 log: PM2 home : C:\Users\Isak.pm2 PM2 | 2024-02-13T12:45:32: PM2 log: PM2 PID file : C:\Users\Isak.pm2\pm2.pid PM2 | 2024-02-13T12:45:32: PM2 log: RPC socket file : \.\pipe\rpc.sock PM2 | 2024-02-13T12:45:32: PM2 log: BUS socket file : \.\pipe\pub.sock PM2 | 2024-02-13T12:45:32: PM2 log: Application log path : C:\Users\Isak.pm2\logs PM2 | 2024-02-13T12:45:32: PM2 log: Worker Interval : 30000 PM2 | 2024-02-13T12:45:32: PM2 log: Process dump file : C:\Users\Isak.pm2\dump.pm2 PM2 | 2024-02-13T12:45:32: PM2 log: Concurrent actions : 2 PM2 | 2024-02-13T12:45:32: PM2 log: SIGTERM timeout : 1600 PM2 | 2024-02-13T12:45:32: PM2 log: =============================================================================== PM2 | 2024-02-13T12:45:33: PM2 log: App [bptf-autopricer:0] starting in -fork mode- PM2 | 2024-02-13T12:45:33: PM2 log: App [bptf-autopricer:0] online

C:\Users\Isak.pm2\logs\bptf-autopricer-error.log last 15 lines: 0|bptf-aut | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 0|bptf-aut | at async C:\tf2autobot\bptf-autopricer-1.2.0\bptf-autopricer.js:277:5 { 0|bptf-aut | errno: -4058, 0|bptf-aut | code: 'ENOENT', 0|bptf-aut | syscall: 'open', 0|bptf-aut | path: 'C:\tf2autobot\bptf-autopricer-1.2.0\files\pricelist.json' 0|bptf-aut | } 0|bptf-aut | Error reading and updating allowed item names: SyntaxError: Unexpected token '', ""... is not valid JSON 0|bptf-aut | at JSON.parse () 0|bptf-aut | at loadNames (C:\tf2autobot\bptf-autopricer-1.2.0\bptf-autopricer.js:117:34) 0|bptf-aut | at FSWatcher. (C:\tf2autobot\bptf-autopricer-1.2.0\bptf-autopricer.js:134:5) 0|bptf-aut | at FSWatcher.emit (node:events:518:28) 0|bptf-aut | at FSWatcher.emitWithAll (C:\tf2autobot\bptf-autopricer-1.2.0\node_modules\chokidar\index.js:540:8) 0|bptf-aut | at FSWatcher._emit (C:\tf2autobot\bptf-autopricer-1.2.0\node_modules\chokidar\index.js:632:8) 0|bptf-aut | at listener (C:\tf2autobot\bptf-autopricer-1.2.0\node_modules\chokidar\lib\nodefs-handler.js:370:20)

C:\Users\Isak.pm2\logs\bptf-autopricer-out.log last 15 lines: 0|bptf-aut | Error: connect ECONNREFUSED 127.0.0.1:5432 0|bptf-aut | at createConnectionError (node:net:1634:14) 0|bptf-aut | at afterConnectMultiple (node:net:1664:40) { 0|bptf-aut | errno: -4078, 0|bptf-aut | code: 'ECONNREFUSED', 0|bptf-aut | syscall: 'connect', 0|bptf-aut | address: '127.0.0.1', 0|bptf-aut | port: 5432 0|bptf-aut | } 0|bptf-aut | ] 0|bptf-aut | } 0|bptf-aut | Couldn't create a price for Strange Australium Minigun 0|bptf-aut | Connected to socket. 0|bptf-aut | Connected to socket. 0|bptf-aut | Connected to socket.

0|bptf-autopricer | Updated allowed item names. 0|bptf-autopricer | API and Socket.IO server started on port 3456 0|bptf-autopricer | Connected to socket. 0|bptf-autopricer | AggregateError 0|bptf-autopricer | at internalConnectMultiple (node:net:1114:18) 0|bptf-autopricer | at afterConnectMultiple (node:net:1667:5) { 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | [errors]: [ 0|bptf-autopricer | Error: connect ECONNREFUSED ::1:5432 0|bptf-autopricer | at createConnectionError (node:net:1634:14) 0|bptf-autopricer | at afterConnectMultiple (node:net:1664:40) { 0|bptf-autopricer | errno: -4078, 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | syscall: 'connect', 0|bptf-autopricer | address: '::1', 0|bptf-autopricer | port: 5432 0|bptf-autopricer | }, 0|bptf-autopricer | Error: connect ECONNREFUSED 127.0.0.1:5432 0|bptf-autopricer | at createConnectionError (node:net:1634:14) 0|bptf-autopricer | at afterConnectMultiple (node:net:1664:40) { 0|bptf-autopricer | errno: -4078, 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | syscall: 'connect', 0|bptf-autopricer | address: '127.0.0.1', 0|bptf-autopricer | port: 5432 0|bptf-autopricer | } 0|bptf-autopricer | ] 0|bptf-autopricer | } 0|bptf-autopricer | AggregateError 0|bptf-autopricer | at internalConnectMultiple (node:net:1114:18) 0|bptf-autopricer | at afterConnectMultiple (node:net:1667:5) { 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | [errors]: [ 0|bptf-autopricer | Error: connect ECONNREFUSED ::1:5432 0|bptf-autopricer | at createConnectionError (node:net:1634:14) 0|bptf-autopricer | at afterConnectMultiple (node:net:1664:40) { 0|bptf-autopricer | errno: -4078, 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | syscall: 'connect', 0|bptf-autopricer | address: '::1', 0|bptf-autopricer | port: 5432 0|bptf-autopricer | }, 0|bptf-autopricer | Error: connect ECONNREFUSED 127.0.0.1:5432 0|bptf-autopricer | at createConnectionError (node:net:1634:14) 0|bptf-autopricer | at afterConnectMultiple (node:net:1664:40) { 0|bptf-autopricer | errno: -4078, 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | syscall: 'connect', 0|bptf-autopricer | address: '127.0.0.1', 0|bptf-autopricer | port: 5432 0|bptf-autopricer | } 0|bptf-autopricer | ] 0|bptf-autopricer | } 0|bptf-autopricer | Couldn't create a price for Strange Australium Minigun ^C C:\tf2autobot\bptf-autopricer-1.2.0>cd C:\tf2autobot\bptf-autopricer-1.2.0 && pm2 start bptf-autopricer.js && pm2 logs [PM2][ERROR] Script already launched, add -f option to force re-execution

C:\tf2autobot\bptf-autopricer-1.2.0>pm2 kill [PM2] Applying action deleteProcessId on app [all](ids: [ 0 ]) [PM2] bptf-autopricer ✓ [PM2] [v] All Applications Stopped [PM2] [v] PM2 Daemon Stopped

C:\tf2autobot\bptf-autopricer-1.2.0>cd C:\tf2autobot\bptf-autopricer-1.2.0 && pm2 start bptf-autopricer.js && pm2 logs [PM2] Spawning PM2 daemon with pm2_home=C:\Users\Isak.pm2 [PM2] PM2 Successfully daemonized [PM2] Starting C:\tf2autobot\bptf-autopricer-1.2.0\bptf-autopricer.js in fork_mode (1 instance) [PM2] Done. ┌────┬────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ ├────┼────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤ │ 0 │ bptf-autopricer │ default │ 1.0.0 │ fork │ 5640 │ 0s │ 0 │ online │ 0% │ 38.9mb │ Isak │ disabled │ └────┴────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘ [PM2][WARN] Current process list is not synchronized with saved list. Type 'pm2 save' to synchronize. [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option) C:\Users\Isak.pm2\pm2.log last 15 lines: PM2 | 2024-02-13T12:46:49: PM2 log: PM2 version : 5.3.1 PM2 | 2024-02-13T12:46:49: PM2 log: Node.js version : 20.11.0 PM2 | 2024-02-13T12:46:49: PM2 log: Current arch : x64 PM2 | 2024-02-13T12:46:49: PM2 log: PM2 home : C:\Users\Isak.pm2 PM2 | 2024-02-13T12:46:49: PM2 log: PM2 PID file : C:\Users\Isak.pm2\pm2.pid PM2 | 2024-02-13T12:46:49: PM2 log: RPC socket file : \.\pipe\rpc.sock PM2 | 2024-02-13T12:46:49: PM2 log: BUS socket file : \.\pipe\pub.sock PM2 | 2024-02-13T12:46:49: PM2 log: Application log path : C:\Users\Isak.pm2\logs PM2 | 2024-02-13T12:46:49: PM2 log: Worker Interval : 30000 PM2 | 2024-02-13T12:46:49: PM2 log: Process dump file : C:\Users\Isak.pm2\dump.pm2 PM2 | 2024-02-13T12:46:49: PM2 log: Concurrent actions : 2 PM2 | 2024-02-13T12:46:49: PM2 log: SIGTERM timeout : 1600 PM2 | 2024-02-13T12:46:49: PM2 log: =============================================================================== PM2 | 2024-02-13T12:46:49: PM2 log: App [bptf-autopricer:0] starting in -fork mode- PM2 | 2024-02-13T12:46:49: PM2 log: App [bptf-autopricer:0] online

C:\Users\Isak.pm2\logs\bptf-autopricer-error.log last 15 lines: 0|bptf-aut | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 0|bptf-aut | at async C:\tf2autobot\bptf-autopricer-1.2.0\bptf-autopricer.js:277:5 { 0|bptf-aut | errno: -4058, 0|bptf-aut | code: 'ENOENT', 0|bptf-aut | syscall: 'open', 0|bptf-aut | path: 'C:\tf2autobot\bptf-autopricer-1.2.0\files\pricelist.json' 0|bptf-aut | } 0|bptf-aut | Error reading and updating allowed item names: SyntaxError: Unexpected token '', ""... is not valid JSON 0|bptf-aut | at JSON.parse () 0|bptf-aut | at loadNames (C:\tf2autobot\bptf-autopricer-1.2.0\bptf-autopricer.js:117:34) 0|bptf-aut | at FSWatcher. (C:\tf2autobot\bptf-autopricer-1.2.0\bptf-autopricer.js:134:5) 0|bptf-aut | at FSWatcher.emit (node:events:518:28) 0|bptf-aut | at FSWatcher.emitWithAll (C:\tf2autobot\bptf-autopricer-1.2.0\node_modules\chokidar\index.js:540:8) 0|bptf-aut | at FSWatcher._emit (C:\tf2autobot\bptf-autopricer-1.2.0\node_modules\chokidar\index.js:632:8) 0|bptf-aut | at listener (C:\tf2autobot\bptf-autopricer-1.2.0\node_modules\chokidar\lib\nodefs-handler.js:370:20)

C:\Users\Isak.pm2\logs\bptf-autopricer-out.log last 15 lines: 0|bptf-aut | address: '::1', 0|bptf-aut | port: 5432 0|bptf-aut | }, 0|bptf-aut | Error: connect ECONNREFUSED 127.0.0.1:5432 0|bptf-aut | at createConnectionError (node:net:1634:14) 0|bptf-aut | at afterConnectMultiple (node:net:1664:40) { 0|bptf-aut | errno: -4078, 0|bptf-aut | code: 'ECONNREFUSED', 0|bptf-aut | syscall: 'connect', 0|bptf-aut | address: '127.0.0.1', 0|bptf-aut | port: 5432 0|bptf-aut | } 0|bptf-aut | ] 0|bptf-aut | } 0|bptf-aut | Couldn't create a price for Strange Australium Minigun

0|bptf-autopricer | Updated allowed item names. 0|bptf-autopricer | API and Socket.IO server started on port 3456 0|bptf-autopricer | Connected to socket. 0|bptf-autopricer | AggregateError 0|bptf-autopricer | at internalConnectMultiple (node:net:1114:18) 0|bptf-autopricer | at afterConnectMultiple (node:net:1667:5) { 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | [errors]: [ 0|bptf-autopricer | Error: connect ECONNREFUSED ::1:5432 0|bptf-autopricer | at createConnectionError (node:net:1634:14) 0|bptf-autopricer | at afterConnectMultiple (node:net:1664:40) { 0|bptf-autopricer | errno: -4078, 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | syscall: 'connect', 0|bptf-autopricer | address: '::1', 0|bptf-autopricer | port: 5432 0|bptf-autopricer | }, 0|bptf-autopricer | Error: connect ECONNREFUSED 127.0.0.1:5432 0|bptf-autopricer | at createConnectionError (node:net:1634:14) 0|bptf-autopricer | at afterConnectMultiple (node:net:1664:40) { 0|bptf-autopricer | errno: -4078, 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | syscall: 'connect', 0|bptf-autopricer | address: '127.0.0.1', 0|bptf-autopricer | port: 5432 0|bptf-autopricer | } 0|bptf-autopricer | ] 0|bptf-autopricer | } 0|bptf-autopricer | AggregateError 0|bptf-autopricer | at internalConnectMultiple (node:net:1114:18) 0|bptf-autopricer | at afterConnectMultiple (node:net:1667:5) { 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | [errors]: [ 0|bptf-autopricer | Error: connect ECONNREFUSED ::1:5432 0|bptf-autopricer | at createConnectionError (node:net:1634:14) 0|bptf-autopricer | at afterConnectMultiple (node:net:1664:40) { 0|bptf-autopricer | errno: -4078, 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | syscall: 'connect', 0|bptf-autopricer | address: '::1', 0|bptf-autopricer | port: 5432 0|bptf-autopricer | }, 0|bptf-autopricer | Error: connect ECONNREFUSED 127.0.0.1:5432 0|bptf-autopricer | at createConnectionError (node:net:1634:14) 0|bptf-autopricer | at afterConnectMultiple (node:net:1664:40) { 0|bptf-autopricer | errno: -4078, 0|bptf-autopricer | code: 'ECONNREFUSED', 0|bptf-autopricer | syscall: 'connect', 0|bptf-autopricer | address: '127.0.0.1', 0|bptf-autopricer | port: 5432 0|bptf-autopricer | } 0|bptf-autopricer | ] 0|bptf-autopricer | } 0|bptf-autopricer | Couldn't create a price for Strange Australium Minigun 0|bptf-autopricer | Connected to socket. ^C C:\tf2autobot\bptf-autopricer-1.2.0>pm2 kill [PM2] Applying action deleteProcessId on app [all](ids: [ 0 ]) [PM2] bptf-autopricer ✓ [PM2] [v] All Applications Stopped [PM2] [v] PM2 Daemon Stopped

C:\tf2autobot\bptf-autopricer-1.2.0>

jack-richards commented 4 months ago

From the error logs you provided, the database has not been set up correctly according to the instructions in the readme.

In addition, the items provided in the items_list.json have not been formatted correctly.