RHsyseng / 3scale-service-broker

Open Service Broker API implementation for 3scale API Management Platform
3 stars 0 forks source link

Error fetching catalog. no such host #1

Open david-martin opened 6 years ago

david-martin commented 6 years ago

I've run the following:

oc new-project 3scale-service-broker
mvn clean fabric8:deploy -Popenshift
# output below
[INFO] F8: Using OpenShift at https://192.168.37.1:8443/ in namespace 3scale-service-borker with manifest /home/dmartin/work/3scale-service-broker/target/classes/META-INF/fabric8/openshift.yml 
[INFO] OpenShift platform detected
[INFO] Using project: 3scale-service-borker
[INFO] Creating a Service from openshift.yml namespace 3scale-service-borker name three-scale
[INFO] Created Service: target/fabric8/applyJson/3scale-service-borker/service-three-scale.json
[INFO] Using project: 3scale-service-borker
[INFO] Creating a DeploymentConfig from openshift.yml namespace 3scale-service-borker name three-scale
[INFO] Created DeploymentConfig: target/fabric8/applyJson/3scale-service-borker/deploymentconfig-three-scale.json
[INFO] F8: HINT: Use the command `oc get pods -w` to watch your pods start up
oc create -f broker-sqlite-pvc.yml

Pod is running ok

oc get po
NAME                      READY     STATUS      RESTARTS   AGE
three-scale-1-bj6jl       1/1       Running     0          23m
three-scale-s2i-1-build   0/1       Completed   0          25m

However, the catalog can't retrieve the list of items from the broker. Looks like the host is incorrect, or maybe I have some dns isssue. Any tips?

oc describe clusterservicebroker 3scale-broker
Name:       3scale-broker
Namespace:  
Labels:     <none>
Annotations:    <none>
API Version:    servicecatalog.k8s.io/v1beta1
Kind:       ClusterServiceBroker
Metadata:
  Creation Timestamp:   2017-12-19T14:11:57Z
  Finalizers:
    kubernetes-incubator/service-catalog
  Generation:       1
  Resource Version: 77
  Self Link:        /apis/servicecatalog.k8s.io/v1beta1/clusterservicebrokers/3scale-broker
  UID:          92b5f369-e4c6-11e7-81ad-0242ac110002
Spec:
  Relist Behavior:  Duration
  Relist Duration:  15m0s
  Relist Requests:  0
  URL:          http://three-scale.3scale-service-broker.svc.cluster.local:8080
Status:
  Conditions:
    Last Transition Time:   2017-12-19T14:11:57Z
    Message:            Error fetching catalog. Error getting broker catalog: Get http://three-scale.3scale-service-broker.svc.cluster.local:8080/v2/catalog: dial tcp: lookup three-scale.3scale-service-broker.svc.cluster.local: no such host
    Reason:         ErrorFetchingCatalog
    Status:         False
    Type:           Ready
  Operation Start Time:     2017-12-19T14:11:57Z
  Reconciled Generation:    0
Events:
  FirstSeen LastSeen    Count   From                    SubObjectPath   Type        Reason      Message
  --------- --------    -----   ----                    -------------   --------    ------      -------
  15m       5m      47  service-catalog-controller-manager          Warning     ErrorFetchingCatalog    Error getting broker catalog: Get http://three-scale.3scale-service-broker.svc.cluster.local:8080/v2/catalog: dial tcp: lookup three-scale.3scale-service-broker.svc.cluster.local: no such host
calvinzhuca commented 6 years ago

David,

The code u tried might be old, it might contain hard-coded 3scale AMP host name, the latest code move the 3scale AMP host to the Config Catalog broker, which will ask you to input the value when you first run the broker from OCP 3.7 console for the 1st time, then it will store the value into sqlite db on PV. (of course in your environment you should have a 3scale AMP installation for the broker to pointing to.)You may want to try that and let me know the result. Let me know if you have any questions, u can just email me directly.

Calvin