2018-06-14 13:49:59 UTC - Karthik Palanivelu: @Sijie Guo @Matteo Merli Can you please let me know what would be the hostname for the client.conf when I have a container within k8s, I am using the broker.yaml to install pulsar-admin? Advertised Address points to the PodIp. Does it look like `<https://broker:8443/>`? broker being my service name ---- 2018-06-14 15:33:22 UTC - Sijie Guo: @Karthikeyan Palanivelu yes that looks correct to me ---- 2018-06-14 15:47:29 UTC - Karthik Palanivelu: Cool Thanks @Sijie Guo ---- 2018-06-14 16:26:37 UTC - Matteo Merli: @Victor Li replied on <https://github.com/apache/incubator-pulsar/issues/1964#issuecomment-397355673> . tl;dr: `-DLINK_STATIC` is used to build a fat `libpulsar.so` that contains all the dependencies. These dependencies need to be compiled with `-fPIC` for this to work. We have docker images with right set of dependencies. ---- 2018-06-14 16:31:49 UTC - Victor Li: @Matteo Merli I can try with the centos-7 build image. In addition, is there a Dockerfile to build the centos-7 image? ---- 2018-06-14 16:32:39 UTC - Matteo Merli: It is in the PR at <https://github.com/apache/incubator-pulsar/pull/1963> . I’m fixing some details on the RPM spec before merging ---- 2018-06-14 16:33:01 UTC - Matteo Merli: <https://github.com/merlimat/pulsar/blob/4adde7444479b23a02bf0c95e1e623cd03d93598/pulsar-client-cpp/pkg/rpm/Dockerfile> ---- 2018-06-14 16:36:15 UTC - Victor Li: Thanks! @Matteo Merli ---- 2018-06-14 16:37:05 UTC - Victor Li: In the meantime I am not going to use static link, will try with the centos-7 build after your changes are merged. ---- 2018-06-14 16:40:16 UTC - Matteo Merli: Sure. In any case the image is already available on docker hub, you can just pull `apachepulsar/pulsar-build:centos-7` ---- 2018-06-14 16:55:44 UTC - Karthik Palanivelu: @Sijie Guo @Matteo Merli Can you please help me here? Below is my Proxy.Yaml. ```
## ## Expose all nodes on port so that you can reach cluster from outside k8 ## apiVersion: v1 kind: Service metadata: name: proxy labels: app: pulsar component: proxy spec: type: NodePort ports: - name: http nodePort: 31000 port: 8080 protocol: TCP - name: https nodePort: 31001 port: 8443 protocol: TCP - name: tcp nodePort: 31002 port: 6650 protocol: TCP - name: tcp2 nodePort: 31003 port: 6651 protocol: TCP selector: app: pulsar component: proxy --- ``` Below is my NodePort on K8s: ``` $ kca get svc proxy NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE proxy NodePort XX.0.XXX.XX <none> 8080:31000/TCP,8443:31001/TCP,6650:31002/TCP,6651:31003/TCP 2h ``` When I access broker like `<pulsar+ssl://XX.0.XXX.XX:31003/>` is getting connect exception. ---- 2018-06-14 16:58:19 UTC - Ali Ahmed: do you have logs ? ---- 2018-06-14 16:58:41 UTC - Ali Ahmed: are you accessing the pulsar cluster from outside via cluster ip ? ---- 2018-06-14 17:00:48 UTC - Karthik Palanivelu: Yes I am accessing from outside...My K8s is in AWS and I am trying to connect to it from my laptop ---- 2018-06-14 17:01:26 UTC - Karthik Palanivelu: Its a Connection Timed Out ---- 2018-06-14 17:01:54 UTC - Ali Ahmed: you have no external ip ---- 2018-06-14 17:02:10 UTC - Ali Ahmed: cluster ip is internal to k8 ---- 2018-06-14 17:02:15 UTC - Karthik Palanivelu: How do I Create it based on the yaml ---- 2018-06-14 17:03:09 UTC - Ali Ahmed: it depends on your k8 env, generally a load balancer will get associated ---- 2018-06-14 17:03:30 UTC - Ali Ahmed: but in that case nodeport may not be the best option ---- 2018-06-14 17:03:37 UTC - Karthik Palanivelu: I have a ELB created for Worker, Master and etcd ---- 2018-06-14 17:03:57 UTC - Karthik Palanivelu: I am following the yamls in the codebase ---- 2018-06-14 17:04:07 UTC - Karthik Palanivelu: to create this within k8s ---- 2018-06-14 17:04:18 UTC - Karthik Palanivelu: Can you please direct me? ---- 2018-06-14 17:04:18 UTC - Ali Ahmed: did you deploy k8 yourself or are using the aws eks service ? ---- 2018-06-14 17:04:37 UTC - Karthik Palanivelu: Ourself within our company ---- 2018-06-14 17:05:07 UTC - Ali Ahmed: ok let me find some instructions ---- 2018-06-14 17:05:32 UTC - Sijie Guo: @Karthikeyan Palanivelu if the k8 workers are already behind ELB, what you can do in proxies is to set advertisedAdress to use hostIP and export hostPort ---- 2018-06-14 17:07:38 UTC - Karthik Palanivelu: @Sijie Guo are you referring to the below config, `broker` being my service: ``` brokerServiceURL=<pulsar://broker:6650> brokerServiceURLTLS=<pulsar+ssl://broker:6651> ``` ---- 2018-06-14 17:11:39 UTC - Sijie Guo: actually I think I misunderstood your question. your question is your are trying to connect to one proxy via direct ip? pulsar://<ip>:<forwarded_port> ---- 2018-06-14 17:11:48 UTC - Sijie Guo: and you can’t connect ---- 2018-06-14 17:12:40 UTC - Karthik Palanivelu: True, I have a proxy service which I am trying to connect which inturn connects to my broker. ---- 2018-06-14 17:12:49 UTC - Karthik Palanivelu: I shared the yaml and proxy svc ---- 2018-06-14 17:12:52 UTC - Karthik Palanivelu: above ---- 2018-06-14 17:13:04 UTC - Sijie Guo: yeah. just realized that ---- 2018-06-14 17:18:39 UTC - Sijie Guo: @Karthikeyan Palanivelu can you do a few things: - can you make sure if port 31002 / 31003 are open to be accessed outside? e.g. can you try telnet the port “telnet <ip> 31003”? - if you can access the port, try to check the proxy log. “kubectl logs <proxy-pod-id>“? ---- 2018-06-14 17:20:41 UTC - Karthik Palanivelu: Can you please let me know which IP I should use ---- 2018-06-14 17:21:57 UTC - Ali Ahmed: the ip for the elb pointing to the workers or a public ip of a single worker if available ---- 2018-06-14 17:22:18 UTC - Karthik Palanivelu: oh ok.. ---- 2018-06-14 17:22:36 UTC - Sijie Guo: <pulsar+ssl://XX.0.XXX.XX:31003/> or the one you used in the service url ---- 2018-06-14 17:23:19 UTC - Ali Ahmed: don’t use cluster ip it’s not visible from outside ---- 2018-06-14 17:23:44 UTC - Karthik Palanivelu: Cool Got it. Let me try from Worker IP ---- 2018-06-14 18:00:14 UTC - Karthik Palanivelu: @Ali Ahmed @Sijie Guo Probably I have a limitation with Security Group, I will resolve it and will get back to you ---- 2018-06-14 18:00:58 UTC - Sijie Guo: @Karthik Palanivelu sure. ----