These are chat archives for azukiapp/azk

25th
Mar 2016
Dr Kim Foale
@kimadactyl
Mar 25 2016 11:57
heya all, trying to set my existing rails app to work with azk, does anyone have a good tutorial? most of the stuff im reading presumes youre starting from scratch :) seems like an amazing tool :D
Dr Kim Foale
@kimadactyl
Mar 25 2016 12:17
Specifically im wondering how to configure and copy over my existing database
The azkfile directs me to here but not sure how to use this file :) https://gist.github.com/gullitmiranda/62082f2e47c364ef9617
Dr Kim Foale
@kimadactyl
Mar 25 2016 13:13
My azk init script has given me command: ["bundle", "exec", "rackup", "config.ru", "--pid", "/tmp/ruby.pid", "--port", "$HTTP_PORT", "--host", "0.0.0.0"] is that correct? I'm 95% sure this is a database problem but just checking everything
Seems a very odd method: if im running it locally, and presuming "command" is what i want i just use bundle exec rails server but that doesn't seem to work here?
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:03
hi @kimadactyl
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:03
hey there :)
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:05
have you seen the https://blog.azukiapp.com/? has some articles that may interest you
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:05
im basically following the tutorial from digital ocean and trying to understand everything that's going on
currently it works if i run bundle exec rackup config.ru --pid /tmp/ruby.pid --port 3000 --host 0.0.0.0 from inside the azk shell, but azk start isnt working, 500 error
feels really close
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:07
about command: to rails app, use can use ["rails", "s", "--port $HTTP_PORT", "--binding 0.0.0.0"]
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:08
what's the reason for having it all seperated in quotes?
and where is $HTTP_PORT declared?
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:09
the array allows you to pass the commands separately to the tty.
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:10
why do i want to do that? isn't it a one liner?
ok, with command: ["rails", "s", "--port $HTTP_PORT", "--binding 0.0.0.0"],, i get this: http://pastebin.com/nwMYJqk5
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:11
the $HTTP_PORT is generated from:
ports: {
  http: '3000/tcp'
}
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:11
ok, that's neat :)
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:12
images with entrypoint may need this.
ow. try ["bundle", "exec", "rails", ...]
because the PATH does not include the binary in the bundle
you can see with: azk shell [system_name] -- echo \$PATH
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:14
ok
just take out the port? seems needed
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:15
one moment
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:16
thanks for the help, no hurry :)
oh if i just do it with bundle, exec, rails, s it loads but cant seem to access it hmmm
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:20
I am installing the rails in a container to catch the correct options. some time ago, that does not program in rails, so I do not remember.
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:21
no worries :)
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:22
but for that you can better understand. the two required options are:
port: $HTTP_PORT (defined in Azkfile or auto)
binding: 0.0.0.0 to allow the application to be accessed outside of the container (apart from `127.0.0.1, tha is default)
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:24
hum. if i start it without those settings it greens up and looks like it's loaded but won't let me access it
but if i add the settings it crashes on the line
same with this one azk: Run system `taichi-school` return: (1), for command: ["bundle","exec","rackup","config.ru","--pid","/tmp/ruby.pid","--port","$HTTP_PORT","--host","0.0.0.0"]:
manually setting the port to 3000 greens up to but won't load
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:33
this command wont work for new applications. May be that is missing something in the config.ru.
what is the command that you usually use without the azk?
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:34
just rails server
i don't really think about it ^^
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:35
I understand. when I was working with everything on my machine it didn't think of it =D
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:36
yeah :D all this puma/rack/unicorn stuff just goes over my head
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:36
I created an application with rails, I'm going to pick up the correct command.
rsrs
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:36
im really not sure $HTTP_PORT is working properly. hmmm.
shall i chuck everything in a gist?
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:39
      command: ["bundle", "exec", "rails", "server", "--pid", "/tmp/rails.pid", "--port=$HTTP_PORT", "--binding=0.0.0.0"]
      // or
      // command: "bundle exec rails server --pid /tmp/rails.pid --port=$HTTP_PORT --binding=0.0.0.0".split(" ")
the HTTP_PORT is for you to set on which port the rails server will be available
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:40
do i set it manually?
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:41
you can use:
ports: {
  http: '3000/tcp'
  // http: '5000/tcp'
  // http: '8080/tcp'
  // http: '80/tcp'
  // ....
}
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:41
yup i have it set like that, hmm
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:41
in Azkfile
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:42
check my azk file, i think i have it right but no luck unless i specify a port in the string, and then it doesnt work (altho that could be something else)
what's the port number for in the "instances-ports" column in the azk status table?
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:44
you override the database.yml for the gist (https://gist.github.com/gullitmiranda/62082f2e47c364ef9617)?
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:45
oh that completely replaces my database.yml?
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:45
as you are not using the env in the name of the DB, you will need to edit this line
yes
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:46
ahhhhh
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:47
about the command: a user is preparing the PR (with tests) to correct the rails suggestion.
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:47
hmm. completely replaced the file and same problem
just "site can't be reached"
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:49
about database.yml: I need to finish a feature that will facilitate overwritten. (https://github.com/gullitmiranda/azk/tree/feature/mounts_from)
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:49
cool :)
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:49

run:

azk logs -f

and try access

Dr Kim Foale
@kimadactyl
Mar 25 2016 14:50
looks like its working
how do you do codeblocks btw?
taichi-school1 2016-03-25T14:48:21.140053849Z * Listening on tcp://0.0.0.0:300looks good tho
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:52
when you have visited the app did not appear more things in the log?
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:52
no im just getting site cannot be reached, should just be https://taichi-school.dev.azk.io/ right?
(no extra port etc)
hmm, my ubuntu networking thing is showing 4 different connections that im assuming are azk, could that be causing a prroblem?
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:54
can be. let's identify the problem.
run:
azk status
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:55
all looks fine
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:56
send to me
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:56
ok, now run:
curl dev.azk.io:32873
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:56
nothing
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:57
try:
dig dev.azk.io
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:57
wait do you mean 71?
kim@chips:~/git/taichi/taichi_rails$ dig dev.azk.io

; <<>> DiG 9.9.5-11ubuntu1.3-Ubuntu <<>> dev.azk.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 43936
;; 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.            900    IN    SOA    ns-584.awsdns-09.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400

;; Query time: 34 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Fri Mar 25 14:57:34 GMT 2016
;; MSG SIZE  rcvd: 123
kim@chips:~/git/taichi/taichi_rails$ curl dev.azk.io:32873
kim@chips:~/git/taichi/taichi_rails$ curl dev.azk.io:32871
curl: (52) Empty reply from server
Gullit Miranda
@gullitmiranda
Mar 25 2016 14:58
the problem is in dns-resolver
pls, run:
cat /etc/resolv.conf
Dr Kim Foale
@kimadactyl
Mar 25 2016 14:59
kim@chips:~/git/taichi/taichi_rails$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:00
you are using dynamic DNS of your router
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:01
hmm, i never set that, does ubuntu do it when it installs or something?
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:01
try change DNS in networking configuration:
8.8.8.8
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:01
what do you mean? change it to nameserver: 8.8.8.8 in that file?
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:02
it is better to change in settings network. since this file is automatically generated
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:04
hmmm ubuntu gives me an otion for "additional dns servers" should that do it?hmmm
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:05
you can set: 8.8.8.8, 8.8.4.4
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:05
ok
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:06
thanks :) the yak shaving is getting real :D
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:07
:D
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:08
hmm dev.azk.io is giving me no app configured
maybe i need a computer restart?
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:08
after change, we recommended restart azk agent
azk agent stop
azk agent start
don't need restart computer
(usually)
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:09
oooh. getting http://taichi-school.dev.azk.io = no application configured
had to switch to firefdox, chrome is doing its caching dns forever thing heh
progress!
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:11
working?
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:12
damn no :( hadn't done azk start and when i do it breaks again
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:14
azk start not working?
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:14
azk start works
no connection again
; <<>> DiG 9.9.5-11ubuntu1.3-Ubuntu <<>> dev.azk.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 23308
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

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

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

;; Query time: 79 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Fri Mar 25 15:13:49 GMT 2016
;; MSG SIZE  rcvd: 123
is that right now? looks kinda the samme to me
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:16
he continues by using your router
run:
cat /etc/resolv.conf
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:16
yeah its not changed
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:17
:(
you can take screenshot of network configuration?
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:18
could change the dns servers on the router?
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:19
if you have access to the settings of the router, it is possible to.
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:20
Wired is the network that you are connected to your router?
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:20
yep
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:21
strange not to have changed then.
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:21
changed the router dns too, hmm. i also have a "docker" conenction now it seems
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:21
try run:
sudo service network-manager restart
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:22
k
kim@chips:~/git/taichi/taichi_rails$ dig dev.azk.io

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

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

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

;; Query time: 27 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Fri Mar 25 15:22:47 GMT 2016
;; MSG SIZE  rcvd: 123
not sure which line youre looking at hmm
other things: i have the config file manually set to port 3000 still, will that mess with anything?
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:25
at the time the problem is related to dns-resolve not the application.
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:25
alrighty. how weird.
worth trying a restart?
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:25
run:
cat /etc/resolv.conf
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:25
still the same
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:27
try to restart then. but if you are changing the correct network, it does not make sense it does not change the resolv.conf
now getting
;; Query time: 33 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
thats the bit you want to change right?
and its updated, cool
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:28
ow. cool
can you show the full output of dig?
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:29
kim@chips:~/git/taichi/taichi_rails$ dig dev.azk.io

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

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

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

;; Query time: 42 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Mar 25 15:29:19 GMT 2016
;; MSG SIZE  rcvd: 123
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:30
still no result for the dev.azk.io
you have disabled the dnsmasq?
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:31
yes
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:32
we'll need to look at other things then.
getting this too not sure if thats a problem
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:32
bu, master, here is a holiday and I need to have lunch with the family of my girlfriend. but as soon as possible I'll be back.
its ok?
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:32
of coruse, thanks so much for your help :)
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:33
nothing :wink:
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:33
anything i can try in the meantime?
Gullit Miranda
@gullitmiranda
Mar 25 2016 15:34
we need to identify if it has some thing in front of the dns-resolve
but for this I need to search some things
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:35
alrighty thanks :sparkles: have a nice lunch!
Dr Kim Foale
@kimadactyl
Mar 25 2016 15:41
after a computer restart im getting
azk: ↓ stopping `taichi-school` system, 1 instances...
azk: ↓ stopping `postgres` system, 1 instances...
azk: Run system `taichi-school` return: (0), for command: ["bundle","exec","rails","server","--pid","/tmp/rails.pid","--port=3000","--binding=0.0.0.0"]:
azk: [timeout] `azk` has timed out on `taichi-school` system.
azk: [timeout] Failure to reach port `32769` from `http://taichi-school.dev.azk.io` after 20000 milliseconds.
azk: [timeout] Make sure the start command binds `port` to the `0.0.0.0` interface, not only to the `localhost` interface.
azk: [timeout] You might want to edit your `Azkfile.js` in order to increase the maximum timeout.
going out for a bit catch you later :)
Dr Kim Foale
@kimadactyl
Mar 25 2016 16:02
hmm. poking a bit more. seems like the resolver file is pointing to some kind of docker network interface (?) not sure if that's intended or not
kim@chips:/etc/resolver$ cat /etc/resolver/de
default.dev  dev.azk.io   
kim@chips:/etc/resolver$ cat /etc/resolver/default.dev 
# Set nameservers to *.default.dev
# nameserver 127.0.0.1
# nameserver 192.168.50.1:5353
kim@chips:/etc/resolver$ cat /etc/resolver/dev.azk.io 
# azk agent configure
nameserver 172.17.0.1:53
kim@chips:/etc/resolver$ ifconfig docker0
docker0   Link encap:Ethernet  HWaddr 02:42:eb:5a:dd:eb  
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:ebff:fe5a:ddeb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:411 errors:0 dropped:0 overruns:0 frame:0
          TX packets:403 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:109818 (109.8 KB)  TX bytes:119521 (119.5 KB)
Gullit Miranda
@gullitmiranda
Mar 25 2016 16:47
I'm back
it's correct
the /etc/resolver/dev.azk.io points towards the interface of the docker
ow, this is only for the Mac :(
please, run:
ps aux | grep dns
Dr Kim Foale
@kimadactyl
Mar 25 2016 16:55
welcome back :)
kim@chips:~/git/taichi/taichi_rails$ ps aux | grep dns
root      4198  0.0  0.0   2440   412 ?        Ss   16:15   0:00 /bin/sh -c dnsmasq -p $DNS_PORT --no-daemon --address=/dev.azk.io/172.17.0.1
root      4212  0.0  0.0   1724  1356 ?        S    16:15   0:00 dnsmasq -p 53 --no-daemon --address=/dev.azk.io/172.17.0.1
kim       5145  0.0  0.0  13700  2188 pts/11   S+   16:55   0:00 grep --color=auto dns
yeah that link is where i got the tip off about those files from
Gullit Miranda
@gullitmiranda
Mar 25 2016 16:57
seems to be ok.
Dr Kim Foale
@kimadactyl
Mar 25 2016 16:58
Gullit Miranda
@gullitmiranda
Mar 25 2016 16:59
try this then:
azk agent stop
sudo rm -rf /etc/resolver/dev.azk.io
azk agent start
dig dev.azk.io
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:00
kim@chips:~/git/taichi/taichi_rails$ dig dev.azk.io

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

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

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

;; Query time: 86 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Mar 25 17:00:12 GMT 2016
;; MSG SIZE  rcvd: 123
:(
Gullit Miranda
@gullitmiranda
Mar 25 2016 17:05
:(
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:05
what should i tlook like?
Gullit Miranda
@gullitmiranda
Mar 25 2016 17:05
let's see how is the /etc/nsswitch.conf
cat /etc/nsswitch.conf
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:06
kim@chips:~/git/taichi/taichi_rails$ cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files resolver mdns4_minimal [NOTFOUND=return] dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
Gullit Miranda
@gullitmiranda
Mar 25 2016 17:06
I should
;; ANSWER SECTION:
dev.azk.io.        0    IN    A    192.168.51.4
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:07
alrighty
and do you have a docker network interface too?
Gullit Miranda
@gullitmiranda
Mar 25 2016 17:07
remembering that the IP is the docker, in your case
Everton Ribeiro
@nuxlli
Mar 25 2016 17:08
try:
dig dev.azk.io @172.17.0.1
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:08
should i add the google nameservers on the docker networek interface too?
Gullit Miranda
@gullitmiranda
Mar 25 2016 17:08
in my case, is pointing to the VM
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:08
kim@chips:~/git/taichi/taichi_rails$ dig dev.azk.io @172.17.0.1

; <<>> DiG 9.9.5-11ubuntu1.3-Ubuntu <<>> dev.azk.io @172.17.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52393
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;dev.azk.io.            IN    A

;; ANSWER SECTION:
dev.azk.io.        0    IN    A    172.17.0.1

;; Query time: 0 msec
;; SERVER: 172.17.0.1#53(172.17.0.1)
;; WHEN: Fri Mar 25 17:08:19 GMT 2016
;; MSG SIZE  rcvd: 44
Everton Ribeiro
@nuxlli
Mar 25 2016 17:09
the problem is in the dns container: /
Gullit Miranda
@gullitmiranda
Mar 25 2016 17:09
what can we do to resolve @nuxlli?
Everton Ribeiro
@nuxlli
Mar 25 2016 17:10
ps aux | grep dns
docker ps | grep dns
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:10
kim@chips:~/git/taichi/taichi_rails$ ps aux | grep dns
root      5659  0.0  0.0   2440   420 ?        Ss   16:59   0:00 /bin/sh -c dnsmasq -p $DNS_PORT --no-daemon --address=/dev.azk.io/172.17.0.1
root      5672  0.0  0.0   1724  1392 ?        S    16:59   0:00 dnsmasq -p 53 --no-daemon --address=/dev.azk.io/172.17.0.1
kim       6020  0.0  0.0  13696  2144 pts/11   S+   17:10   0:00 grep --color=auto dns
kim@chips:~/git/taichi/taichi_rails$ docker ps | grep dns
1893a2304925        azukiapp/azktcl:0.0.2   "/bin/sh -c 'dnsmasq "   10 minutes ago      Up 10 minutes       172.17.0.1:53->53/udp, 80/tcp   dev.azk.io_type.daemon_mid.ce833fc9c9_sys.dns_seq.1_uid.021729b0f2
Everton Ribeiro
@nuxlli
Mar 25 2016 17:11
wait a minute..
sorry, I messed up, dig managed to solve the problem is not in the container
;; ANSWER SECTION:
dev.azk.io.        0    IN    A    172.17.0.1
is correct
we will try to force the nameserver in /etc/resolv.conf
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:14
currently its looking like this fyi
kim@chips:~/git/taichi/taichi_rails$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 8.8.4.4
Everton Ribeiro
@nuxlli
Mar 25 2016 17:14
echo "nameserver 172.17.0.1" >> /etc/resolv.conf
dig dev.azk.io
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:15
getting permissions denied when i sudo it, just have that one nameserver or add it to the end?
Everton Ribeiro
@nuxlli
Mar 25 2016 17:16
echo "nameserver 172.17.0.1" | sudo tee -a /etc/resolv.conf
let's try both
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:16
kim@chips:~/git/taichi/taichi_rails$ dig dev.azk.io

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

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

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

;; Query time: 75 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Mar 25 17:16:47 GMT 2016
;; MSG SIZE  rcvd: 123
thats the failed one right?
Everton Ribeiro
@nuxlli
Mar 25 2016 17:18
at first my theory is: we are in Brazil and here the dns server 8.8.8.8 and 8.8.4.4 are slow to resolve, so the location dnsmasq responds correctly to dev.azk.io, but you should be in a region where they resolve more quickly than dev.azk.io does not exist :/
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:19
if i replcae the file with that dns server completely i get the right respnse but still nothing from the browser
im in the uk :)
Everton Ribeiro
@nuxlli
Mar 25 2016 17:20
which browser you are using?
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:23
hah dns just stopped working oops
chrome and firefox both
Everton Ribeiro
@nuxlli
Mar 25 2016 17:24
:/
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:24
oh a new error appears
azk: System `taichi-school` not running
azk: ↓ stopping `postgres` system, 1 instances...
azk: Run system `taichi-school` return: (1), for command: ["bundle","exec","rails","server","--pid","/tmp/rails.pid","--port=3000","--binding=0.0.0.0"]:
azk:  .taichi-school [log] >  => Booting Puma
azk:  .taichi-school [log] >  => Rails 4.2.6 application starting in production on http://0.0.0.0:3000
azk:  .taichi-school [log] >  => Run `rails server -h` for more startup options
azk:  .taichi-school [log] >  => Ctrl-C to shutdown server
azk:  .taichi-school [log] >  Exiting
azk:  .taichi-school [log] >  /azk/bundler/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize': could not translate host name "dev.azk.io" to address: Name or service not known (PG::ConnectionBad)
probably the same problem
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:25
hmm in in wily not sure if it matters
i already commented out the dnsmasq line
gotta run to the shop back in 15
really appreciat this!
Gullit Miranda
@gullitmiranda
Mar 25 2016 17:38
@kimadactyl it seems that the problem is more complicated, we will investigate more and give you a return.
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:55
wow thanks :) seems there must be Another Way
you think its an ubuntu problem a 15.10 problem, something else? its a pretty clean install
Gullit Miranda
@gullitmiranda
Mar 25 2016 17:59
The @nuxlli was able to reproduce the error. let's look for a solution to this problem.
Dr Kim Foale
@kimadactyl
Mar 25 2016 17:59
oh, amazing :D
well not amazing but you know. makes me feel less stupid :)
Gullit Miranda
@gullitmiranda
Mar 25 2016 18:01
:joy: I know =D
if the azk has not worked "amazing" needs improvement, it's not your fault
Dr Kim Foale
@kimadactyl
Mar 25 2016 18:01
:D hahhhh
Everton Ribeiro
@nuxlli
Mar 25 2016 18:12
@kimadactyl let me know when you can test something, ok?
Everton Ribeiro
@nuxlli
Mar 25 2016 18:18
To test if this will work properly we will return to the normal state of the problem:
# rollback
echo "# Generated by NetworkManager" | sudo tee /etc/resolv.conf
echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf
echo "nameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf

# restart azk agent
azk agent stop
sudo rm -rf /etc/resolver/dev.azk.io
azk agent start

# check results
dig dev.azk.io
dig dev.azk.io @172.17.0.1
Dr Kim Foale
@kimadactyl
Mar 25 2016 18:21
ook gimmie about 30 and ill try :)
Everton Ribeiro
@nuxlli
Mar 25 2016 18:37
# Now try this
getent hosts dev.azk.io

# Fix! It will change
# this: hosts:          files resolver mdns4_minimal [NOTFOUND=return] dns
# for : hosts:          files resolver [UNAVAIL=return] mdns4_minimal [NOTFOUND=return] dns
sed -i -re "s/(hosts:.*\s{1,}resolver)(\s{1,}\[[^]|.]*\]){0,1}($|\s\w)(.*)/\1 [UNAVAIL=return]\3\4/; s/\s*$//;" /etc/nsswitch.conf

# Test
getent hosts dev.azk.io
Dr Kim Foale
@kimadactyl
Mar 25 2016 18:51
kim@chips:~/git/taichi/taichi_rails$ dig dev.azk.io

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

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

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

;; Query time: 381 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Mar 25 18:50:46 GMT 2016
;; MSG SIZE  rcvd: 123

kim@chips:~/git/taichi/taichi_rails$ dig dev.azk.io @172.18.0.1

; <<>> DiG 9.9.5-11ubuntu1.3-Ubuntu <<>> dev.azk.io @172.18.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17972
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;dev.azk.io.            IN    A

;; ANSWER SECTION:
dev.azk.io.        0    IN    A    172.18.0.1

;; Query time: 0 msec
;; SERVER: 172.18.0.1#53(172.18.0.1)
;; WHEN: Fri Mar 25 18:50:53 GMT 2016
;; MSG SIZE  rcvd: 44

kim@chips:~/git/taichi/taichi_rails$ getent hosts dev.azk.io
172.18.0.1      dev.azk.io
This message was deleted
This message was deleted
This message was deleted
kim@chips:~/git/taichi/taichi_rails$ getent hosts dev.azk.io
172.18.0.1      dev.azk.io
kim@chips:~/git/taichi/taichi_rails$ sed -i -re "s/(hosts:.*\s{1,}resolver)(\s{1,}\[[^]|.]*\]){0,1}($|\s\w)(.*)/\1 [UNAVAIL=return]\3\4/; s/\s*$//;" /etc/nsswitch.conf
sed: couldn't open temporary file /etc/sedr8H9x3: Permission denied
kim@chips:~/git/taichi/taichi_rails$ sudo sed -i -re "s/(hosts:.*\s{1,}resolver)(\s{1,}\[[^]|.]*\]){0,1}($|\s\w)(.*)/\1 [UNAVAIL=return]\3\4/; s/\s*$//;" /etc/nsswitch.conf
kim@chips:~/git/taichi/taichi_rails$ 
kim@chips:~/git/taichi/taichi_rails$ 
kim@chips:~/git/taichi/taichi_rails$ getent hosts dev.azk.io
172.18.0.1      dev.azk.io
getting "refused to connect"
Everton Ribeiro
@nuxlli
Mar 25 2016 18:54
oh god..rsrs
Dr Kim Foale
@kimadactyl
Mar 25 2016 18:54
rsrs? :)
oic :)
you sure its not something else ive done?
Everton Ribeiro
@nuxlli
Mar 25 2016 18:55
I do not really have to say, the dns service on Linux is very complicated, and Ubuntu is even more
this will sound bad, but you have tried to restart your machine?
Dr Kim Foale
@kimadactyl
Mar 25 2016 18:56
yes i just did
its only network manager working now
not sure if that made it more complex or not.
Everton Ribeiro
@nuxlli
Mar 25 2016 18:58
in theory it was to be made easier
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:00
dinnertime biab
Everton Ribeiro
@nuxlli
Mar 25 2016 19:07
ok
when you return:
# Now try this
# Fix! It will change
# for : hosts:          files resolver [UNAVAIL=return] mdns4_minimal [NOTFOUND=return] dns
# this: hosts:          files mdns4_minimal [NOTFOUND=return] dns [SUCCESS=continue] resolver
sudo sed -i -re "s/(hosts:.*)\s{1,}resolver(\s{1,}\[[^]|.]*\]){0,1}($|\s\w)(.*)/\1\3\4 [SUCCESS=continue] resolver/; s/\s*$//;" /etc/nsswitch.conf

# Test
getent hosts dev.azk.io
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:28
still not working :(
kim@chips:~/git/taichi/taichi_rails$ getent hosts dev.azk.io
172.18.0.1      dev.azk.io
whats it meant to be?
Everton Ribeiro
@nuxlli
Mar 25 2016 19:30
ping, browsers, no work?
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:31
ooo
kim@chips:~/git/taichi/taichi_rails$ ping dev.azk.io
PING dev.azk.io (172.18.0.1) 56(84) bytes of data.
64 bytes from 172.18.0.1: icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from 172.18.0.1: icmp_seq=2 ttl=64 time=0.045 ms
64 bytes from 172.18.0.1: icmp_seq=3 ttl=64 time=0.051 ms
Everton Ribeiro
@nuxlli
Mar 25 2016 19:32
nice
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:32
hmm
This message was deleted
kim@chips:~/git/taichi/taichi_rails$ ping dev.azk.io
PING dev.azk.io (172.18.0.1) 56(84) bytes of data.
64 bytes from 172.18.0.1: icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from 172.18.0.1: icmp_seq=2 ttl=64 time=0.045 ms
64 bytes from 172.18.0.1: icmp_seq=3 ttl=64 time=0.051 ms
^C
--- dev.azk.io ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.040/0.045/0.051/0.007 ms
kim@chips:~/git/taichi/taichi_rails$ 
kim@chips:~/git/taichi/taichi_rails$ sudo sed -i -re "s/(hosts:.*)\s{1,}resolver(\s{1,}\[[^]|.]*\]){0,1}($|\s\w)(.*)/\1\3\4 [SUCCESS=continue] resolver/; s/\s*$//;" /etc/nsswitch.conf
kim@chips:~/git/taichi/taichi_rails$ ping dev.azk.io
ping: unknown host dev.azk.io
im a bit confused :)
Everton Ribeiro
@nuxlli
Mar 25 2016 19:32
me too :P
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:33
is there an order i need to do things in, eg, starting azk, running the commands, etc
Everton Ribeiro
@nuxlli
Mar 25 2016 19:33
back to the old version of /etc/nsswitch.conf
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:34
it currently looks like this
This message was deleted
This message was deleted
kim@chips:~/git/taichi/taichi_rails$ cat /etc/nsswitch.conf 
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files mdns4_minimal [NOTFOUND=return] dns [SUCCESS=continue] [SUCCESS=continue] resolver
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
Everton Ribeiro
@nuxlli
Mar 25 2016 19:34
ual
remove one "[SUCCESS=continue]"
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:35
ah ok ran your command twice by accident :smile:
have a ping again
Everton Ribeiro
@nuxlli
Mar 25 2016 19:35
nice
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:35
ooo
"no application configured"
Everton Ribeiro
@nuxlli
Mar 25 2016 19:36
nice!
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:36
https://taichi-school.dev.azk.io/ unable to connect then
dev.azk.io giving no application
Everton Ribeiro
@nuxlli
Mar 25 2016 19:36
now you can try start your application with azk start
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:36
it is started, restart?
Everton Ribeiro
@nuxlli
Mar 25 2016 19:36
yes
cd [app_dir] && azk restart
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:37
hmm did azk agent stop && azk start and its not working
ping to dev.azk.io working, browser not willing to connect
Everton Ribeiro
@nuxlli
Mar 25 2016 19:38
you can send me the output?
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:38
ping to taichi-school.dev.azk.io working too
the output of what?
Everton Ribeiro
@nuxlli
Mar 25 2016 19:39
for "azk agent stop && azk start" process
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:39
kim@chips:~/git/taichi/taichi_rails$ azk agent stop && azk start
azk: Agent is running...
azk: Agent is being stopped...
azk: Agent has been successfully stopped.
? 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.17.0 detected
azk: Cleaning 2 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.18.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.
azk: ↑ starting `postgres` system, 1 new instances...
azk: ✓ checking `azukiapp/postgres:9.4` image...
azk: ◴ waiting for `postgres` system to start, trying connection to port data/tcp...
azk: ↑ starting `taichi-school` system, 1 new instances...
azk: ✓ checking `azukiapp/ruby:2.3.0` image...
azk: ⎘ syncing files for `taichi-school` system...
azk: ◴ waiting for `taichi-school` system to start, trying connection to port http/tcp...

┌───┬───────────────┬───────────┬─────────────────────────────────┬─────────────────┬─────────────┐
│   │ System        │ Instances │ Hostname/url                    │ Instances-Ports │ Provisioned │
├───┼───────────────┼───────────┼─────────────────────────────────┼─────────────────┼─────────────┤
│ ↑ │ postgres      │ 1         │ dev.azk.io                      │ 1-data:32776    │ -           │
├───┼───────────────┼───────────┼─────────────────────────────────┼─────────────────┼─────────────┤
│ ↑ │ taichi-school │ 1http://taichi-school.dev.azk.io │ 1-http:32777    │ 3 hours ago │
└───┴───────────────┴───────────┴─────────────────────────────────┴─────────────────┴─────────────┘
kim@chips:~/git/taichi/taichi_rails$
wow this thing formats tables properly? :sparkles:
Everton Ribeiro
@nuxlli
Mar 25 2016 19:40
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:41
"This site can’t provide a secure connection"
http redirects to https
Everton Ribeiro
@nuxlli
Mar 25 2016 19:42
the ask does not yet support https, your application for this redirecting https
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:42
yes its redirecting weird
Everton Ribeiro
@nuxlli
Mar 25 2016 19:42
try
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:42
An error occurred during a connection to taichi-school.dev.azk.io:32777. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG
Everton Ribeiro
@nuxlli
Mar 25 2016 19:43
curl -I http://taichi-school.dev.azk.io
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:43
kim@chips:~/git/taichi/taichi_rails$ curl -I http://taichi-school.dev.azk.io
HTTP/1.1 301 Moved Permanently
content-type: text/html
location: https://taichi-school.dev.azk.io/
connection: close
content-length: 0
Date: Fri, 25 Mar 2016 19:43:22 GMT
Everton Ribeiro
@nuxlli
Mar 25 2016 19:44
this apps is rails app?
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:44
yes. im using a spree, an ecommerce app on it though. maybe thats doing something? hmmmm
i have the custom database.yml running so cant easily check hmm
Everton Ribeiro
@nuxlli
Mar 25 2016 19:45
try this:
# ../config/initilizers/spree.rb
Spree.config do |config|
  config.allow_ssl_in_production = false #This line
end
after this, restart app: azk restart
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:48
full response, kinda long sorry
kim@chips:~/git/taichi/taichi_rails$ azk restart
azk: ↓ stopping `taichi-school` system, 1 instances...
azk: ↓ stopping `postgres` system, 1 instances...
azk: ↑ starting `taichi-school` system, 1 new instances...
azk: ↑ starting `postgres` system, 1 new instances...
azk: ✓ checking `azukiapp/ruby:2.3.0` image...
azk: ◴ waiting for `postgres` system to start, trying connection to port data/tcp...
azk: ⎘ syncing files for `taichi-school` system...
azk: ◴ waiting for `taichi-school` system to start, trying connection to port http/tcp...
azk: An error occurred. It will stop all instances already running. See details below.

azk: ↓ stopping `postgres` system, 1 instances...
azk: System `taichi-school` not running
azk: Run system `taichi-school` return: (1), for command: ["bundle","exec","rails","server","--pid","/tmp/rails.pid","--port=3000","--binding=0.0.0.0"]:
azk:  .taichi-school [log] >  => Booting Puma
azk:  .taichi-school [log] >  => Rails 4.2.6 application starting in production on http://0.0.0.0:3000
azk:  .taichi-school [log] >  => Run `rails server -h` for more startup options
azk:  .taichi-school [log] >  => Ctrl-C to shutdown server
azk:  .taichi-school [log] >    Spree::Preference Load (0.5ms)  SELECT  "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1  ORDER BY "spree_preferences"."id" ASC LIMIT 1  [["key", "spree/app_configuration/layout"]]
azk:  .taichi-school [log] >     (0.2ms)  BEGIN
azk:  .taichi-school [log] >    Spree::Preference Exists (0.4ms)  SELECT  1 AS one FROM "spree_preferences" WHERE ("spree_preferences"."key" = 'spree/app_configuration/layout' AND "spree_preferences"."id" != 2) LIMIT 1
azk:  .taichi-school [log] >     (0.1ms)  COMMIT
azk:  .taichi-school [log] >    Spree::Preference Load (0.2ms)  SELECT  "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1  ORDER BY "spree_preferences"."id" ASC LIMIT 1  [["key", "spree/app_configuration/track_inventory_levels"]]
azk:  .taichi-school [log] >     (0.1ms)  BEGIN
azk:  .taichi-school [log] >    Spree::Preference Exists (0.3ms)  SELECT  1 AS one FROM "spree_preferences" WHERE ("spree_preferences"."key" = 'spree/app_configuration/track_inventory_levels' AND "spree_preferences"."id" != 3) LIMIT 1
azk:  .taichi-school [log] >     (0.1ms)  COMMIT
azk:  .taichi-school [log] >    Spree::Preference Load (0.2ms)  SELECT  "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1  ORDER BY "spree_preferences"."id" ASC LIMIT 1  [["key", "spree/app_configuration/address_requires_state"]]
azk:  .taichi-school [log] >     (0.1ms)  BEGIN
azk:  .taichi-school [log] >    Spree::Preference Exists (0.2ms)  SELECT  1 AS one FROM "spree_preferences" WHERE ("spree_preferences"."key" = 'spree/app_configuration/address_requires_state' AND "spree_preferences"."id" != 4) LIMIT 1
azk:  .taichi-school [log] >     (0.1ms)  COMMIT
azk:  .taichi-school [log] >    Spree::Preference Load (0.2ms)  SELECT  "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1  ORDER BY "spree_preferences"."id" ASC LIMIT 1  [["key", "spree/app_configuration/allow_guest_checkout"]]
azk:  .taichi-school [log] >     (0.1ms)  BEGIN
azk:  .taichi-school [log] >    Spree::Preference Exists (0.2ms)  SELECT  1 AS one FROM "spree_preferences" WHERE ("spree_preferences"."key" = 'spree/app_configuration/allow_guest_checkout' AND "spree_preferences"."id" != 5) LIMIT 1
azk:  .taichi-school [log] >     (0.1ms)  COMMIT
azk:  .taichi-school [log] >  Exiting
azk:  .taichi-school [log] >  /azk/bundler/ruby/2.3.0/bundler/gems/spree-f1b3b8a85275/core/app/models/spree/preferences/configuration.rb:66:in `method_missing': undefined method `allow_ssl_in_production=' for #<Spree::AppConfiguration:0x0055dac058b948> (NoMethodError)
azk:  .taichi-school [log] >      from /azk/taichi_rails/config/initializers/spree.rb:22:in `block in <top (required)>'
azk:  .taichi-school [log] >      from /azk/bundler/ruby/2.3.0/bundler/gems/spree-f1b3b8a85275/core/lib/spree/core.rb:45:in `config'
azk:  .taichi-school [log
oh it truncated it np. guessing the problem is with with the command
Everton Ribeiro
@nuxlli
Mar 25 2016 19:51
search for "config.force_ssl" in "./config" config files
grep "config.force_ssl" -R ./config
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:52
ahha. caught it in config/environemnts/production.rb
same error
Everton Ribeiro
@nuxlli
Mar 25 2016 19:53
what, you removed this?
# ../config/initilizers/spree.rb
Spree.config do |config|
  config.allow_ssl_in_production = false #This line
end
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:54
there was nothing there before and i added that line
i changed config.force_ssl = false in config/environments/production.rb
it was on true, perhaps something to do with heroku
Everton Ribeiro
@nuxlli
Mar 25 2016 19:54
it is wrong, it is for an old version of spree
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:55
whoop ok
Everton Ribeiro
@nuxlli
Mar 25 2016 19:56
the rails in the spree change frequently, what can this forcing redirect to http may be in multiple locations
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:56
ok it lives :) kindaaaa
getting plain text output no styling
Everton Ribeiro
@nuxlli
Mar 25 2016 19:57
you have an entry like RAILS_ENV: "development" in yours Azkfile.js?
Dr Kim Foale
@kimadactyl
Mar 25 2016 19:57
have to use the port still
Everton Ribeiro
@nuxlli
Mar 25 2016 19:58
echo "RAILS_ENV=development" >> .env
echo "RACK_ENV=development" >> .env
so you force the way development locally
azk restart
curl -I http://taichi-school.dev.azk.io
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:00
:o working! sorta!
Everton Ribeiro
@nuxlli
Mar 25 2016 20:01
\o/
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:01
seems db isnt working i thinkkk
Everton Ribeiro
@nuxlli
Mar 25 2016 20:01
rsrs
rs = ha
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:01
yeah but if i have to manually put in a port for the domain name then maybe the db is the same?
like i cant connect without the port
kim@chips:~/git/taichi/taichi_rails$ curl -I http://taichi-school.dev.azk.io
HTTP/1.1 200 OK
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
content-type: text/html; charset=utf-8
etag: W/"5ab6c5963f3355dbd83d73d262fc12fa"
cache-control: max-age=0, private, must-revalidate
set-cookie: guest_token=IjBKSVpGb0ItRjlFbXdRNUpwMVk3MWcxNDU4OTM2MTQxNjQ1Ig%3D%3D--bf5e5db4f198c9cbecfb7d81a311817ee32f29c4; path=/; expires=Tue, 25 Mar 2036 20:02:21 -0000
set-cookie: request_method=HEAD; path=/
set-cookie: _taichi_rails_session=bjBhUjljT01lT0hXdXd0UnhaRS9hbG42TVpua0I1b3VJdERXUkNsa0ZtRlN1b1hRdXZxOElGaEM5MzlkYlBnVVRxekdnUlFZbTQ3RzgvMlg3aHIzSm9xREJGUTVLOEkrbHltZ2Y2TUhJb3JYczhzQTRvTVY0N1BOanVSeGdLWmRxVE9CcVRBWjBHTjFRY1lFL1pYVkt3PT0tLWVBMjJIODBHSW8rRUZoSGV3eTJDNXc9PQ%3D%3D--254ef468969686a1c8269be7f4313387022478df; path=/; HttpOnly
x-request-id: 9c869337-ae86-4a51-95e4-c036ba434cf1
x-runtime: 0.332885
connection: close
Date: Fri, 25 Mar 2016 20:02:21 GMT
oh rs is brazilian portugese for ha? nice :D
Everton Ribeiro
@nuxlli
Mar 25 2016 20:04
probably you are still having to put the port because browser cache still live
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:04
ok
restart?
chrome cache is bane of my web dev life hah
Everton Ribeiro
@nuxlli
Mar 25 2016 20:04
what, we will correct the db
try this:
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:05
oh it just started working portless :) apparently whine enough and it works
Everton Ribeiro
@nuxlli
Mar 25 2016 20:06
azk stop
azk shell postgres -- rm -Rf '/var/lib/postgres/data/*'
azk start -R
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:07
no luck
Everton Ribeiro
@nuxlli
Mar 25 2016 20:07
:/
output?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:08
kim@chips:~/git/taichi/taichi_rails$ azk stop
azk: ↓ stopping `taichi-school` system, 1 instances...
azk: ↓ stopping `postgres` system, 1 instances...

┌───┬───────────────┬───────────┬──────────────────────────┬─────────────────┬─────────────┐
│   │ System        │ Instances │ Hostname/url             │ Instances-Ports │ Provisioned │
├───┼───────────────┼───────────┼──────────────────────────┼─────────────────┼─────────────┤
│ ↓ │ postgres      │ 0         │ dev.azk.io               │ -               │ -           │
├───┼───────────────┼───────────┼──────────────────────────┼─────────────────┼─────────────┤
│ ↓ │ taichi-school │ 0         │ taichi-school.dev.azk.io │ -               │ 4 hours ago │
└───┴───────────────┴───────────┴──────────────────────────┴─────────────────┴─────────────┘
kim@chips:~/git/taichi/taichi_rails$ azk shell postgres -- rm -Rf '/var/lib/postgres/data/*'
kim@chips:~/git/taichi/taichi_rails$ azk start -R
azk: ↑ starting `postgres` system, 1 new instances...
azk: ✓ checking `azukiapp/postgres:9.4` image...
azk: ◴ waiting for `postgres` system to start, trying connection to port data/tcp...
azk: ↑ starting `taichi-school` system, 1 new instances...
azk: ✓ checking `azukiapp/ruby:2.3.0` image...
azk: ↻ provisioning `taichi-school` system...
azk: ⎘ syncing files for `taichi-school` system...
azk: ◴ waiting for `taichi-school` system to start, trying connection to port http/tcp...

┌───┬───────────────┬───────────┬─────────────────────────────────┬─────────────────┬───────────────────┐
│   │ System        │ Instances │ Hostname/url                    │ Instances-Ports │ Provisioned       │
├───┼───────────────┼───────────┼─────────────────────────────────┼─────────────────┼───────────────────┤
│ ↑ │ postgres      │ 1         │ dev.azk.io                      │ 1-data:32788    │ -                 │
├───┼───────────────┼───────────┼─────────────────────────────────┼─────────────────┼───────────────────┤
│ ↑ │ taichi-school │ 1         │ http://taichi-school.dev.azk.io │ 1-http:32789    │ a few seconds ago │
└───┴───────────────┴───────────┴─────────────────────────────────┴─────────────────┴───────────────────┘
kim@chips:~/git/taichi/taichi_rails$
Everton Ribeiro
@nuxlli
Mar 25 2016 20:09
cat config/database.yml
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:09
its your one
kim@chips:~/git/taichi/taichi_rails$ cat config/database.yml
<%
require 'cgi'
require 'uri'
begin
  uri = URI.parse(ENV["DATABASE_URL"])
rescue URI::InvalidURIError
  raise "Invalid DATABASE_URL"
end
env = ENV["RAILS_ENV"] || ENV["RACK_ENV"]
raise "No RACK_ENV or RAILS_ENV found" unless env
def attribute(name, value, force_string = false)
  if value
    value_string =
      if force_string
        '"' + value + '"'
      else
        value
      end
    "#{name}: #{value_string}"
  else
    ""
  end
end
database = "#{(uri.path || "").split("/")[1]}_#{env}"
username = uri.user
password = uri.password
host     = uri.host
port     = uri.port
params   = CGI.parse(uri.query || "")
params["encoding"] = ["utf8"] unless params["encoding"].present?
params["pool"    ] = [5]      unless params["pool"    ].present?
adapter = case uri.scheme.to_s
          when "postgres" then "postgresql"
          when "mysql"    then "mysql2"
          else uri.scheme.to_s
          end
%>

<%= env %>:
  <%= attribute "adapter",  adapter %>
  <%= attribute "database", database %>
  <%= attribute "username", username %>
  <%= attribute "password", password, true %>
  <%= attribute "host",     host %>
  <%= attribute "port",     port %>

<% params.each do |key, value| %>
  <%= key %>: <%= value.first %>
<% end %>
which tbh i dont like cuz i cant load it locally now :D but w/e for time being
Everton Ribeiro
@nuxlli
Mar 25 2016 20:10
the way around this ;)
I can see the database error?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:11
wait. im a dumbass. ive not pushed my db data. lol
sorry
how do i push over my database to the azk image?
Everton Ribeiro
@nuxlli
Mar 25 2016 20:12
hahaha
Gullit Miranda
@gullitmiranda
Mar 25 2016 20:13
Whatsapp format of your data?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:14
erm just a postgres database
Gullit Miranda
@gullitmiranda
Mar 25 2016 20:14
SQL dump file or seed?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:14
(fwiw i hate postgres i only migrated for heroku)
Gullit Miranda
@gullitmiranda
Mar 25 2016 20:15
You prefer mysql?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:15
i dont care at this point
lol
Everton Ribeiro
@nuxlli
Mar 25 2016 20:15
@gullitmiranda will help you because he has more experience with the use of images
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:16
the postgres db seems to be working fine on my azk image (is there a name for it?)
just now dont know how to transfer my local db over?
Everton Ribeiro
@nuxlli
Mar 25 2016 20:16
about de the https erro, you can vote this issue? azukiapp/azk#340
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:17
vote? want me to put a comment?
Everton Ribeiro
@nuxlli
Mar 25 2016 20:17
feel free ;)
is just so we can prioritize according to demand
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:18
yeah np
wait github has reactions now :o
Everton Ribeiro
@nuxlli
Mar 25 2016 20:19
thanks ;)
yes, hahah
Gullit Miranda
@gullitmiranda
Mar 25 2016 20:20
@kimadactyl you can make this question in http://stackoverflow.com/questions/tagged/azk while preparing the list of commands?
so is documenting for other people.
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:20
yes sure
Gullit Miranda
@gullitmiranda
Mar 25 2016 20:22
in the README of the image mysql (http://images.azk.io/#/mysql?_k=yvigvq) has already documented this. When I get time I will do the same in postgres, if someone doesn't do a PR before =D.
Everton Ribeiro
@nuxlli
Mar 25 2016 20:22
@kimadctyl while @gullitmiranda help you with thedb, can do a test for me just to make sure if we can solve the problem with the dns?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:23
do you have a name for what azk creates? images? vms? something else?
beans? ;)
Everton Ribeiro
@nuxlli
Mar 25 2016 20:24
haha, nice idea ;)
you can roolback the /etc/nsswitch.conf?
hosts:          files resolver mdns4_minimal [NOTFOUND=return] dns
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:26
k
Everton Ribeiro
@nuxlli
Mar 25 2016 20:26
only for check bug resolution
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:26
then restart
?
Everton Ribeiro
@nuxlli
Mar 25 2016 20:27
it is not necessary, if that same resolution the bug should return
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:27
restarted and its still working :)
Everton Ribeiro
@nuxlli
Mar 25 2016 20:27
hauhauah
check the ping
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:27
kim@chips:~/git/taichi/taichi_rails$ ping dev.azk.io
PING dev.azk.io (172.18.0.1) 56(84) bytes of data.
64 bytes from 172.18.0.1: icmp_seq=1 ttl=64 time=0.052 ms
64 bytes from 172.18.0.1: icmp_seq=2 ttl=64 time=0.038 ms
64 bytes from 172.18.0.1: icmp_seq=3 ttl=64 time=0.041 ms
^C
--- dev.azk.io ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.038/0.043/0.052/0.009 ms
kim@chips:~/git/taichi/taichi_rails$ ping taichi-school.dev.azk.io
PING taichi-school.dev.azk.io (172.18.0.1) 56(84) bytes of data.
64 bytes from 172.18.0.1: icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from 172.18.0.1: icmp_seq=2 ttl=64 time=0.043 ms
64 bytes from 172.18.0.1: icmp_seq=3 ttl=64 time=0.038 ms
^C
--- taichi-school.dev.azk.io ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.038/0.040/0.043/0.005 ms
all good!
Everton Ribeiro
@nuxlli
Mar 25 2016 20:28
ok, if the bug you change back to the other format and let me know please?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:28
sorry what do you want me to do?
Everton Ribeiro
@nuxlli
Mar 25 2016 20:29
sorry, my English is shameful
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:30
dont worry my portugese is nonexistant :)
vamos a la playa thats about it
Everton Ribeiro
@nuxlli
Mar 25 2016 20:30
this bug is very difficult to reproduce, if it happens again, you could tell me?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:30
of course sure
this is hopefully a successful business im launching we're gonna be tied in so no choice ^^
Everton Ribeiro
@nuxlli
Mar 25 2016 20:31
haha, thanks
I will need to get out, the more @gullitmiranda will help you with the database
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:32
sure thing
Everton Ribeiro
@nuxlli
Mar 25 2016 20:32
something more I can do for you?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:33
i think now im kinda wondering about environments and the like. ive switched to your database.yml and now working how to orchestrate local/staging/production dbs
but thats a big question :)
Everton Ribeiro
@nuxlli
Mar 25 2016 20:34
I recommend using the DATABASE_URL
check this for more informations: http://12factor.net/config
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:35
ook
so basically everything in my azkfile at the moment is for my dev environment, correct? and i should start developing in there?
then i need to add my digital ocean key for live?
Everton Ribeiro
@nuxlli
Mar 25 2016 20:36
yes
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:36
great ok. ill have a poke. maybe monday :D
thanks so much for your help this is the most insane support haha
Everton Ribeiro
@nuxlli
Mar 25 2016 20:37
I who thank, whenever you need only contact
one more question:
how you met the azk?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:38
i tweeted digital ocean and they suggested azk :)
i tried capistrano but man every time i have to configure psql i want to stab someone
Everton Ribeiro
@nuxlli
Mar 25 2016 20:38
nice
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:38
also i want everything to be one press
feels like every time i have to go to a remote shell to do something im failing
Everton Ribeiro
@nuxlli
Mar 25 2016 20:40
capistrano is good, but it is not easy
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:40
anything that tells me to install like 5 gems is a bit... wtf
Everton Ribeiro
@nuxlli
Mar 25 2016 20:41
haha
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:41
im a drupal dev really trying to switch to rails. and i really miss drush its like the best thing about it
rails is so fun to dev in but deploying it feels like pullling teeth
Everton Ribeiro
@nuxlli
Mar 25 2016 20:43
deploy rails compared with php is really complicated and boring
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:43
no joke
ruby feels like building on sand to begin with as it is
Everton Ribeiro
@nuxlli
Mar 25 2016 20:44
@kimadactyl I'm sorry, but really need to go, thanks and []s
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:45
have a great weekend :) thanks again
back on monday most likely!
Gullit Miranda
@gullitmiranda
Mar 25 2016 20:48
@kimadactyl sorry for delay.
I'm doing a form for documenting in the image
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:49
no hurry man its friday :)
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:52
holy crap dude :D
Gullit Miranda
@gullitmiranda
Mar 25 2016 20:54
don't work?
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:56
lol no just amazed at this support :D
that was an exclamation of thanks
Gullit Miranda
@gullitmiranda
Mar 25 2016 20:57
ow. sorry for not understanding, unfortunately I and the @nuxlli we are the weakest English team :(
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:58
haha do not worry at all :)
im northern too my english is weird
Gullit Miranda
@gullitmiranda
Mar 25 2016 20:58
now I'm doing the second section (### Auto import using Azkfile)
rsrs ok
but when something is not clear, you can talk me, after all I'm still learning =D
Dr Kim Foale
@kimadactyl
Mar 25 2016 20:59
sure :)
if you can test and review I will tank you profusely
Dr Kim Foale
@kimadactyl
Mar 25 2016 21:14
sure, back shortly :) had some wine now might be a bit less lucid :D
Gullit Miranda
@gullitmiranda
Mar 25 2016 21:15
rsrs no problem =D
Gullit Miranda
@gullitmiranda
Mar 25 2016 21:21
when you revise, you can do this in PR azukiapp/docker-postgres#3
Dr Kim Foale
@kimadactyl
Mar 25 2016 21:44
kim@chips:~/git/taichi/taichi_rails$ azk restart
azk: ↓ stopping `taichi-school` system, 1 instances...
azk: ↓ stopping `postgres` system, 1 instances...
azk: ↑ starting `taichi-school` system, 1 new instances...
azk: ↑ starting `postgres` system, 1 new instances...
azk: ✓ checking `azukiapp/ruby:2.3.0` image...
azk: ◴ waiting for `postgres` system to start, trying connection to port data/tcp...
azk: An error occurred. It will stop all instances already running. See details below.

azk: System `postgres` not running
azk: System `taichi-school` not running
azk: Run system `postgres` return: (3), for command: ["/azk-entrypoint.sh","postgres"]:
azk:  .postgres [log] >  The files belonging to this database system will be owned by user "postgres".
azk:  .postgres [log] >  This user must also own the server process.
azk:  .postgres [log] >  
azk:  .postgres [log] >  The database cluster will be initialized with locale "en_US.utf8".
azk:  .postgres [log] >  The default database encoding has accordingly been set to "UTF8".
azk:  .postgres [log] >  The default text search configuration will be set to "english".
azk:  .postgres [log] >  
azk:  .postgres [log] >  Data page checksums are disabled.
azk:  .postgres [log] >  
azk:  .postgres [log] >  fixing permissions on existing directory /var/lib/postgresql/data ... ok
azk:  .postgres [log] >  creating subdirectories ... ok
azk:  .postgres [log] >  selecting default max_connections ... 100
azk:  .postgres [log] >  selecting default shared_buffers ... 128MB
azk:  .postgres [log] >  selecting dynamic shared memory implementation ... posix
azk:  .postgres [log] >  creating configuration files ... ok
azk:  .postgres [log] >  creating template1 database in /var/lib/postgresql/data/base/1 ... ok
azk:  .postgres [log] >  initializing pg_authid ... ok
azk:  .postgres [log] >  initializing dependencies ... ok
azk:  .postgres [log] >  creating system views ... ok
azk:  .postgres [log] >  loading system objects' descriptions ... ok
azk:  .postgres [log] >  creating collations ... ok
azk:  .postgres [log] >  creating conversions ... ok
azk:  .postgres [log] >  creating dictionaries ... ok
azk:  .postgres [log] >  setting privileges on built-in objects ... ok
azk:  .postgres [log] >  creating information schema ... ok
azk:  .postgres [log] >  loading PL/pgSQL server-side language ... ok
azk:  .postgres [log] >  vacuuming database template1 ... ok
azk:  .postgres [log] >  copying template1 to template0 ... ok
azk:  .postgres [log] >  copying template1 to postgres ... ok
azk:  .postgres [log] >  syncing data to disk ... ok
azk:  .postgres [log] >  
azk:  .postgres [log] >  Success. You can now start the database server using:
azk:  .postgres [log] >  
azk:  .postgres [log] >      postgres -D /var/lib/postgresql/data
azk:  .postgres [log] >  or
azk:  .postgres [log] >      pg_ctl -D /var/lib/postgresql/data -l logfile start
azk:  .postgres [log] >  
azk:  .postgres [log] >  
azk:  .postgres [log] >  WARNING: enabling "trust" authentication for local connections
azk:  .postgres [log] >  You can change this by editing pg_hba.conf or using the option -A, or
azk:  .postgres [log] >  --auth-local and --auth-host, the next time you run initdb.
azk:  .postgres [log] >  ****************************************************
azk:  .postgres [log] >  WARNING: No password has been set for the database.
azk:  .postgres [log] >           This will allow anyone with access to the
azk:  .postgres [log] >           Postgres port to access your database. In
azk:  .postgres [log] >           Docker's default configuration, this is
azk:  .postgres [log] >           effectively any other container on the same
azk:  .postgres [log] >           system.
azk:  .postgres [log] >  
azk:  .postgres [log] >           Use "-e POSTGRES_PASSWORD=password" to set
azk:  .postgres [log] >           it in "docker run".
azk:  .postgres [log] >  ****************************************************
azk:  .postgres [log] >  waiting for server to start....LOG:  database system was shut down at 2016-03-25 21:43:29 UTC
azk:  .postg
Dr Kim Foale
@kimadactyl
Mar 25 2016 22:07
logging off for tonight thanks again :) back on monday
(maybe sunday will see)
Gullit Miranda
@gullitmiranda
Mar 25 2016 22:10
you tryed start again?