From user-return-11601-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Wed Aug 8 12:07:44 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A305F180600 for ; Wed, 8 Aug 2018 12:07:43 +0200 (CEST) Received: (qmail 58375 invoked by uid 500); 8 Aug 2018 10:07:42 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 58361 invoked by uid 99); 8 Aug 2018 10:07:41 -0000 Received: from ui-eu-01.ponee.io (HELO localhost) (176.9.59.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2018 10:07:41 +0000 Content-Type: text/plain; charset=utf-8 Date: Wed, 08 Aug 2018 10:07:39 -0000 Subject: Zookeeper 3.4.12 c client fails to connect to server on solaris 11 Message-ID: From: ashwinikgj@gmail.com References: x-ponymail-sender: 0b3014a2657a4316a1ad163b1e783acbff08e987 X-Mailer: LuaSocket 3.0-rc1 MIME-Version: 1.0 To: In-Reply-To: x-ponymail-agent: PonyMail Composer/0.3 Hi team, I compiled zookeeper 3.4.12 c client on solaris 11 machine and trying to test it through cli.sh. Here is the sample code that I changed in cli.c. Whenever I run the ./cli_mt file it always throws below error 2018-08-08 09:49:44,437:18000(0x2):ZOO_ERROR@handle_socket_error_msg@1670: Socket [10.272.80.184:4831] zk retcode=-4, errno=0(Error 0): connect() call failed. Anybody facing same issue?. --------------------------------------------------------------------------------------------------------------------------- cli.c file ---------------- int main(int argc, char **argv) { #ifndef THREADED fd_set rfds, wfds, efds; int processed=0; #endif char p[2048]; #ifdef YCA char *cert=0; char appId[64]; #endif char buffer[4096]; int bufoff; //FILE *fh; struct Stat stat; int buflen= sizeof(buffer); int rc; verbose = 0; zoo_set_debug_level(ZOO_LOG_LEVEL_WARN); zoo_deterministic_conn_order(1); // enable deterministic order hostPort = argv[1]; printf("\n%s\n", "Lets connect"); zh = zookeeper_init("sld06hzt:4831", watcher, 30000, &myid, 0, 0); if (!zh) { printf("\n%d\n", errno); return errno; } strcpy(p,"sadmin:ldap"); zoo_add_auth(zh,"digest",p,strlen(p),0,0); rc = zoo_get(zh, "/test", 0, buffer, &buflen, &stat); if (rc) { printf("\n%s\n", buffer); } zookeeper_close(zh); return 2; } Regards, Ashwini.