DiUS / pact_broker-docker

'Dockerised' pact broker
http://pact.io
MIT License
76 stars 102 forks source link

Error when follow the instructions of POSTGRESQL.md #27

Closed pedrro closed 8 years ago

pedrro commented 8 years ago

Hi guys, I followed the instructions on postgresql.md:

Start the PostgreSQL container via:

  $ docker run --name pactbroker-db -e POSTGRES_PASSWORD=ThePostgresPassword -e POSTGRES_USER=admin -e PGDATA=/var/lib/postgresql/data/pgdata -v /var/lib/postgresql/data:/var/lib/postgresql/data -d postgres
Change ThePostgresPassword as required.

Connect to the container and execute psql via:

  $ docker run -it --link pactbroker-db:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U admin'
Run the follow SQL configuration scripts:

CREATE USER pactbrokeruser WITH PASSWORD 'TheUserPassword';
CREATE DATABASE pactbroker WITH OWNER pactbrokeruser;
GRANT ALL PRIVILEGES ON DATABASE pactbroker TO pactbrokeruser;
Start the PactBroker container via:

$ docker run --name pactbroker --link pactbroker-db:postgres -e PACT_BROKER_DATABASE_USERNAME=pactbrokeruser -e PACT_BROKER_DATABASE_PASSWORD=TheUserPassword -e PACT_BROKER_DATABASE_HOST=postgres -e PACT_BROKER_DATABASE_NAME=pactbroker -d -p 80:80 dius/pact_broker

Now, my pact-broker is running and I'm able to push a contract to pact-broker, but, when I click on view pact button, I got the following stacktrace:

{"message":"incompatible character encodings: UTF-8 and US-ASCII","backtrace":["/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact-1.9.0/lib/pact/doc/markdown/consumer_contract_renderer.rb:18:in call'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact-1.9.0/lib/pact/doc/markdown/consumer_contract_renderer.rb:14:incall'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact_broker-1.9.0/lib/pact_broker/api/renderers/html_pact_renderer.rb:76:in markdown'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact_broker-1.9.0/lib/pact_broker/api/renderers/html_pact_renderer.rb:85:inhtml'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact_broker-1.9.0/lib/pact_broker/api/renderers/html_pact_renderer.rb:30:in call'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact_broker-1.9.0/lib/pact_broker/api/renderers/html_pact_renderer.rb:18:incall'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact_broker-1.9.0/lib/pact_broker/configuration.rb:35:in block in default_html_pact_render'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact_broker-1.9.0/lib/pact_broker/api/resources/latest_pact.rb:29:incall'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact_broker-1.9.0/lib/pact_broker/api/resources/latest_pact.rb:29:in to_html'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/decision/flow.rb:475:ino18'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/decision/fsm.rb:30:in block (2 levels) in run'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/decision/fsm.rb:50:inhandle_exceptions'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/decision/fsm.rb:30:in block in run'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/decision/fsm.rb:28:inloop'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/decision/fsm.rb:28:in run'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/dispatcher.rb:46:inblock in dispatch'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/as-notifications-1.0.1/lib/as/notifications.rb:161:in instrument'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/events.rb:75:ininstrument'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/dispatcher.rb:45:in dispatch'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/webmachine-1.4.0/lib/webmachine/adapters/rack.rb:68:incall'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/cascade.rb:33:in block in call'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/cascade.rb:24:ineach'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/cascade.rb:24:in call'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/urlmap.rb:66:inblock in call'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in each'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:incall'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/static.rb:124:in call'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact_broker-1.9.0/lib/rack/hal_browser/redirect.rb:19:incall'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact_broker-1.9.0/lib/rack/pact_broker/convert_file_extension_to_accept_header.rb:22:in call'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/static.rb:124:incall'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:153:in call'","/home/app/pact_broker/vendor/bundle/ruby/2.2.0/gems/pact_broker-1.9.0/lib/pact_broker/app.rb:21:incall'","/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:74:in process_request'","/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:141:inaccept_and_process_next_request'","/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:109:in main_loop'","/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:455:inblock (3 levels) in start_threads'"]}

I don't know how to proceed, could someone help me?

pedrro commented 8 years ago

I got the error here, it was beause the enconding, on my pact, I had some works with í or ç, so, when try to visualize, it brokes