louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
60.61k stars 5.41k forks source link

Problems trying to monitor my company's internal website #4610

Closed ansleyzheth closed 8 months ago

ansleyzheth commented 8 months ago

⚠️ Please verify that this question has NOT been raised before.

🛡️ Security Policy

📝 Describe your problem

I'm having some problems trying to monitor my company's internal website

When having to monitor the website https://production.siagri.com.br/simer/auth/login

The same error occurs.

I'm using these settings

image

image

This is my docker-compose.yaml

# Simple docker-compose.yml
# You can change your port or volume location

version: '3.3'

services:
  uptime-kuma:
    image: louislam/uptime-kuma:1
    container_name: uptime-kuma
    volumes:
      - ./uptime-kuma-data:/app/data
    ports:
      - 30001:3001  # <Host Port>:<Container Port>
    restart: always

In Uptime Kuma's Live Demo it worked

image

Do I need to add a DNS? Because I'm using the internal IP where this application is on the site's docker

📝 Error Message(s) or Log

I have this log file along with my docker-compose.yaml

/opt/uptime-kuma/uptime-kuma-data$ cat error.log
[2024-03-20 14:57:12] [Error: insert into `heartbeat` (`down_count`, `duration`, `important`, `monitor_id`, `msg`, `status`, `time`) values (0, 0, true, 17, 'page.goto: net::ERR_CERT_AUTHORITY_INVALID at https://release.siagri.com.br/simer/auth/login
=========================== logs ===========================
navigating to "https://release.siagri.com.br/simer/auth/login", waiting until "networkidle"
============================================================', 0, '2024-03-20 17:54:50.096') - SQLITE_CONSTRAINT: FOREIGN KEY constraint failed] {
  errno: 19,
  code: 'SQLITE_CONSTRAINT'
}
[2024-03-20 17:42:18] KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
    at Client_SQLite3.acquireConnection (/app/node_modules/knex/lib/client.js:312:26)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:538:9)
    at process.processTimers (node:internal/timers:512:7)
    at async Runner.ensureConnection (/app/node_modules/knex/lib/execution/runner.js:287:28)
    at async Runner.run (/app/node_modules/knex/lib/execution/runner.js:30:19)
    at async RedBeanNode.normalizeRaw (/app/node_modules/redbean-node/dist/redbean-node.js:572:22)
    at async RedBeanNode.getRow (/app/node_modules/redbean-node/dist/redbean-node.js:558:22)
    at async RedBeanNode.getCell (/app/node_modules/redbean-node/dist/redbean-node.js:593:19)
    at async Monitor.sendAvgPing (/app/server/model/monitor.js:1203:32) {
  sql: '\n' +
    '            SELECT AVG(ping)\n' +
    '            FROM heartbeat\n' +
    "            WHERE time > DATETIME('now', ? || ' hours')\n" +
    '            AND ping IS NOT NULL\n' +
    '            AND monitor_id = ?  limit ?',
  bindings: [ -24, 7, 1 ]
}
[2024-03-20 17:42:18] KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
    at Client_SQLite3.acquireConnection (/app/node_modules/knex/lib/client.js:312:26)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:538:9)
    at process.processTimers (node:internal/timers:512:7)
    at async Runner.ensureConnection (/app/node_modules/knex/lib/execution/runner.js:287:28)
    at async Runner.run (/app/node_modules/knex/lib/execution/runner.js:30:19)
    at async RedBeanNode.normalizeRaw (/app/node_modules/redbean-node/dist/redbean-node.js:572:22)
    at async RedBeanNode.getRow (/app/node_modules/redbean-node/dist/redbean-node.js:558:22)
    at async RedBeanNode.getCell (/app/node_modules/redbean-node/dist/redbean-node.js:593:19)
    at async Monitor.sendAvgPing (/app/server/model/monitor.js:1203:32) {
  sql: '\n' +
    '            SELECT AVG(ping)\n' +
    '            FROM heartbeat\n' +
    "            WHERE time > DATETIME('now', ? || ' hours')\n" +
    '            AND ping IS NOT NULL\n' +
    '            AND monitor_id = ?  limit ?',
  bindings: [ -24, 22, 1 ]
}
[2024-03-20 17:42:18] KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
    at Client_SQLite3.acquireConnection (/app/node_modules/knex/lib/client.js:312:26)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:538:9)
    at process.processTimers (node:internal/timers:512:7)
    at async Runner.ensureConnection (/app/node_modules/knex/lib/execution/runner.js:287:28)
    at async Runner.run (/app/node_modules/knex/lib/execution/runner.js:30:19)
    at async RedBeanNode.storeCore (/app/node_modules/redbean-node/dist/redbean-node.js:150:26)
    at async RedBeanNode.store (/app/node_modules/redbean-node/dist/redbean-node.js:110:20)
    at async beat (/app/server/model/monitor.js:1007:13)
    at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1026:17) {
  sql: undefined,
  bindings: undefined
}
[2024-03-20 17:42:18] KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
    at Client_SQLite3.acquireConnection (/app/node_modules/knex/lib/client.js:312:26)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:538:9)
    at process.processTimers (node:internal/timers:512:7)
    at async Runner.ensureConnection (/app/node_modules/knex/lib/execution/runner.js:287:28)
    at async Runner.run (/app/node_modules/knex/lib/execution/runner.js:30:19)
    at async RedBeanNode.storeCore (/app/node_modules/redbean-node/dist/redbean-node.js:150:26)
    at async RedBeanNode.store (/app/node_modules/redbean-node/dist/redbean-node.js:110:20)
    at async beat (/app/server/model/monitor.js:1007:13)
    at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1026:17) {
  sql: undefined,
  bindings: undefined
}

🐻 Uptime-Kuma Version

Version: 1.23.11

💻 Operating System and Arch

Ubuntu 20.04.6 LTS

🌐 Browser

Brave 1.64.109

🖥️ Deployment Environment

CommanderStorm commented 8 months ago

The Knex: Timeout acquiring a connection are a pretty good sign that you are running into the pefromance "limits" (~500 montirs, 1.5GB see https://github.com/louislam/uptime-kuma/issues/4500 for further detials) of v1.

Could you report the details about your Deployment Environment in above form? Especially: what is your retention, how long have you run uptime kuma for?

About the link you shared: Given that the first certificate in the chain is invalid, you need to disable certificate checking. image

ansleyzheth commented 8 months ago

Hello everyone, everything good?

Believe it or not I was using Ubuntu 20.04.6 LTS when testing a CURL

image

I tested on Kali and CentOS 7 and CentOS 8 worked

image

image

everything works :D

image