Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control characters in netdisco-backend.log #1168

Open
inphobia opened this issue Feb 16, 2024 · 1 comment
Open

control characters in netdisco-backend.log #1168

inphobia opened this issue Feb 16, 2024 · 1 comment

Comments

@inphobia
Copy link
Member

Expected Behavior

control characters should be stripped out of the log. this string seems to be propagated from somewhere in the dbix stack as far as i can tell.

Current Behavior

[1905] 2024-01-27 22:07:47 error bless( {'msg' => 'DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: DBI connect(\'dbname=netdisco;host=1.1.1.1\',\'netdisco\',...) failed: connection to server at "1.1.1.1", port 5432 failed: Connection refused
        Is the server running on that host and accepting TCP/IP connections? at /home/netdisco/perl5/lib/perl5/DBIx/Class/Storage/DBI.pm line 1639. at /home/netdisco/perl5/lib/perl5/App/Netdisco/JobQueue/PostgreSQL.pm line 265
'}, 'DBIx::Class::Exception' )
        (in cleanup) à<93>+KðU^@^@anup)  at /home/netdisco/perl5/lib/perl5/DBIx/Class/Exception.pm line 77 during global destruction.
DBIx::Class::Schema::Versioned::_on_connect(): Your DB is currently unversioned. Please call upgrade on your schema to sync the DB. at /home/netdisco/perl5/lib/perl5/DBICx/Sugar.pm line 121
error running job: DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: DBI connect('dbname=netdisco;host=1.1.1.1','netdisco',...) failed: connection to server at "1.1.1.1", port 5432 failed: Connection refused
        Is the server running on that host and accepting TCP/IP connections? at /home/netdisco/perl5/lib/perl5/DBIx/Class/Storage/DBI.pm line 1639. at /home/netdisco/perl5/lib/perl5/App/Netdisco/Util/Device.pm line 65

note the: (in cleanup) à<93>+KðU^@^@anup)

Possible Solution

Steps to Reproduce (for bugs)

  1. run netdisco and database on different hosts, connect using tcp
  2. reboot machine which runs database with netdisco-backend still running.

Context

Your Environment

  • Netdisco version used: 2.072002
    dbix:class 0.082843

Config info (deployment.yml)

Device information

https://github.com/netdisco/netdisco/wiki/Snapshot#share-a-snapshot

@inphobia
Copy link
Member Author

at first glance it seems to be trying to print "cleanup" twice, but the second one gets corrupted somehow.

also found them in netdisco-web.log

2024/01/28-23:35:21 Server closing!
        (in cleanup) 300UtY`U^@^@anup)  at /home/netdisco/perl5/lib/perl5/DBIx/Class/Exception.pm line 77 during global destruction.
        (in cleanup) `343346Z`U^@^@anup)  at /home/netdisco/perl5/lib/perl5/DBIx/Class/Exception.pm line 77 during global destruction.
        (in cleanup) P337)[`U^@^@anup)  at /home/netdisco/perl5/lib/perl5/DBIx/Class/Exception.pm line 77 during global destruction.
        (in cleanup) Ю305Z`U^@^@anup)  at /home/netdisco/perl5/lib/perl5/DBIx/Class/Exception.pm line 77 during global destruction.
        (in cleanup) ^PS327Z`U^@^@anup)  at /home/netdisco/perl5/lib/perl5/DBIx/Class/Exception.pm line 77 during global destruction.

netdisco get's started with the following locale environment should that be relevant:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants