From owner-freebsd-questions@FreeBSD.ORG Fri Oct 31 15:28:27 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BA21F6 for ; Fri, 31 Oct 2014 15:28:27 +0000 (UTC) Received: from webmail.dweimer.net (24-240-198-187.static.stls.mo.charter.com [24.240.198.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "webmail2.dweimer.local", Issuer "webmail2.dweimer.local" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DA06AFD0 for ; Fri, 31 Oct 2014 15:28:26 +0000 (UTC) Received: from www.dweimer.net (webmail [192.168.5.2]) by webmail.dweimer.net (8.14.7/8.14.7) with ESMTP id s9VFD6FS058020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 31 Oct 2014 10:13:07 -0500 (CDT) (envelope-from dweimer@dweimer.net) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 31 Oct 2014 10:13:06 -0500 From: dweimer To: FreeBSD Questions Subject: Unifi3 port Organization: dweimer.net Reply-To: dweimer@dweimer.net Mail-Reply-To: dweimer@dweimer.net Message-ID: <641daafca267f2f21a855abebd4a7c10@dweimer.net> X-Sender: dweimer@dweimer.net User-Agent: Roundcube Webmail/1.0.3 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2014 15:28:27 -0000 I have been running UniFi manually installing it for a while, I just now noticed that there was a port for it, so I decided to give it a try. However I can't get it to successfully start. Despite the fact that it runs fine from my manual installation. After some investigating I have found the source of the problem, but can't figure out a fix. the source appears to stem from running it inside a jail: The mongod instance fails to start after failing to bind to 127.0.0.1, and the socket. 2014-10-31T09:42:50.157-0500 [initandlisten] db version v2.6.5 2014-10-31T09:42:50.157-0500 [initandlisten] git version: nogitversion 2014-10-31T09:42:50.157-0500 [initandlisten] OpenSSL version: OpenSSL 1.0.1j 15 Oct 2014 2014-10-31T09:42:50.157-0500 [initandlisten] build info: FreeBSD unifi.dweimer.local 10.0-RELEASE-p9 FreeBSD 10.0-RELEASE-p9 #1 r271669: Tue Sep 16 11:12:21 CDT 2014 dweimer@freebsd.dweimer.local:/jails/devel/ROOT/usr/obj/jails/devel/ROOT/usr/src/sys/GENERIC amd64 BOOST_LIB_VERSION=1_49 2014-10-31T09:42:50.157-0500 [initandlisten] allocator: system 2014-10-31T09:42:50.157-0500 [initandlisten] options: { net: { bindIp: "127.0.0.1", http: { enabled: false }, port: 27117 }, storage: { dbPath: "/usr/local/share/java/unifi/data/db" }, systemLog: { destination: "file", logAppend: true, path: "logs/mongod.log" } } 2014-10-31T09:42:50.160-0500 [initandlisten] journal dir=/usr/local/share/java/unifi/data/db/journal 2014-10-31T09:42:50.162-0500 [initandlisten] recover : no journal files present, no recovery needed 2014-10-31T09:42:50.352-0500 [initandlisten] ERROR: listen(): bind() failed errno:13 Permission denied for socket: /tmp/mongodb-27117.sock 2014-10-31T09:42:50.358-0500 [initandlisten] now exiting 2014-10-31T09:42:50.358-0500 [initandlisten] dbexit: Oddly enough the java process does try to connect to 10.50.20.5:27117, though there is a delay, I expect it times out first on 127.0.0.1, then the socket before trying this one. When I run it from my manual installation, the mongod service fails to bind to 127.0.0.1, but apparently falls back to the other IPv4 address. 2014-10-31T09:56:59.575-0500 [initandlisten] db version v2.6.5 2014-10-31T09:56:59.575-0500 [initandlisten] git version: nogitversion 2014-10-31T09:56:59.575-0500 [initandlisten] OpenSSL version: OpenSSL 1.0.1j 15 Oct 2014 2014-10-31T09:56:59.575-0500 [initandlisten] build info: FreeBSD unifi.dweimer.local 10.0-RELEASE-p9 FreeBSD 10.0-RELEASE-p9 #1 r271669: Tue Sep 16 11:12:21 CDT 2014 dweimer@freebsd.dweimer.local:/jails/devel/ROOT/usr/obj/jails/devel/ROOT/usr/src/sys/GENERIC amd64 BOOST_LIB_VERSION=1_49 2014-10-31T09:56:59.575-0500 [initandlisten] allocator: system 2014-10-31T09:56:59.575-0500 [initandlisten] options: { net: { bindIp: "127.0.0.1", http: { enabled: false }, port: 27117 }, storage: { dbPath: "/usr/local/unifi/data/db" }, systemLog: { destination: "file", logAppend: true, path: "logs/mongod.log" } } 2014-10-31T09:56:59.708-0500 [initandlisten] journal dir=/usr/local/unifi/data/db/journal 2014-10-31T09:56:59.709-0500 [initandlisten] recover : no journal files present, no recovery needed 2014-10-31T09:57:00.865-0500 [initandlisten] waiting for connections on port 27117 2014-10-31T09:57:00.865-0500 [initandlisten] connection accepted from 10.50.20.2:60829 #1 (1 connection now open) Anyone have any ideas? I tried setting unifi.db.extraargs=--bind_ip 10.50.20.2 In the unifi system.properties file, didn't seem to make a difference. -- Thanks, Dean E. Weimer http://www.dweimer.net/