These are chat archives for azukiapp/azk

23rd
Nov 2015
Vytenis
@FDiskas
Nov 23 2015 11:43
Hello, I'm trying your example http://docs.azk.io/en/starting-from-scratch/php-wordpress-phpmyadmin.html
But I don'w know how to connect to database. What is the host? I tryed localhost, mysql and 127.0.0.1
But got the message "Connect failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) System status:"
Gullit Miranda
@gullitmiranda
Nov 23 2015 11:59
hi @FDiskas
the host is dev.azk.io.
for the port, you can identify in the result of azk start mysql.
Vytenis
@FDiskas
Nov 23 2015 12:03
Connect failed: Unknown MySQL server host 'dev.azk.io' (2) System status:
mysql1 2015-11-23T11:07:50.313825585Z Version: '5.7.9' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)
Gullit Miranda
@gullitmiranda
Nov 23 2015 12:05
how are you doing to connect?
Vytenis
@FDiskas
Nov 23 2015 12:05
Then i try azk shell mysq and type mysql I got ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
?
Vytenis
@FDiskas
Nov 23 2015 12:49
2015-11-23T12:48:17.400026Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 2015-11-23T12:48:18.400182Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2015-11-23T12:49:56.413858Z 0 [Note] InnoDB: Unable to open the first data file
2015-11-23T12:49:56.413868Z 0 [ERROR] InnoDB: Operating system error number 11 in a file operation.
2015-11-23T12:49:56.413887Z 0 [ERROR] InnoDB: Error number 11 means 'Resource temporarily unavailable'
2015-11-23T12:49:56.413892Z 0 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
2015-11-23T12:49:56.413897Z 0 [ERROR] InnoDB: Cannot open datafile './ibdata1'
2015-11-23T12:49:56.413910Z 0 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2015-11-23T12:49:56.413916Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Cannot open a file
2015-11-23T12:49:57.014501Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2015-11-23T12:49:57.014523Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-11-23T12:49:57.014527Z 0 [ERROR] Failed to initialize plugins.
2015-11-23T12:49:57.014529Z 0 [ERROR] Aborting
My PC info
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:    Fedora
Description:    Fedora release 23 (Twenty Three)
Release:    23
Codename:    TwentyThree

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 60
Model name:            Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz
Stepping:              3
CPU MHz:               2919.820
CPU max MHz:           3200.0000
CPU min MHz:           800.0000
BogoMIPS:              5188.11
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
Gullit Miranda
@gullitmiranda
Nov 23 2015 12:55
ok
Vytenis
@FDiskas
Nov 23 2015 12:56
Before I was working with docker-compose and there was no problems with mysql
Gullit Miranda
@gullitmiranda
Nov 23 2015 12:57
try this:
$ azk stop
$ azk shell mysql -c “rm -rf /var/lib/mysql/*”
$ azk shell mysql
/azk-entrypoint.sh mysqld &
mysql -e “status
Vytenis
@FDiskas
Nov 23 2015 12:57
In azk I tryed to use 3 different mysql docker images . Errors the same
Gullit Miranda
@gullitmiranda
Nov 23 2015 12:59
with the docker-compose you were persisting your data to disk?
Vytenis
@FDiskas
Nov 23 2015 12:59
yes
mysql:
    container_name: mysql
    image: mysql
    ports:
        - 3306:3306
    volumes:
        - ${PWD}/db:/var/lib/mysql
        - ${PWD}/.docker/mysql:/etc/mysql/conf.d
    environment:
        MYSQL_ROOT_PASSWORD: root
        MYSQL_DATABASE: demotable
azk shell mysql /azk-entrypoint.sh mysqld & mysql -e "status"
[vytenis@191 Translate] $ azk shell mysql /azk-entrypoint.sh mysqld & mysql -e "status"
[1] 16137
bash: mysql: command not found...
Packages providing this file are:
'community-mysql'
'mariadb'
[vytenis@191 Translate] $ 2015-11-23T13:02:02.017231Z 0 [Note] mysqld (mysqld 5.7.9) starting as process 1 ...
2015-11-23T13:02:02.020233Z 0 [Note] InnoDB: PUNCH HOLE support available
2015-11-23T13:02:02.020256Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-11-23T13:02:02.020259Z 0 [Note] InnoDB: Uses event mutexes
2015-11-23T13:02:02.020262Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2015-11-23T13:02:02.020265Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-11-23T13:02:02.020269Z 0 [Note] InnoDB: Using Linux native AIO
2015-11-23T13:02:02.020751Z 0 [Note] InnoDB: Number of pools: 1
2015-11-23T13:02:02.021107Z 0 [Note] InnoDB: Using CPU crc32 instructions
2015-11-23T13:02:02.025863Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2015-11-23T13:02:02.032076Z 0 [Note] InnoDB: Completed initialization of buffer pool
2015-11-23T13:02:02.033560Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2015-11-23T13:02:02.045165Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2015-11-23T13:02:02.046199Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 11970235
2015-11-23T13:02:02.046239Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 11970244
2015-11-23T13:02:02.046545Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 11970244
2015-11-23T13:02:02.046562Z 0 [Note] InnoDB: Database was not shutdown normally!
2015-11-23T13:02:02.046574Z 0 [Note] InnoDB: Starting crash recovery.
2015-11-23T13:02:02.155698Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2015-11-23T13:02:02.155721Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2015-11-23T13:02:02.155987Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2015-11-23T13:02:02.188892Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2015-11-23T13:02:02.189646Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2015-11-23T13:02:02.189665Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2015-11-23T13:02:02.190135Z 0 [Note] InnoDB: 5.7.9 started; log sequence number 11970244
2015-11-23T13:02:02.190504Z 0 [Note] Plugin 'FEDERATED' is disabled.
2015-11-23T13:02:02.190784Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2015-11-23T13:02:02.194884Z 0 [Note] InnoDB: not started
2015-11-23T13:02:02.195222Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2015-11-23T13:02:02.195237Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2015-11-23T13:02:02.195790Z 0 [Note] IPv6 is available.
2015-11-23T13:02:02.195806Z 0 [Note]   - '::' resolves to '::';
2015-11-23T13:02:02.195816Z 0 [Note] Server socket created on IP: '::'.
2015-11-23T13:02:02.198153Z 0 [Note] InnoDB: Buffer pool(s) load completed at 151123 13:02:02
2015-11-23T13:02:02.210806Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2015-11-23T13:02:02.210825Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2015-11-23T13:02:02.212691Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2015-11-23T13:02:02.216618Z 0 [Note] Event Scheduler: Loaded 0 events
2015-11-23T13:02:02.216902Z 0 [Note] mysqld: ready for connections.
Version: '5.7.9'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:04
you need to put the commands in different lines in the terminal.
Vytenis
@FDiskas
Nov 23 2015 13:04
ok
Log is very big. Looks like looping
2015-11-23T13:05:03.798656Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2015-11-23T13:05:04.798775Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:06
he is saying that there is already another running process. you stopped earlier proceedings and then executed the three commands again?
Vytenis
@FDiskas
Nov 23 2015 13:06
Yes I did
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:07
another thing:
use: mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e “status” instead of mysql -e “status"
plz. run:
adocker ps
Vytenis
@FDiskas
Nov 23 2015 13:07
docker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS                                                  NAMES
2bbe6cef2753        azukiapp/mysql:5.7        "/azk-entrypoint.sh /"   4 minutes ago       Up 4 minutes        3306/tcp                                               dev.azk.io_type.shell_mid.2d791d9fa1_sys.mysql_seq.1_shell.script_uid.62f88a0091
130ee7e6492d        azukiapp/php-fpm:latest   "/bin/sh -c /run.sh"     About an hour ago   Up About an hour    172.17.0.1:32777->80/tcp, 172.17.0.1:32776->3306/tcp   dev.azk.io_type.daemon_mid.2d791d9fa1_sys.translate_seq.1_uid.6fa3709091
500c54255b4d        azukiapp/azktcl:0.0.2     "/bin/sh -c 'env; soc"   2 hours ago         Up 2 hours          53/udp, 172.17.0.1:80->80/tcp                          dev.azk.io_type.daemon_mid.ce833fc9c9_sys.balancer-redirect_seq.1_uid.6f451d9091
1ff7ca5c22c2        azukiapp/azktcl:0.0.2     "/bin/sh -c 'dnsmasq "   2 hours ago         Up 2 hours          172.17.0.1:53->53/udp, 80/tcp                          dev.azk.io_type.daemon_mid.ce833fc9c9_sys.dns_seq.1_uid.6ec84c7091
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:08
run:
adocker stop bbe6cef2753 30ee7e6492d && adocker rm bbe6cef2753 30ee7e6492d
Vytenis
@FDiskas
Nov 23 2015 13:09
waiting for first command to finish...
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:09
after:
$ azk shell mysql -c “rm -rf /var/lib/mysql/*”
$ azk shell mysql
/azk-entrypoint.sh mysqld &
mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e "status"
Vytenis
@FDiskas
Nov 23 2015 13:11
adocker stop bbe6cef2753 30ee7e6492d && adocker rm bbe6cef2753 30ee7e6492d
Error response from daemon: no such id: bbe6cef2753
Error response from daemon: no such id: 30ee7e6492d
Error: failed to stop containers: [bbe6cef2753 30ee7e6492d]
adocker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS                                                  NAMES
2bbe6cef2753        azukiapp/mysql:5.7        "/azk-entrypoint.sh /"   9 minutes ago       Up 9 minutes        3306/tcp                                               dev.azk.io_type.shell_mid.2d791d9fa1_sys.mysql_seq.1_shell.script_uid.62f88a0091
130ee7e6492d        azukiapp/php-fpm:latest   "/bin/sh -c /run.sh"     2 hours ago         Up 2 hours          172.17.0.1:32777->80/tcp, 172.17.0.1:32776->3306/tcp   dev.azk.io_type.daemon_mid.2d791d9fa1_sys.translate_seq.1_uid.6fa3709091
500c54255b4d        azukiapp/azktcl:0.0.2     "/bin/sh -c 'env; soc"   3 hours ago         Up 3 hours          172.17.0.1:80->80/tcp, 53/udp                          dev.azk.io_type.daemon_mid.ce833fc9c9_sys.balancer-redirect_seq.1_uid.6f451d9091
1ff7ca5c22c2        azukiapp/azktcl:0.0.2     "/bin/sh -c 'dnsmasq "   3 hours ago         Up 3 hours          172.17.0.1:53->53/udp, 80/tcp                          dev.azk.io_type.daemon_mid.ce833fc9c9_sys.dns_seq.1_uid.6ec84c7091
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:12
then run:
adocker rm -f 2bbe6cef2753 130ee7e6492d
Vytenis
@FDiskas
Nov 23 2015 13:13
$ azk shell mysql -c "rm -rf /var/lib/mysql/*"
$ azk shell mysql
root@0e1d938510c0:/# /azk-entrypoint.sh mysqld &
[1] 9
root@0e1d938510c0:/# mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e "status"Initializing database
2015-11-23T13:13:21.106545Z 0 [Warning] InnoDB: New log files created, LSN=45790
2015-11-23T13:13:21.159025Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-11-23T13:13:21.221567Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: f830bd04-91e3-11e5-88dc-0242ac110004.
2015-11-23T13:13:21.223401Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2015-11-23T13:13:21.223685Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2015-11-23T13:13:21.850615Z 1 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2015-11-23T13:13:21.850679Z 1 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2015-11-23T13:13:21.850697Z 1 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2015-11-23T13:13:21.850709Z 1 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2015-11-23T13:13:21.850744Z 1 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
Database initialized
MySQL init process in progress...
2015-11-23T13:13:23.827786Z 0 [Note] mysqld (mysqld 5.7.9) starting as process 43 ...
2015-11-23T13:13:23.830270Z 0 [Note] InnoDB: PUNCH HOLE support available
2015-11-23T13:13:23.830298Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-11-23T13:13:23.830307Z 0 [Note] InnoDB: Uses event mutexes
2015-11-23T13:13:23.830315Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2015-11-23T13:13:23.830323Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-11-23T13:13:23.830330Z 0 [Note] InnoDB: Using Linux native AIO
2015-11-23T13:13:23.830513Z 0 [Note] InnoDB: Number of pools: 1
2015-11-23T13:13:23.830600Z 0 [Note] InnoDB: Using CPU crc32 instructions
2015-11-23T13:13:23.835123Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2015-11-23T13:13:23.840348Z 0 [Note] InnoDB: Completed initialization of buffer pool
2015-11-23T13:13:23.841598Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2015-11-23T13:13:23.853040Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2015-11-23T13:13:23.862488Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2015-11-23T13:13:23.862585Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2015-11-23T13:13:23.899150Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2015-11-23T13:13:23.900404Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2015-11-23T13:13:23.900429Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2015-11-23T13:13:23.900765Z 0 [Note] InnoDB: Waiting for purge to start
2015-11-23T13:13:23.950918Z 0 [Note] InnoDB: 5.7.9 started; log sequence number 2471242
2015-11-23T13:13:23.951328Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2015-11-23T13:13:23.951351Z 0 [Note] InnoDB: not started
2015-11-23T13:13:23.951388Z 0 [Note] Plugin 'FEDERATED' is disabled.
2015-11-23T13:13:23.952687Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2015-11-23T13:13:23.952693Z 0 [Note] InnoDB: Buffer pool(s) load completed at 151123 13:13:23
2015-11-23T13:13:23.967933Z 0 [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2015-11-23T13:13:23.967966Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:14
try again:
 mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e “status”
because it must wait for the previous command is executed.
Vytenis
@FDiskas
Nov 23 2015 13:16
root@0e1d938510c0:/# mysql -uroot -p${MYSQL_ROOT_PASSWORD} -e "status"
mysql: [Warning] Using a password on the command line interface can be insecure.
--------------
mysql  Ver 14.14 Distrib 5.7.9, for Linux (x86_64) using  EditLine wrapper

Connection id:        2
Current database:    
Current user:        root@localhost
SSL:            Not in use
Current pager:        stdout
Using outfile:        ''
Using delimiter:    ;
Server version:        5.7.9 MySQL Community Server (GPL)
Protocol version:    10
Connection:        Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:        /var/run/mysqld/mysqld.sock
Uptime:            2 min 38 sec

Threads: 1  Questions: 5  Slow queries: 0  Opens: 105  Flush tables: 1  Open tables: 98  Queries per second avg: 0.031
--------------
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:16
its ok =D
Vytenis
@FDiskas
Nov 23 2015 13:17
I don;t get it :/
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:17
Now let's test externally.
Vytenis
@FDiskas
Nov 23 2015 13:17
$ docker ps
CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                           NAMES
500c54255b4d        azukiapp/azktcl:0.0.2   "/bin/sh -c 'env; soc"   3 hours ago         Up 3 hours          53/udp, 172.17.0.1:80->80/tcp   dev.azk.io_type.daemon_mid.ce833fc9c9_sys.balancer-redirect_seq.1_uid.6f451d9091
1ff7ca5c22c2        azukiapp/azktcl:0.0.2   "/bin/sh -c 'dnsmasq "   3 hours ago         Up 3 hours          172.17.0.1:53->53/udp, 80/tcp   dev.azk.io_type.daemon_mid.ce833fc9c9_sys.dns_seq.1_uid.6ec84c7091
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:18
It's correct. anyway we only access a shell.
Vytenis
@FDiskas
Nov 23 2015 13:18
ok
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:18

run:

azk start mysql

and send me the result

Vytenis
@FDiskas
Nov 23 2015 13:19
$ azk start mysql
azk: ↑ starting `mysql` system, 1 new instances...
azk: ✓ checking `azukiapp/mysql:5.7` image...
azk: ◴ waiting for `mysql` system to start, trying connection to port data/tcp...

┌───┬────────┬───────────┬──────────────┬─────────────────┬─────────────┐
│   │ System │ Instances │ Hostname/url │ Instances-Ports │ Provisioned │
├───┼────────┼───────────┼──────────────┼─────────────────┼─────────────┤
│ ↑ │ mysql  │ 1         │ dev.azk.io   │ 1-data:32778    │ -           │
└───┴────────┴───────────┴──────────────┴─────────────────┴─────────────┘
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:24
run:
$ azk shell mysql
mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -hdev.azk.io -P 32778 -B ${MYSQL_DATABASE} -e “status”
Vytenis
@FDiskas
Nov 23 2015 13:25
$ azk shell mysql
root@718ea96fd4db:/# mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -hdev.azk.io -P 32778 -B ${MYSQL_DATABASE} -e "status"
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2005 (HY000): Unknown MySQL server host 'dev.azk.io' (0)
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:25
run:
azk status
Vytenis
@FDiskas
Nov 23 2015 13:26
$ azk status
┌───┬────────────┬───────────┬───────────────────────┬────────────────────────────┬─────────────┐
│   │ System     │ Instances │ Hostname/url          │ Instances-Ports            │ Provisioned │
├───┼────────────┼───────────┼───────────────────────┼────────────────────────────┼─────────────┤
│ ↑ │ mysql      │ 1         │ dev.azk.io1-data:32782               │ -           │
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:27
you stop and restart the mysql? because the port is different from the status that sent me.
Vytenis
@FDiskas
Nov 23 2015 13:27
true
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:28
now, run:
$ azk shell mysql
mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -hdev.azk.io -P 32782 -B ${MYSQL_DATABASE} -e “status”
Vytenis
@FDiskas
Nov 23 2015 13:30
I tryed one more time
$ azk start mysql
azk: ↑ starting `mysql` system, 1 new instances...
azk: ✓ checking `azukiapp/mysql:5.7` image...
azk: ◴ waiting for `mysql` system to start, trying connection to port data/tcp...

┌───┬────────┬───────────┬──────────────┬─────────────────┬─────────────┐
│   │ System │ Instances │ Hostname/url │ Instances-Ports │ Provisioned │
├───┼────────┼───────────┼──────────────┼─────────────────┼─────────────┤
│ ↑ │ mysql  │ 1         │ dev.azk.io   │ 1-data:32786    │ -           │
└───┴────────┴───────────┴──────────────┴─────────────────┴─────────────┘
[vytenis@191 Translate] $ azk shell mysql
root@d5d6dd1b63b9:/# mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -hdev.azk.io -P 32786 -B ${MYSQL_DATABASE} -e "status"
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2005 (HY000): Unknown MySQL server host 'dev.azk.io' (0)
Network problems?
cat /etc/resolv.conf
# Generated by NetworkManager
search .local
nameserver 172.18.1.252
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:31
run:
ping dev.azk.io
Vytenis
@FDiskas
Nov 23 2015 13:32
from shell?
ping dev.azk.io
PING dev.azk.io (172.17.0.1) 56(84) bytes of data.
64 bytes from translate.dev.azk.io (172.17.0.1): icmp_seq=1 ttl=64 time=0.025 ms
64 bytes from translate.dev.azk.io (172.17.0.1): icmp_seq=2 ttl=64 time=0.042 ms
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:32
its ok.
you installed azk now?
Vytenis
@FDiskas
Nov 23 2015 13:33
two days ago
PC was restarted couple times
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:33
try:
azk doctor
Vytenis
@FDiskas
Nov 23 2015 13:34
$ azk doctor

      Version : 0.16.2
      Agent   : up
      Docker  : 1.9.1
      Use vm  : no
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:34
we will try to connect with the mysql without using the dns resolver.
Vytenis
@FDiskas
Nov 23 2015 13:35
azk shell mysql
root@4e8ca65e5533:/# ping dev.azk.io 
ping: unknown host
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:36
  1. start mysql (if you have not already started.)
  2. change de port in this script and run
    $ azk shell mysql
    mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -h172.17.0.1 -P <PORT> -B ${MYSQL_DATABASE} -e “status”
Vytenis
@FDiskas
Nov 23 2015 13:37
root@4e8ca65e5533:/# mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -h172.17.0.1 -P 32786 -B ${MYSQL_DATABASE} -e "status"
mysql: [Warning] Using a password on the command line interface can be insecure.
--------------
mysql  Ver 14.14 Distrib 5.7.9, for Linux (x86_64) using  EditLine wrapper

Connection id:        3
Current database:    Translate_dev
Current user:        translate@172.17.0.1
SSL:            Not in use
Current pager:        stdout
Using outfile:        ''
Using delimiter:    ;
Server version:        5.7.9 MySQL Community Server (GPL)
Protocol version:    10
Connection:        172.17.0.1 via TCP/IP
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
TCP port:        32786
Uptime:            7 min 41 sec

Threads: 1  Questions: 5  Slow queries: 0  Opens: 105  Flush tables: 1  Open tables: 98  Queries per second avg: 0.010
--------------
what? is there already existing tables?
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:38
good. then we know that the problem is dns-resolver
Vytenis
@FDiskas
Nov 23 2015 13:39
couple days ago I had some problems with DNS
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:39
these tables should be mysql.
Vytenis
@FDiskas
Nov 23 2015 13:39
all uknown hosts was resolved to my company domain
can I trye to rebild dns resolver?
or clear the cashe or what ever
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:41
try this:
$ azk agent stop
$ rm -rf /etc/resolver/dev.azk.io
$ azk agent start
Vytenis
@FDiskas
Nov 23 2015 13:42
$ sudo rm -rf /etc/resolver/dev.azk.io
$ azk agent start
azk: Please wait, this process may take several minutes
azk: Loading settings and checking dependencies.
azk: Checking version...
azk: azk 0.16.2 detected
azk: Adding 172.17.0.1 to /etc/resolver/dev.azk.io ...

+ /usr/bin/sudo mkdir -p /etc/resolver
+ echo '# azk agent configure'
+ /usr/bin/sudo tee /etc/resolver/dev.azk.io
# azk agent configure
+ echo 'nameserver 172.17.0.1:53'
+ /usr/bin/sudo tee -a /etc/resolver/dev.azk.io
nameserver 172.17.0.1:53
++ id -u
++ id -g
+ /usr/bin/sudo chown 1000:1000 /etc/resolver/dev.azk.io
+ set +x

azk: Cleaning 1 lost containers
azk: Settings loaded successfully.
azk: Agent is being started...
azk: Trying to connect to docker (unix:///var/run/docker.sock) (timeout: 20s)...
azk: Starting azk dns service...
azk: Dns service started.
azk: Trying to connect to docker (unix:///var/run/docker.sock) (timeout: 20s)...
azk: Starting azk balancer redirect service...
azk: Check if balancer redirect service is up (tcp://172.17.0.1:80) (timeout: 10000s)...
azk: Balancer redirect started.
azk: Starting memcached service...
azk: Memcached service started.
azk: Starting http balancer service...
azk: Http balancer service started.
azk: Agent has been successfully started.
repeat all steps about mysql?
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:43
yep
test with dev.azk.io
Vytenis
@FDiskas
Nov 23 2015 13:44
$ azk start mysql
azk: ↑ starting `mysql` system, 1 new instances...
azk: ✓ checking `azukiapp/mysql:5.7` image...
azk: ◴ waiting for `mysql` system to start, trying connection to port data/tcp...

┌───┬────────┬───────────┬──────────────┬─────────────────┬─────────────┐
│   │ System │ Instances │ Hostname/url │ Instances-Ports │ Provisioned │
├───┼────────┼───────────┼──────────────┼─────────────────┼─────────────┤
│ ↑ │ mysql  │ 1         │ dev.azk.io   │ 1-data:32787    │ -           │
└───┴────────┴───────────┴──────────────┴─────────────────┴─────────────┘
$ azk shell mysql
root@79bb31407022:/# mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -hdev.azk.io -P 32787 -B ${MYSQL_DATABASE} -e "status"
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2005 (HY000): Unknown MySQL server host 'dev.azk.io' (0)
restart pc?
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:45
try
Vytenis
@FDiskas
Nov 23 2015 13:47
done
trying again
azk: Agent has been successfully started.
azk: ↑ starting `mysql` system, 1 new instances...
azk: ✓ checking `azukiapp/mysql:5.7` image...
azk: ◴ waiting for `mysql` system to start, trying connection to port data/tcp...

┌────────┬───────┬──────────────┬─────────────────┐
│ SystemInst. │ Hostname/url │ Instances-Ports │
├────────┼───────┼──────────────┼─────────────────┤
│ mysql  │ 1     │ dev.azk.io   │ 1-data:32768    │
└────────┴───────┴──────────────┴─────────────────┘
$ azk shell mysql
root@b15ea02a6078:/# mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -hdev.azk.io -P 32768 -B ${MYSQL_DATABASE} -e "status"
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2005 (HY000): Unknown MySQL server host 'dev.azk.io' (0)
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:50
libnss-solving has to be some problem. In that case I will ask for @fearenales help him because he has better knowledge in this area.
Vytenis
@FDiskas
Nov 23 2015 13:51
I'm not good in English - could you please explain him whats happening here?
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:53
He will see the conversation history, so will already know we've tested.
I sent a msg to him. As soon as possible he comes here to help us.
Vytenis
@FDiskas
Nov 23 2015 13:53
Ok. I regulary will check this chat
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:53
and I am also not good at english :(
Vytenis
@FDiskas
Nov 23 2015 13:54
Or you can contact me via azukiapp/docker-mysql#2
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:55
good. but anyway, by default gitter will send a notification to your e-mail if you're marked.
Vytenis
@FDiskas
Nov 23 2015 13:57
thank you for your time
Gullit Miranda
@gullitmiranda
Nov 23 2015 13:59
you’re welcome =D
Felipe Arenales Santos
@fearenales
Nov 23 2015 15:24
hi @FDiskas ! Looks like you're facing issues using libnss-resolver. Can you confirm to me if ping dev.azk.io (azk agent running) is working from your machine?
Vytenis
@FDiskas
Nov 23 2015 15:26
azk: ↑ starting `mysql` system, 1 new instances...
azk: ✓ checking `azukiapp/mysql:5.7` image...
azk: ◴ waiting for `mysql` system to start, trying connection to port data/tcp...

┌───┬────────┬───────────┬──────────────┬─────────────────┬─────────────┐
│   │ System │ Instances │ Hostname/url │ Instances-Ports │ Provisioned │
├───┼────────┼───────────┼──────────────┼─────────────────┼─────────────┤
│ ↑ │ mysql  │ 1         │ dev.azk.io1-data:32769    │ -           │
└───┴────────┴───────────┴──────────────┴─────────────────┴─────────────┘
$ ping dev.azk.io
PING dev.azk.io (172.17.0.1) 56(84) bytes of data.
64 bytes from translate.dev.azk.io (172.17.0.1): icmp_seq=1 ttl=64 time=0.028 ms
Translate = my project Dir
Felipe Arenales Santos
@fearenales
Nov 23 2015 15:30
but if you run azk shell -- ping dev.azk.io, it fails, right?
Vytenis
@FDiskas
Nov 23 2015 15:32
$ azk shell mysql
root@cf2fdd25ee4e:/# ping dev.azk.io
ping: unknown host
$ azk shell -- ping dev.azk.io
ping: unknown host dev.azk.io
root@cf2fdd25ee4e:/# mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} -h172.17.0.1 -P 32769 -B ${MYSQL_DATABASE} -e "status"
mysql: [Warning] Using a password on the command line interface can be insecure.
--------------
mysql  Ver 14.14 Distrib 5.7.9, for Linux (x86_64) using  EditLine wrapper

Connection id:        3
Current database:    Translate_dev
Current user:        translate@172.17.0.1
SSL:            Not in use
Current pager:        stdout
Using outfile:        ''
Using delimiter:    ;
Server version:        5.7.9 MySQL Community Server (GPL)
Protocol version:    10
Connection:        172.17.0.1 via TCP/IP
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
TCP port:        32769
Uptime:            4 min 18 sec

Threads: 1  Questions: 5  Slow queries: 0  Opens: 105  Flush tables: 1  Open tables: 98  Queries per second avg: 0.019
--------------
Felipe Arenales Santos
@fearenales
Nov 23 2015 15:35
do you have any other DNS service being run in your machine (like dnsmasq)?
Vytenis
@FDiskas
Nov 23 2015 15:36
how to check?
I'm jus resently installed feadora and I don't know much about DNS
Felipe Arenales Santos
@fearenales
Nov 23 2015 15:37
just run ps -ef | grep dns
Vytenis
@FDiskas
Nov 23 2015 15:37
$ ps -ef | grep dns
nobody    1673     1  0 15:46 ?        00:00:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
root      1674  1673  0 15:46 ?        00:00:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
root      6972  1056  0 17:25 ?        00:00:00 /bin/sh -c dnsmasq -p $DNS_PORT --no-daemon --address=/dev.azk.io/172.17.0.1
root      6980  6972  0 17:25 ?        00:00:00 dnsmasq -p 53 --no-daemon --address=/dev.azk.io/172.17.0.1
vytenis   8172  4033  0 17:37 pts/0    00:00:00 grep --color=auto dns
Felipe Arenales Santos
@fearenales
Nov 23 2015 15:39
azk agent stop; ps -ef | grep dns
Vytenis
@FDiskas
Nov 23 2015 15:40
$ azk agent stop; ps -ef | grep dns
azk: Agent is running...
azk: Agent is being stopped...
azk: Agent has been successfully stopped.
nobody    1673     1  0 15:46 ?        00:00:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
root      1674  1673  0 15:46 ?        00:00:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
vytenis   8453  4033  0 17:40 pts/0    00:00:00 grep --color=auto dns
Felipe Arenales Santos
@fearenales
Nov 23 2015 15:41
this extra dnsmasq service can be conflicting with azk's
one moment, please
try running this:
systemctl stop dnsmasq.service
Vytenis
@FDiskas
Nov 23 2015 16:08
$ azk shell -- ping dev.azk.io
? The agent is not running, would you like to start it? Yes
azk: Please wait, this process may take several minutes
azk: Loading settings and checking dependencies.
azk: Checking version...
azk: azk 0.16.2 detected
azk: Cleaning 1 lost containers
azk: Settings loaded successfully.
azk: Agent is being started...
azk: Trying to connect to docker (unix:///var/run/docker.sock) (timeout: 20s)...
azk: Starting azk dns service...
azk: Dns service started.
azk: Trying to connect to docker (unix:///var/run/docker.sock) (timeout: 20s)...
azk: Starting azk balancer redirect service...
azk: Check if balancer redirect service is up (tcp://172.17.0.1:80) (timeout: 10000s)...
azk: Balancer redirect started.
azk: Starting memcached service...
azk: Memcached service started.
azk: Starting http balancer service...
azk: Http balancer service started.
azk: Agent has been successfully started.
ping: unknown host dev.azk.io
Felipe Arenales Santos
@fearenales
Nov 23 2015 16:10
@FDiskas I'll try to reproduce this issue on my side an I'll ping you back ASAP, ok?
Vytenis
@FDiskas
Nov 23 2015 16:10
thanks
Felipe Arenales Santos
@fearenales
Nov 23 2015 16:10
you're welcome!
Felipe Arenales Santos
@fearenales
Nov 23 2015 16:16
btw, how did you installed azk?
Vytenis
@FDiskas
Nov 23 2015 16:17
I installed with command
wget -qO- http://azk.io/install.sh | bash
Felipe Arenales Santos
@fearenales
Nov 23 2015 16:19
good! thanks!
Vytenis
@FDiskas
Nov 23 2015 16:22
Ubuntu 15.04 unsupported?
Felipe Arenales Santos
@fearenales
Nov 23 2015 16:23
correct. are you using it?
Vytenis
@FDiskas
Nov 23 2015 16:23
no, just asking
Felipe Arenales Santos
@fearenales
Nov 23 2015 16:23
we currently support ubuntu 12.04, 14.04 and 15.10
Felipe Arenales Santos
@fearenales
Nov 23 2015 16:58
@FDiskas may you run
azk shell mysql -- cat /etc/resolv.conf
Vytenis
@FDiskas
Nov 23 2015 17:00
azk: Agent has been successfully started.
search .local v14.nfq.lt
nameserver 172.17.0.1
nameserver 172.18.1.252
Vytenis
@FDiskas
Nov 23 2015 17:08
strange is search .local v14.nfq.lt
prefare search .local
Felipe Arenales Santos
@fearenales
Nov 23 2015 17:09
hmm one moment, please
Felipe Arenales Santos
@fearenales
Nov 23 2015 17:27

@FDiskas please run:
azk shell --image=azukiapp/dig -- dig dev.azk.io

and

azk shell --image=azukiapp/dig -- dig dev.azk.io @172.17.0.1

Vytenis
@FDiskas
Nov 23 2015 17:29
$ azk shell --image=azukiapp/dig -- dig dev.azk.io
azk: ⇲ pulling 3/3 layers.
     [================================                 ] 67% 2/3 
azk: ✓ completed download of `azukiapp/dig:latest`


; <<>> DiG 9.10.2 <<>> dev.azk.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 9186
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;dev.azk.io.            IN    A

;; AUTHORITY SECTION:
azk.io.            300    IN    SOA    ns-584.awsdns-09.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400

;; Query time: 64 msec
;; SERVER: 172.18.1.252#53(172.18.1.252)
;; WHEN: Mon Nov 23 17:29:29 UTC 2015
;; MSG SIZE  rcvd: 123
$ azk shell --image=azukiapp/dig -- dig dev.azk.io @172.17.0.1

; <<>> DiG 9.10.2 <<>> dev.azk.io @172.17.0.1
;; global options: +cmd
;; connection timed out; no servers could be reached
Felipe Arenales Santos
@fearenales
Nov 23 2015 17:34
that's odd... try running azk shell mysql -- ping 172.17.0.1
never mind, you already have done that...
Felipe Arenales Santos
@fearenales
Nov 23 2015 17:41
@FDiskas please, run: docker inspect 1ff7ca5c22c2 | grep -i port
Vytenis
@FDiskas
Nov 23 2015 17:42
docker ps
CONTAINER ID        IMAGE                   COMMAND                  CREATED              STATUS              PORTS                                                                                                         NAMES
a6258441feac        azukiapp/mysql:5.7      "/azk-entrypoint.sh /"   About a minute ago   Up About a minute   3306/tcp                                                                                                      dev.azk.io_type.shell_mid.2d791d9fa1_sys.mysql_seq.2_shell.script_uid.33e69aa092
c7df5621abdc        azukiapp/mysql:5.7      "/azk-entrypoint.sh /"   27 minutes ago       Up 27 minutes       3306/tcp                                                                                                      dev.azk.io_type.shell_mid.2d791d9fa1_sys.mysql_seq.1_shell.script_uid.8acadab092
3cc5be3a3f84        azukiapp/azktcl:0.0.2   "/bin/sh -c 'env; soc"   41 minutes ago       Up 41 minutes       53/udp, 172.17.0.1:80->80/tcp                                                                                 dev.azk.io_type.daemon_mid.ce833fc9c9_sys.balancer-redirect_seq.1_uid.969013d092
1db7573c6c6a        azukiapp/azktcl:0.0.2   "/bin/sh -c 'dnsmasq "   41 minutes ago       Up 41 minutes       172.17.0.1:53->53/udp, 80/tcp                                                                                 dev.azk.io_type.daemon_mid.ce833fc9c9_sys.dns_seq.1_uid.9620892092
docker inspect --format '{{ .NetworkSettings.Ports }}' $(docker ps -q)
map[3306/tcp:[]]
map[3306/tcp:[]]
map[53/udp:[] 80/tcp:[{172.17.0.1 80}]]
map[80/tcp:[] 53/udp:[{172.17.0.1 53}]]
Vytenis
@FDiskas
Nov 23 2015 17:47
what about firewall?
Felipe Arenales Santos
@fearenales
Nov 23 2015 17:48
do you have any enabled?
Vytenis
@FDiskas
Nov 23 2015 17:48
i did nothing about firewall - but fedora may have by default
Felipe Arenales Santos
@fearenales
Nov 23 2015 17:48
ps -ef | grep -i ufw
Vytenis
@FDiskas
Nov 23 2015 17:49
$ ps -ef | grep -i ufw
vytenis  22055  4033  0 19:48 pts/0    00:00:00 grep --color=auto -i ufw
I believe that there is something wrong with my local DNS setings
after 5mins I will be offline
Felipe Arenales Santos
@fearenales
Nov 23 2015 17:53
that' really odd, @FDiskas. We're working on trying to find out what can be causing that.
when will you be available again?
Vytenis
@FDiskas
Nov 23 2015 17:54
tomorow at 10am GTM+2
Felipe Arenales Santos
@fearenales
Nov 23 2015 17:56
great!
Vytenis
@FDiskas
Nov 23 2015 17:57
ok see you tomorow. I am very appreciate for your help in finding these errors. Thanks
Felipe Arenales Santos
@fearenales
Nov 23 2015 17:58
thank you for your patience and support! see you!
Felipe Arenales Santos
@fearenales
Nov 23 2015 18:11

@FDiskas I think I got a solution: try running

sudo systemctl stop firewalld

and then

azk shell --image=azukiapp/dig -- dig dev.azk.io