amidaware / tacticalrmm

A remote monitoring & management tool, built with Django, Vue and Go.
https://docs.tacticalrmm.com
Other
3.17k stars 440 forks source link

internal server error 500 - conversion between UTF8 and SQL_ASCII is not supported #1522

Open gogo0618 opened 1 year ago

gogo0618 commented 1 year ago

Server Info (please complete the following information):

Installation Method: - [ ] Standard

Agent Info (please complete the following information):

Describe the bug After clean standard install , generated winOS agent and added my first 2 computers. Double clicked on any of the clients and a window for editing is shown , but when I try so save ( no matter if anything is changed or not) it shows "internal server error 500" and nothing is saved. In django_debug.log found this error : django.db.utils.NotSupportedError: conversion between UTF8 and SQL_ASCII is not supported LINE 1: ...12:09:34.131767+00:00'::timestamptz, "services" = '[{"pid": ...

Tried with clean install on debian 10 and 11, Ubuntu 20.04 - problem is the same on all systems

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error
silversword411 commented 1 year ago

What language are you using?

Are you using any non-ascii characters as part of your client or site names?

Please provide some screenshots of your TRMM admin interface.

gogo0618 commented 1 year ago

Using US English language , my domain is fairpoint.backtothejungle.ml. Only timezone is Europe/Sofia. but tried with US timezone and the issue was the same. Cannot provide screenshots right now , because I tried 6-7 different installs and connot issue another let's encrypt certificate until tomorrow.

wh1te909 commented 1 year ago

once your let's encrypt cooldown expires, please install again using debian 11 and install your agents, and once you get that error please run the following bash script which will dump your database to a file named db-gogo0618.psql.gz and then please send that file to us, you can open a ticket here and upload it there, I want to take a look at your database thanks

#!/usr/bin/env bash

POSTGRES_USER=$(/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py get_config dbuser)
POSTGRES_PW=$(/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py get_config dbpw)

pg_dump --dbname=postgresql://"${POSTGRES_USER}":"${POSTGRES_PW}"@127.0.0.1:5432/tacticalrmm | gzip -9 >db-gogo0618.psql.gz
gogo0618 commented 1 year ago

Opened ticket and send db dump as you asked

gogo0618 commented 1 year ago

Found workaround solution - installed phpPGadmin and exported tacticalrmm DB. Renamed tacticalrmm, then created new DB (with UTF8 encoding) called tacticalrmm and imported back already exported one . Now works When first logged in phpPGadmin - tacticalrmm DB was with SQL_ASCII encoding. The DB dump you asked me to provide is exported with UTF8 encoding