Pact Broker Docker - how to access pact broker

359 views
Skip to first unread message

Chuan Chuan Law

unread,
Jun 17, 2016, 3:05:42 PM6/17/16
to Pact
Hi,

I followed the instructions under:



and my docker terminal looks like this 



when I run boot2docker ip, I got:




May I know how can I access the Pact Broker? Neither http://localhost:80 nor http://192.168.59.103 works.



Please help.



Thanks. 


Ronald Holshausen

unread,
Jun 17, 2016, 5:05:10 PM6/17/16
to Chuan Chuan Law, Pact
I'm not too familiar with boot2docker, but everything looks ok to me.

Can you run docker logs with the ID of the pact broker docker container?


--
You received this message because you are subscribed to the Google Groups "Pact" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pact-support...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Ronald Holshausen

DiUS Computing Pty Ltd

Level 10, 99 Queens Street
Melbourne, VIC 3000

Phone: +61 3 9008 5400
Mobile: +61 413 162 439

http://www.diuscomputing.com.au

Chuan Chuan Law

unread,
Jun 17, 2016, 5:20:35 PM6/17/16
to Pact, chuan.c...@gmail.com
Hi Ronald,


Logs are as below:

NY-CLaw:work claw$ docker logs fc9192cadb66

*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...

*** Running /etc/my_init.d/30_presetup_nginx.sh...

*** Running /etc/rc.local...

*** Booting runit daemon...

*** Runit started as PID 8

Jun 17 21:09:57 fc9192cadb66 syslog-ng[15]: syslog-ng starting up; version='3.5.3'

ok: run: /etc/service/nginx-log-forwarder: (pid 27) 0s

[ 2016-06-17 21:09:58.2902 28/7f58a8fb4780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/usr/bin/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', 'passenger_version' => '4.0.58', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.58', 'web_server_pid' => '20', 'web_server_type' => 'nginx', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }

[ 2016-06-17 21:09:58.2947 31/7f9935e20780 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.20/generation-0/request

[ 2016-06-17 21:09:58.3093 36/7f426c64c7c0 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.20/generation-0/logging

[ 2016-06-17 21:09:58.3094 28/7f58a8fb4780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!

Jun 17 21:17:01 fc9192cadb66 /USR/SBIN/CRON[78]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)



I followed the steps in documentation and set the environment variables using command like:


docker exec -i fc9192cadb66 /bin/bash -c "export PACT_BROKER_DATABASE_USERNAME=pact_broker"


Etc etc........


Please advice.


Thanks heaps.



Chuan


Ronald Holshausen

unread,
Jun 18, 2016, 7:54:20 PM6/18/16
to Chuan Chuan Law, Pact
I can't see anything wrong. You'll need to ask someone who uses boot2docker. 

Andrew Fitzgerald

unread,
Jun 18, 2016, 10:44:40 PM6/18/16
to Pact, chuan.c...@gmail.com
My usual go-to for debugging is to docker exec -it <container> bash 
then try curling localhost:port to see if that gets a response

Michel Boudreau

unread,
Jun 18, 2016, 10:52:24 PM6/18/16
to Andrew Fitzgerald, Pact, chuan.c...@gmail.com

With boot2docker, the port forwarding in virtualbox  isn't done automatically. If you want to have access to the docker port for pact broker, you'll have to manually update it, then restart the guest os  to take affect.

M

Chuan Chuan Law

unread,
Jun 20, 2016, 9:41:14 AM6/20/16
to Pact, andrewcf...@gmail.com, chuan.c...@gmail.com
Thank you very much for your help guys.

This is now working:

NY-CLaw:~ claw$ docker port pactbroker

80/tcp -> 0.0.0.0:80

NY-CLaw:~ claw$ docker-machine ip default

192.168.99.100


Go to browser and enter:


http://192.168.99.100:80



Cheers,


Chuan

Reply all
Reply to author
Forward
0 new messages