Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

make dev fails to start because of container connection issue on macOS #1705

Closed
xcoulon opened this issue Oct 10, 2017 · 1 comment
Closed
Assignees
Labels

Comments

@xcoulon
Copy link
Contributor

xcoulon commented Oct 10, 2017

when running make dev, the docker-compose up -d db auth command is executed, but the auth container's port 8089 is not published as show below after the docker ps command:

CONTAINER ID        IMAGE                                           COMMAND                  CREATED             STATUS                    PORTS                    NAMES
daec07ce1b75        fabric8/fabric8-auth:latest                     "/auth+pmcd.sh"          30 seconds ago      Up 29 seconds                                      fabric8wit_auth_1
14f32f8f9dd9        registry.centos.org/postgresql/postgresql:9.6   "container-entrypo..."   32 seconds ago      Up 29 seconds             0.0.0.0:5432->5432/tcp   fabric8wit_db_1
5d1630a827e5        registry.centos.org/postgresql/postgresql:9.6   "container-entrypo..."   32 seconds ago      Up 30 seconds             0.0.0.0:5433->5432/tcp   fabric8wit_db-auth_1

this results in the following error in the application during startup:

17:13:49 app         | time="2017-10-10 17:13:49" level=error msg="unable to load public keys from remote service" err="Get http://localhost:8089/api/token/keys: dial tcp [::1]:8089: getsockopt: connection refused" file="/Users/xcoulon/code/go/src/github.com/fabric8-services/fabric8-wit/token/token.go" func="github.com/fabric8-services/fabric8-wit/token.NewManager" keys_url="http://localhost:8089/api/token/keys" line=82 pid=95439 pkg=token
17:13:49 app         | time="2017-10-10 17:13:49" level=panic msg="failed to create token manager" err="unable to load public keys from remote service" pid=95439
17:13:49 app         | panic: (*logrus.Entry)
17:13:49 app         | (0x198f360,0xc4204b4730)

goroutine 1 [running]:
github.com/fabric8-services/fabric8-wit/vendor/github.com/Sirupsen/logrus.Entry.log(0xc420175e00,
17:13:49 app         | 0xc4206908d0, 0x0, 0x0,
17:13:49 app         | 0x0, 0x0, 0x0, 0x0
17:13:49 app         | , 0x0, 0x100e900, ...)
	/Users/xcoulon/code/go/src/github.com/fabric8-services/fabric8-wit/vendor/github.com/Sirupsen/logrus/entry.go:124 +
17:13:49 app         | 0x340
github.com/fabric8-services/fabric8-wit/vendor/github.com/Sirupsen/logrus.(*Entry).Panic(0xc4204b46e0, 0xc42062d860
17:13:49 app         | , 0x1, 0x1)
	/Users/xcoulon/code/go/src/github.com/fabric8-services/fabric8-wit/vendor/github.com/Sirupsen/logrus/entry.go:169 +0x11b
github.com/fabric8-services/fabric8-wit/vendor/github.com/Sirupsen/logrus.(*Entry).Panicln
17:13:49 app         | (0xc4204b46e0, 0xc42062d8d8, 0x1, 0x1)
17:13:49 app         | 	/Users/xcoulon/code/go/src/github.com/fabric8-services/fabric8-wit/vendor/github.com/Sirupsen/logrus/entry.go:264 +0xe0
17:13:49 app         | github.com/fabric8-services/fabric8-wit/log.Panic(0x0, 0x0, 0xc420690840, 0x19e4f06, 0x1e, 0x0, 0x0, 0x0)
	/Users/xcoulon/code/go/src/github.com/fabric8-services/fabric8-wit/log/log.go:248 +0x24f
main.main()
	/Users/xcoulon/code/go/src/github.com/fabric8-services/fabric8-wit/main.go:
@xcoulon xcoulon self-assigned this Oct 10, 2017
xcoulon added a commit to xcoulon/fabric8-wit that referenced this issue Oct 10, 2017
…cOS (fabric8-services#1705)

remove the `network_mode` option in the containers
specify the host/port for the `auth` service to connect to its `db`, using the
internal Postgres port (5432) and using the container's hostname (the container
name itself)

Fixes fabric8-services#1705

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
xcoulon added a commit to xcoulon/fabric8-wit that referenced this issue Oct 10, 2017
…cOS (fabric8-services#1705)

remove the `network_mode` option in the containers
specify the host/port for the `auth` service to connect to its `db`, using the
internal Postgres port (5432) and using the container's hostname (the container
name itself)

Fixes fabric8-services#1705

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
@alexeykazakov
Copy link
Contributor

Looks like network_mode: "host" is not working on mac as it works on linux - docker/for-mac#1031
So, we have to use something else.

xcoulon added a commit that referenced this issue Oct 11, 2017
…cOS (#1705)

remove the `network_mode` option in the containers
specify the host/port for the `auth` service to connect to its `db`, using the
internal Postgres port (5432) and using the container's hostname (the container
name itself)
same applies for the `core` service to connect to its `db`

Fixes #1705

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
xcoulon added a commit to xcoulon/fabric8-wit that referenced this issue Oct 13, 2017
…cOS (fabric8-services#1705)

keep the previous changes in `docker-compose.mcos.yml` for now
revert the changes as they break on Linux

Fixes fabric8-services#1705

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
xcoulon added a commit to xcoulon/fabric8-wit that referenced this issue Oct 13, 2017
…cOS (fabric8-services#1705)

keep the previous changes in `docker-compose.mcos.yml` for now
revert the changes as they break on Linux

Fixes fabric8-services#1705

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
xcoulon added a commit to xcoulon/fabric8-wit that referenced this issue Oct 13, 2017
…cOS (fabric8-services#1705)

keep the previous changes in `docker-compose.macos.yml` for now
revert the changes as they break on Linux

Fixes fabric8-services#1705

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
xcoulon added a commit that referenced this issue Oct 13, 2017
…cOS (#1705) (#1713)

keep the previous changes in `docker-compose.macos.yml` for now
revert the changes as they break on Linux

Fixes #1705

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
aslakknutsen pushed a commit to openshiftio/saas-openshiftio that referenced this issue Oct 25, 2017
to fabric8-services/fabric8-wit@c6fc618

As you can see there are quite a lot of changes (**83 files changed, 2914 insertions(+), 728 deletions(-)**) and the delta is quite huge. We might want to deploy more often to reduce this delta...

## Quiet CI (fabric8-services/fabric8-wit#1704)
    
Installs RPM more quietly, builds docker containers more quietly, and pulls docker images more quietly.


## `make dev` fails to start because of container connection issue on macOS (fabric8-services/fabric8-wit#1705)
    
remove the `network_mode` option in the containers
specify the host/port for the `auth` service to connect to its `db`, using the
internal Postgres port (5432) and using the container's hostname (the container
name itself)
same applies for the `core` service to connect to its `db`

Fixes fabric8-services/fabric8-wit#1705

## Random test failures because of work item creation error (fabric8-services/fabric8-wit#1676)
    
Using the `Last-Modified` response header when possible
Also, making sure that the list of spaces is always ordered by
`updated_at DESC` to get the most recents spaces first.

Move the `work item number sequence` in its own subpackage.

Refactored the test to use the TestFixture to initialise the
work items from the data set.

Using an `UPSERT` statement to avoid creating then updating
 the work item number sequence, which also avoids putting a `LOCK`
 on the row (using the `... FOR UPDATE` option in the `SELECT`
 statement)

Remove the `optionalKeywords` which contained the work item number
but failed when the 3rd work item was retrieved because its number
('3') would match the description. This worked in the past when the
number did not exist and the search was based on the ID (UUID).

Added some weight on the work item number (`*A`) when the URL matches
a known one and the number can be extracted.

Also, add a test to search by number using the `number:%d` query.

Adding a test to create work items concurrently

Refactor identities creation in test: using UUIDs of created identities instead of usernames
also, move a comment to `init()` where it belongs
also, comment on use of `:*A` in fulltext search

Also: move some log statements to `DEBUG` instead of `INFO`
to reduce the noise during test executions

Fixes fabric8-services/fabric8-wit#1676

## WIP sirupsen-case for fabric8-wit (fabric8-services/fabric8-wit#1672)
    
Goa 1.3 now seems to check length requirements in from the design.

* Update golden files

by running these commands:

$ go test -v github.com/fabric8-services/fabric8-wit/controller -run \
 TestSuiteWorkItemType -testify.m TestCreate -update

$ go test -v github.com/fabric8-services/fabric8-wit/controller -run \
 TestSuiteWorkItemType -testify.m TestShow -update

$ go test -v github.com/fabric8-services/fabric8-wit/controller -run \
 TestSuiteWorkItemType -testify.m TestValidate -update

* Switch postgres to registry.centos.org/postgresql/postgresql:9.6 in CI tests

* Forgot to pass F8_RESOURCE_REMOTE=1 when running remote tests WITH coverage

Fixes fabric8-services/fabric8-wit#1395

## Make link topology a type based on string (fabric8-services/fabric8-wit#1710)
    
* Make link topology a type based on string
* Rename CheckValidTopology to CheckValid and make it a member function of a Topology


## Simplify usage of test fixture customization functions (fabric8-services/fabric8-wit#1711)

## Added "not found" cases for search by number (fabric8-services/fabric8-wit#1712)
    
* Update search_repository_whitebox_test.go

Update TestSearch - By Number

Add "not found" case for when searching by space and not by space.

Added case with single and multiple results for when searching by number without a space.

## 'make dev' fails to start because of container connection issue on macOS (fabric8-services/fabric8-wit#1705) (fabric8-services/fabric8-wit#1713)
    
keep the previous changes in `docker-compose.macos.yml` for now
revert the changes as they break on Linux

Fixes fabric8-services/fabric8-wit#1705

## Improve the field type system and add tests (fabric8-services/fabric8-wit#1130)
    
We now support a "bool" type for fields in a work item type.

I've added a lot of tests for valid and invalid field types on both, repo- and controller-level.

The field type `KindWorkitemReference` has been removed.

## Do not import pkg 'notification' in pkg 'test' (fabric8-services/fabric8-wit#1716)
    
Move the 'test/notification.go' file into a subpackage
Rename the 'NotificationChannel' into 'FakeNotificationChannel'
to enforce its testing purpose.

Fixes fabric8-services/fabric8-wit#1716

## Work items disappear after unlinking (fabric8-services/fabric8-wit#1708)
    
* Work items disappear after unlinking (fabric8-services/fabric8-wit#1708)

Fix the SQL filter query by making sure only undeleted
links are taken into account when the `parentexists` filter
is activated.
Also, reduce the number of subselects  and add index
on table and improve query

Also, refactor the `search/search_repository_blackbox_test.go`
by using sub tests.

Also, make sure that tests in `TestSearchParentExists` include
the `userSpaceID` in the search expression.

Fixes fabric8-services/fabric8-wit#1708
    
## Creator filter (fabric8-services/fabric8-wit#1715)
    
Filter for work item creator

## Use just `state` instead of `workitemstate` (fabric8-services/fabric8-wit#1721)

## Only space collaborator and WI creators should be able to update/delete links (fabric8-services/fabric8-wit#1718)

## Enable Authorization by default (fabric8-services/fabric8-wit#1723)
        
Previously authorization had to be enabled explicitly in dev mode. With this change, WIT talks to AUTH which handles the authorization implementation details ( like talking to keycloak ).

## Copy links to relationships for `List space` endpoint (1/2) (fabric8-services/fabric8-wit#1687)
    
This ensure that the response will be compliant with the JSON-API specification.

Fixes fabric8-services/fabric8-wit#1687

##  Save description when new iteration created (fabric8-services/fabric8-wit#1726)
    
Fixes: https://openshift.io/openshiftio/openshiftio/plan/detail/1555

## Delete iteration API  (fabric8-services/fabric8-wit#1683)

Allow the user to delete the iteration (soft-delete) using API.

##  WIP: Make the parenting link type have a tree-topology (fabric8-services/fabric8-wit#1729)
    
Based on [this discussion](https://chat.openshift.io/developers/pl/gqwxx3mj13fejfdwqqc61mrwba) we decided to make the parenting link type have a tree topology.
    
See also fabric8-ui/fabric8-planner#2291 (comment)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants