8000 When installing container with all new docker I got SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_ colours' · Issue #508 · librenms/docker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

When installing container with all new docker I got SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_ colours' #508

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

Open
3 tasks done
netomat opened this issue Apr 22, 2025 · 1 comment

Comments

@netomat
Copy link
netomat commented Apr 22, 2025

Support guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Aloha,
I am trying to install Librnms from scratch with docker,
unfortunately I receive strange "duplicate column errors, when the db is initialized.

`sudo docker logs librenms
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-fix-logs.sh: executing...
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing...
Switching to PGID 100...
Switching to PUID 1027...
[cont-init.d] 01-fix-uidgid.sh: exited 0.
[cont-init.d] 02-fix-perms.sh: executing...
Fixing perms...
[cont-init.d] 02-fix-perms.sh: exited 0.
[cont-init.d] 03-config.sh: executing...
Setting timezone to Europe/Kiev...
Setting PHP-FPM configuration...
Setting PHP INI configuration...
Setting OpCache configuration...
Setting Nginx configuration...
Updating SNMP community...
Initializing LibreNMS files / folders...
Setting LibreNMS configuration...
Checking LibreNMS plugins...
Fixing perms...
Checking additional Monitoring plugins...
Checking alert templates...
[cont-init.d] 03-config.sh: exited 0.
[cont-init.d] 04-svc-main.sh: executing...
Waiting 60s for database to be ready...
Database ready!
Updating database schema...

INFO Running migrations.

2024_10_12_210114_custom_map_legend_colours ................... 3,840ms FAIL

In Connection.php line 829:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_
colours' (Connection: mysql, SQL: alter table custom_maps add legend_col ours longtext null after legend_hide_overspeed)

In Connection.php line 587:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_
colours'

[cont-init.d] 04-svc-main.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-fix-logs.sh: executing...
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing...
[cont-init.d] 01-fix-uidgid.sh: exited 0.
[cont-init.d] 02-fix-perms.sh: executing...
Fixing perms...
[cont-init.d] 02-fix-perms.sh: exited 0.
[cont-init.d] 03-config.sh: executing...
Setting timezone to Europe/Kiev...
Setting PHP-FPM configuration...
Setting PHP INI configuration...
Setting OpCache configuration...
Setting Nginx configuration...
Updating SNMP community...
Initializing LibreNMS files / folders...
Setting LibreNMS configuration...
Checking LibreNMS plugins...
Fixing perms...
Checking additional Monitoring plugins...
Checking alert templates...
[cont-init.d] 03-config.sh: exited 0.
[cont-init.d] 04-svc-main.sh: executing...
Waiting 60s for database to be ready...
Database ready!
Updating database schema...

INFO Running migrations.

2024_10_12_210114_custom_map_legend_colours ................... 1,767ms FAIL

In Connection.php line 829:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_
colours' (Connection: mysql, SQL: alter table custom_maps add legend_col ours longtext null after legend_hide_overspeed)

In Connection.php line 587:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_
colours'

[cont-init.d] 04-svc-main.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-fix-logs.sh: executing...
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing...
[cont-init.d] 01-fix-uidgid.sh: exited 0.
[cont-init.d] 02-fix-perms.sh: executing...
Fixing perms...
[cont-init.d] 02-fix-perms.sh: exited 0.
[cont-init.d] 03-config.sh: executing...
Setting timezone to Europe/Kiev...
Setting PHP-FPM configuration...
Setting PHP INI configuration...
Setting OpCache configuration...
Setting Nginx configuration...
Updating SNMP community...
Initializing LibreNMS files / folders...
Setting LibreNMS configuration...
Checking LibreNMS plugins...
Fixing perms...
Checking additional Monitoring plugins...
Checking alert templates...
[cont-init.d] 03-config.sh: exited 0.
[cont-init.d] 04-svc-main.sh: executing...
Waiting 60s for database to be ready...
Database ready!
Updating database schema...

INFO Running migrations.

2024_10_12_210114_custom_map_legend_colours ................... 2,267ms FAIL

In Connection.php line 829:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_
colours' (Connection: mysql, SQL: alter table custom_maps add legend_col ours longtext null after legend_hide_overspeed)

In Connection.php line 587:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_
colours'

[cont-init.d] 04-svc-main.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-fix-logs.sh: executing...
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing...
`
I have have zero clue what that could be :-)

Anybody any idea?
Thanks
Marcel

Expected behaviour

Librenms will be installed and start

Actual behaviour

Librenms does not fully start, the niginx inside the libre container does not start as well

Steps to reproduce

  1. delete all container with:
    sudo docker rm -f
  2. remove all downloaded images with sudo docker rm -f

Docker info

sudo docker info
Password: 
Client:
 Version:    24.0.2
 Context:    default
 Debug Mode: false

Server:
 Containers: 11
  Running: 10
  Paused: 0
  Stopped: 1
 Images: 8
 Server Version: 24.0.2
 Storage Driver: btrfs
  Btrfs: 
 Logging Driver: db
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs db fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 067f5021280b8de2059026fb5c43c4adb0f3f244
 runc version: 0320c58
 init version: ed96d00
 Security Options:
  apparmor
 Kernel Version: 4.4.302+
 Operating System: Synology NAS
 (containerized)
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 31.32GiB
 Name: nas01
 ID: 292cc915-096c-449b-9036-ca1abc6ba2c5
 Docker Root Dir: /volume1/@docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No kernel memory TCP limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support

Docker Compose config

Logs

sudo docker logs librenms
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-fix-logs.sh: executing... 
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing... 
Switching to PGID 100...
Switching to PUID 1027...
[cont-init.d] 01-fix-uidgid.sh: exited 0.
[cont-init.d] 02-fix-perms.sh: executing... 
Fixing perms...
[cont-init.d] 02-fix-perms.sh: exited 0.
[cont-init.d] 03-config.sh: executing... 
Setting timezone to Europe/Kiev...
Setting PHP-FPM configuration...
Setting PHP INI configuration...
Setting OpCache configuration...
Setting Nginx configuration...
Updating SNMP community...
Initializing LibreNMS files / folders...
Setting LibreNMS configuration...
Checking LibreNMS plugins...
Fixing perms...
Checking additional Monitoring plugins...
Checking alert templates...
[cont-init.d] 03-config.sh: exited 0.
[cont-init.d] 04-svc-main.sh: executing... 
Waiting 60s for database to be ready...
Database ready!
Updating database schema...

   INFO  Running migrations.  

  2024_10_12_210114_custom_map_legend_colours ................... 3,840ms FAIL

In Connection.php line 829:
                                                                               
  SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_  
  colours' (Connection: mysql, SQL: alter table `custom_maps` add `legend_col  
  ours` longtext null after `legend_hide_overspeed`)                           
                                                                               

In Connection.php line 587:
                                                                               
  SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_  
  colours'                                                                     
                                                                               

[cont-init.d] 04-svc-main.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-fix-logs.sh: executing... 
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing... 
[cont-init.d] 01-fix-uidgid.sh: exited 0.
[cont-init.d] 02-fix-perms.sh: executing... 
Fixing perms...
[cont-init.d] 02-fix-perms.sh: exited 0.
[cont-init.d] 03-config.sh: executing... 
Setting timezone to Europe/Kiev...
Setting PHP-FPM configuration...
Setting PHP INI configuration...
Setting OpCache configuration...
Setting Nginx configuration...
Updating SNMP community...
Initializing LibreNMS files / folders...
Setting Lib
8000
reNMS configuration...
Checking LibreNMS plugins...
Fixing perms...
Checking additional Monitoring plugins...
Checking alert templates...
[cont-init.d] 03-config.sh: exited 0.
[cont-init.d] 04-svc-main.sh: executing... 
Waiting 60s for database to be ready...
Database ready!
Updating database schema...

   INFO  Running migrations.  

  2024_10_12_210114_custom_map_legend_colours ................... 1,767ms FAIL

In Connection.php line 829:
                                                                               
  SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_  
  colours' (Connection: mysql, SQL: alter table `custom_maps` add `legend_col  
  ours` longtext null after `legend_hide_overspeed`)                           
                                                                               

In Connection.php line 587:
                                                                               
  SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_  
  colours'                                                                     
                                                                               

[cont-init.d] 04-svc-main.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-fix-logs.sh: executing... 
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing... 
[cont-init.d] 01-fix-uidgid.sh: exited 0.
[cont-init.d] 02-fix-perms.sh: executing... 
Fixing perms...
[cont-init.d] 02-fix-perms.sh: exited 0.
[cont-init.d] 03-config.sh: executing... 
Setting timezone to Europe/Kiev...
Setting PHP-FPM configuration...
Setting PHP INI configuration...
Setting OpCache configuration...
Setting Nginx configuration...
Updating SNMP community...
Initializing LibreNMS files / folders...
Setting LibreNMS configuration...
Checking LibreNMS plugins...
Fixing perms...
Checking additional Monitoring plugins...
Checking alert templates...
[cont-init.d] 03-config.sh: exited 0.
[cont-init.d] 04-svc-main.sh: executing... 
Waiting 60s for database to be ready...
Database ready!
Updating database schema...

   INFO  Running migrations.  

  2024_10_12_210114_custom_map_legend_colours ................... 2,267ms FAIL

In Connection.php line 829:
                                                                               
  SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_  
  colours' (Connection: mysql, SQL: alter table `custom_maps` add `legend_col  
  ours` longtext null after `legend_hide_overspeed`)                           
                                                                               

In Connection.php line 587:
                                                                               
  SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'legend_  
  colours'                                                                     
                                                                               

[cont-init.d] 04-svc-main.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-fix-logs.sh: executing... 
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing...

Additional info

Addtional info:
I am using a dedicated bridge interface with dedicated IP for each container as I have on the docker host not all ports available
And I disbabled the smtp container,a s I dont need any mail

@murrant
Copy link
Member
murrant commented Apr 23, 2025

Looks like a previous database migration got interrupted. I suggest deleting your database fully (since you said this is a new install and shouldn't have any data) and trying again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0