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

Exception thrown in form of stacktrace #74

Closed
flazzarini opened this issue Apr 13, 2022 · 5 comments
Closed

Exception thrown in form of stacktrace #74

flazzarini opened this issue Apr 13, 2022 · 5 comments

Comments

@flazzarini
Copy link

Hi there,

I am trying to use the docker images provided here in combination with a docker-compose.yml file. When I am running the stack with a mariadb I am getting a stack trace error, which I don't really understand. Could you have a look at my docker-compose.yml file and try to replicate the issue.

I am not sure if the issue might be related to the database not being ready once the powerdns process is started.

Thanks for your help.

docker-compose.yml

---

version: "3"

services:
  database:
    image: mariadb
    environment:
      - MYSQL_DATABASE=pdns
      - MYSQL_ROOT_PASSWORD=pdns
      - MYSQL_USER=pdns
      - MYSQL_PASSWORD=pdns

  pdns:
    image: pschiffe/pdns-mysql:4.6
    depends_on:
      - database
    environment:
      - PDNS_master=yes
      - PDNS_api=yes
      - PDNS_api_key=secret
      - PDNS_webserver=yes
      - PDNS_gmysql_host=database
      - PDNS_gmysql_dbname=pdns
      - PDNS_gmysql_user=pdns
      - PDNS_gmysql_password=pdns
      - PDNS_gmysql_port=3306
    ports:
      - "50020:8081"

Console output

$ docker-compose up
Creating network "powerdns_default" with the default driver
Creating powerdns_database_1 ... done
Creating powerdns_pdns_1     ... done
Attaching to powerdns_database_1, powerdns_pdns_1
database_1  | 2022-04-13 09:07:05+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.7.3+maria~focal started.
database_1  | 2022-04-13 09:07:05+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
database_1  | 2022-04-13 09:07:05+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.7.3+maria~focal started.
database_1  | 2022-04-13 09:07:06+00:00 [Note] [Entrypoint]: Initializing database files
database_1  | 2022-04-13  9:07:06 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
pdns_1      | ERROR 2002 (HY000): Can't connect to MySQL server on 'database' (115)
pdns_1      | MySQL is unavailable - sleeping
database_1  |
database_1  |
database_1  | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
database_1  | To do so, start the server, then issue the following command:
database_1  |
database_1  | '/usr/bin/mysql_secure_installation'
database_1  |

database_1  | which will also give you the option of removing the test
database_1  | databases and anonymous user created by default.  This is
database_1  | strongly recommended for production servers.
database_1  |
database_1  | See the MariaDB Knowledgebase at https://mariadb.com/kb
database_1  |
database_1  | Please report any problems at https://mariadb.org/jira
database_1  |
database_1  | The latest information about MariaDB is available at https://mariadb.org/.
database_1  |
database_1  | Consider joining MariaDB's strong and vibrant community:
database_1  | https://mariadb.org/get-involved/
database_1  |
database_1  | 2022-04-13 09:07:09+00:00 [Note] [Entrypoint]: Database files initialized
database_1  | 2022-04-13 09:07:09+00:00 [Note] [Entrypoint]: Starting temporary server
database_1  | 2022-04-13 09:07:09+00:00 [Note] [Entrypoint]: Waiting for server startup
database_1  | 2022-04-13  9:07:09 0 [Note] mariadbd (server 10.7.3-MariaDB-1:10.7.3+maria~focal) starting as process 100 ...
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: Number of transaction pools: 1
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
database_1  | 2022-04-13  9:07:09 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: Using Linux native AIO
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: Completed initialization of buffer pool
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: 128 rollback segments are active.
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: Creating shared tablespace for temporary tables
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
database_1  | 2022-04-13  9:07:09 0 [Note] InnoDB: 10.7.3 started; log sequence number 42173; transaction id 14
database_1  | 2022-04-13  9:07:09 0 [Note] Plugin 'FEEDBACK' is disabled.
database_1  | 2022-04-13  9:07:09 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
database_1  | 2022-04-13  9:07:09 0 [Warning] 'user' entry 'root@1fcbbdf060a5' ignored in --skip-name-resolve mode.
database_1  | 2022-04-13  9:07:09 0 [Warning] 'proxies_priv' entry '@% root@1fcbbdf060a5' ignored in --skip-name-resolve mode.
database_1  | 2022-04-13  9:07:09 0 [Note] mariadbd: ready for connections.
database_1  | Version: '10.7.3-MariaDB-1:10.7.3+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
pdns_1      | ERROR 2002 (HY000): Can't connect to MySQL server on 'database' (115)
pdns_1      | MySQL is unavailable - sleeping
database_1  | 2022-04-13 09:07:10+00:00 [Note] [Entrypoint]: Temporary server started.
database_1  | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
database_1  | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
database_1  | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
database_1  | 2022-04-13 09:07:12+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation)
database_1  | 2022-04-13 09:07:12+00:00 [Note] [Entrypoint]: Creating database pdns
database_1  | 2022-04-13 09:07:12+00:00 [Note] [Entrypoint]: Creating user pdns
database_1  | 2022-04-13 09:07:12+00:00 [Note] [Entrypoint]: Giving user pdns access to schema pdns
database_1  |
database_1  | 2022-04-13 09:07:12+00:00 [Note] [Entrypoint]: Stopping temporary server
database_1  | 2022-04-13  9:07:12 0 [Note] mariadbd (initiated by: root[root] @ localhost []): Normal shutdown
database_1  | 2022-04-13  9:07:12 0 [Note] InnoDB: FTS optimize thread exiting.
database_1  | 2022-04-13  9:07:12 0 [Note] InnoDB: Starting shutdown...
database_1  | 2022-04-13  9:07:12 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
database_1  | 2022-04-13  9:07:12 0 [Note] InnoDB: Buffer pool(s) dump completed at 220413  9:07:12
database_1  | 2022-04-13  9:07:12 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
database_1  | 2022-04-13  9:07:12 0 [Note] InnoDB: Shutdown completed; log sequence number 42185; transaction id 15
database_1  | 2022-04-13  9:07:12 0 [Note] mariadbd: Shutdown complete
database_1  |
pdns_1      | ERROR 2002 (HY000): Can't connect to MySQL server on 'database' (115)
pdns_1      | MySQL is unavailable - sleeping
database_1  | 2022-04-13 09:07:13+00:00 [Note] [Entrypoint]: Temporary server stopped
database_1  |
database_1  | 2022-04-13 09:07:13+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.
database_1  |
database_1  | 2022-04-13  9:07:13 0 [Note] mariadbd (server 10.7.3-MariaDB-1:10.7.3+maria~focal) starting as process 1 ...
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: Number of transaction pools: 1
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
database_1  | 2022-04-13  9:07:13 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: Using Linux native AIO
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: Completed initialization of buffer pool
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: 128 rollback segments are active.
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: Creating shared tablespace for temporary tables
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: 10.7.3 started; log sequence number 42185; transaction id 14
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
database_1  | 2022-04-13  9:07:13 0 [Note] Plugin 'FEEDBACK' is disabled.
database_1  | 2022-04-13  9:07:13 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
database_1  | 2022-04-13  9:07:13 0 [Note] Server socket created on IP: '0.0.0.0'.
database_1  | 2022-04-13  9:07:13 0 [Note] Server socket created on IP: '::'.
database_1  | 2022-04-13  9:07:13 0 [Note] InnoDB: Buffer pool(s) load completed at 220413  9:07:13
database_1  | 2022-04-13  9:07:13 0 [Note] mariadbd: ready for connections.
database_1  | Version: '10.7.3-MariaDB-1:10.7.3+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
pdns_1      | Apr 13 09:07:16 Created local state directory '/var/run/pdns/'
pdns_1      | Apr 13 09:07:16 Listening on controlsocket in '/var/run/pdns/pdns.controlsocket'
pdns_1      | terminate called after throwing an instance of 'std::system_error'
pdns_1      |   what():  Operation not permitted
pdns_1      | Apr 13 09:07:16 Got a signal 6, attempting to print trace:
pdns_1      | Apr 13 09:07:16 /usr/sbin/pdns_server(+0x228a93) [0x555febf66a93]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(+0x42750) [0x7fcf606bf750]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(+0x8f88c) [0x7fcf6070c88c]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(raise+0x16) [0x7fcf606bf6a6]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(abort+0xd3) [0x7fcf606a97d3]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(+0xa1a06) [0x7fcf60a1fa06]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(+0xad0bc) [0x7fcf60a2b0bc]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(+0xad127) [0x7fcf60a2b127]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(+0xad3c9) [0x7fcf60a2b3c9]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(_ZSt20__throw_system_errori+0x88) [0x7fcf60a227d5]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(+0xd96ad) [0x7fcf60a576ad]
pdns_1      | Apr 13 09:07:16 /usr/sbin/pdns_server(_ZN11DynListener2goEv+0x64) [0x555febeded04]
pdns_1      | Apr 13 09:07:16 /usr/sbin/pdns_server(main+0xdb2) [0x555febe41ca2]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(+0x2d560) [0x7fcf606aa560]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(__libc_start_main+0x7c) [0x7fcf606aa60c]
pdns_1      | Apr 13 09:07:16 /usr/sbin/pdns_server(_start+0x25) [0x555febe48275]
pdns_1      | Apr 13 09:07:16 Got a signal 11, attempting to print trace:
pdns_1      | Apr 13 09:07:16 /usr/sbin/pdns_server(+0x228a93) [0x555febf66a93]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(+0x42750) [0x7fcf606bf750]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(abort+0x178) [0x7fcf606a9878]
pdns_1      | Apr 13 09:07:16 /usr/sbin/pdns_server(+0x228ef1) [0x555febf66ef1]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(+0x42750) [0x7fcf606bf750]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(+0x8f88c) [0x7fcf6070c88c]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(raise+0x16) [0x7fcf606bf6a6]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(abort+0xd3) [0x7fcf606a97d3]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(+0xa1a06) [0x7fcf60a1fa06]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(+0xad0bc) [0x7fcf60a2b0bc]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(+0xad127) [0x7fcf60a2b127]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(+0xad3c9) [0x7fcf60a2b3c9]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(_ZSt20__throw_system_errori+0x88) [0x7fcf60a227d5]
pdns_1      | Apr 13 09:07:16 /lib64/libstdc++.so.6(+0xd96ad) [0x7fcf60a576ad]
pdns_1      | Apr 13 09:07:16 /usr/sbin/pdns_server(_ZN11DynListener2goEv+0x64) [0x555febeded04]
pdns_1      | Apr 13 09:07:16 /usr/sbin/pdns_server(main+0xdb2) [0x555febe41ca2]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(+0x2d560) [0x7fcf606aa560]
pdns_1      | Apr 13 09:07:16 /lib64/libc.so.6(__libc_start_main+0x7c) [0x7fcf606aa60c]
pdns_1      | Apr 13 09:07:16 /usr/sbin/pdns_server(_start+0x25) [0x555febe48275]
powerdns_pdns_1 exited with code 127
@pschiffe
Copy link
Owner

Hi @flazzarini , I'm not able to reproduce your problem, seems to be related to your docker, maybe networking setup.

Try without this section to rule out networking issue:

    ports:
      - "50020:8081"

What is your system?

@flazzarini
Copy link
Author

Hi @pschiffe ,

nope unfortunately removing the ports section doesn't solve the issue.

Host System is Ubuntu 18.04 x64

@pschiffe
Copy link
Owner

Could you try the alpine version of the image? image: pschiffe/pdns-mysql:alpine It's using different base than the regular one, but 4.5 for now.

@dvadell
Copy link

dvadell commented Apr 19, 2022

I had the same problem. Looks like the alpine image works. Thanks!

@flazzarini
Copy link
Author

Works with alpine image as well for me. Thanks

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

No branches or pull requests

3 participants