temboard
temboard copied to clipboard
UnicodeDecodeError in parse_dsn [was: error launching /usr/share/temboard/auto_configure.sh]
Hello,
i had launched this script, /usr/share/temboard/auto_configure.sh, with the folowing parameters :
export PGHOST=/home/project/postgres/ export PGPORT=54321 export PGUSER=dbaspidr4 export TEMBOARD_PASSWORD="*******"
i had receive the folwing errors :
mesg: ttyname failed: Inappropriate ioctl for device
INFO: app: Using config file /etc/temboard/temboard.conf.
ERROR: app: Unhandled error:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/temboardui/toolkit/app.py", line 351, in entrypoint
retcode = self.main(argv, environ)
File "/usr/lib/python3.6/site-packages/temboardui/cli/app.py", line 145, in main
return command.main(args)
File "/usr/lib/python3.6/site-packages/temboardui/cli/migratedb.py", line 39, in main
with self.parent.make_conn() as conn:
File "/usr/lib/python3.6/site-packages/temboardui/cli/migratedb.py", line 29, in make_conn
return closing(connect(format_dsn(self.app.config.repository)))
File "/usr/lib64/python3.6/site-packages/psycopg2/__init__.py", line 126, in connect
dsn = _ext.make_dsn(dsn, **kwargs)
File "/usr/lib64/python3.6/site-packages/psycopg2/extensions.py", line 153, in make_dsn
parse_dsn(dsn)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 3: invalid continuation byte
ERROR: app: temboardui version is 8.0.
ERROR: app: This is a bug!
ERROR: app: Please report traceback to https://github.com/dalibo/temboard/issues/new! Thanks!
+ log etape51
+ echo etape51
+ tee -a /dev/fd/3
etape51
+ sudo -inu temboard /usr/bin/temboard --config=/etc/temboard/temboard.conf migratedb upgrade
mesg: ttyname failed: Inappropriate ioctl for device
INFO: app: Using config file /etc/temboard/temboard.conf.
ERROR: app: Unhandled error:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/temboardui/toolkit/app.py", line 351, in entrypoint
retcode = self.main(argv, environ)
File "/usr/lib/python3.6/site-packages/temboardui/cli/app.py", line 145, in main
return command.main(args)
File "/usr/lib/python3.6/site-packages/temboardui/cli/migratedb.py", line 51, in main
with self.parent.make_conn() as conn:
File "/usr/lib/python3.6/site-packages/temboardui/cli/migratedb.py", line 29, in make_conn
return closing(connect(format_dsn(self.app.config.repository)))
File "/usr/lib64/python3.6/site-packages/psycopg2/__init__.py", line 126, in connect
dsn = _ext.make_dsn(dsn, **kwargs)
File "/usr/lib64/python3.6/site-packages/psycopg2/extensions.py", line 153, in make_dsn
parse_dsn(dsn)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 3: invalid continuation byte
ERROR: app: temboardui version is 8.0.
ERROR: app: This is a bug!
ERROR: app: Please report traceback to https://github.com/dalibo/temboard/issues/new! Thanks!
+ catchall
+ local rc=1
+ trap - INT EXIT TERM
+ set +x
Could you advise please,
Regards, Slimane MRABTI
Hi, please don't post your password here (I've updated your comment). It looks like you have a problem with the encoding in the temboard.conf file. Can you give us the contents?
Hi,
Please find below the contents :
cat /etc/temboard/temboard.conf
# Configuration initiated by /usr/share/temboard/auto_configure.sh on Wed Aug 2 11:08:29 CEST 2023
#
# See https://temboard.rtfd.io/ for details on configuration
# possibilities.
[temboard]
port = 8888
ssl_cert_file = /etc/pki/tls/certs/temboard-auto.pem
ssl_key_file = /etc/pki/tls/private/temboard-auto.key
cookie_secret = *******
home = /var/lib/temboard
[repository]
host = /home/spidr4/data/14/run/postgres/
port = 54321
user = temboard
password = *****
dbname = temboard
[logging]
method = stderr
level = INFO
[monitoring]
# purge_after = 730
[statements]
# purge_after = 7
Best regards
Hi,
Could you please tel me whether you need more informations ?
Best regards
@Slimane2021 what is the output of file -i /etc/temboard/temboard.conf
?
Hello,
this is the output :
/etc/temboard/temboard.conf: text/plain; charset=us-ascii
Best regards
You have a non ascii char in your password or something like that.
Hello,
You can get this error if the password stored in the temboard.conf file is not correct. This can happen if the auto_configure.sh script is run a second time, as it will not change the password at database level.