{"id":72,"date":"2023-03-09T10:49:33","date_gmt":"2023-03-09T08:49:33","guid":{"rendered":"https:\/\/dilyan.be\/?p=72"},"modified":"2023-03-31T10:33:09","modified_gmt":"2023-03-31T08:33:09","slug":"few-specifics-in-running-postgresql-mongodb-neo4j-and-elk-in-freebsd-13-1-jails","status":"publish","type":"post","link":"https:\/\/dilyan.be\/?p=72","title":{"rendered":"Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails"},"content":{"rendered":"<p>As a note to myself and to save the time in troubleshooting and chasing issues, few specifics to make the below services run in jail environment under FreeBSD 13.1.<\/p>\n<p>First, the generic options:<code><br \/>\n# cat \/etc\/jail.conf<br \/>\nallow.raw_sockets = 1;<br \/>\nallow.set_hostname = 1;<br \/>\nallow.sysvipc = 1;<br \/>\nmount.devfs;                               # Mount devfs inside the jail<br \/>\nexec.start = \"\/bin\/sh \/etc\/rc\";            # Start command<br \/>\nexec.stop = \"\/bin\/sh \/etc\/rc.shutdown\";    # Stop command<br \/>\n<\/code><\/p>\n<p>1. PostgreSQL: few parameters need to be set in the jail.conf &#8211; sysvshm, sysvsem, sysvmsg<code><br \/>\npostgres {<br \/>\nhost.hostname = postgres.dilyan.be;        # Hostname<br \/>\nip4.addr = 192.168.3.117;                  # IP address of the jail<br \/>\npath = \"\/zroot\/jails\/postgres\";            # Path to the jail<br \/>\nsysvshm = new;<br \/>\nsysvsem = new;<br \/>\nsysvmsg = new;<br \/>\n}<br \/>\n<\/code><\/p>\n<p>2. MongoDB: all it needs is allow.mlock in the jail definition<code><br \/>\nmongodb {<br \/>\nhost.hostname = mongodb.dilyan.be;         # Hostname<br \/>\nip4.addr = 192.168.3.118;                  # IP address of the jail<br \/>\npath = \"\/zroot\/jails\/mongodb\";             # Path to the jail<br \/>\nallow.mlock;<br \/>\n}<br \/>\n<\/code><\/p>\n<p>3. Neo4j: due to the java you need to specify how to mount the local fstab<code><br \/>\nneo4j {<\/code><code><br \/>\nhost.hostname = neo4j.dilyan.be;                            # Hostname<br \/>\nip4.addr = 192.168.3.121;                                   # IP address of the jail<br \/>\npath = \"\/zroot\/jails\/neo4j\";                                # Path to the jail<br \/>\nmount.fstab=\"\/zroot\/jails\/neo4j\/etc\/fstab.neo4j\";\t\t# mount local fstab for the java<br \/>\n}<br \/>\n<\/code><\/p>\n<p>the content of the fstab in the jail is:<\/p>\n<p>fdesc \/dev\/fd fdescfs rw 0 0<br \/>\nproc \/proc procfs rw 0 0<\/p>\n<p>4. Elastic Search and Kibana (ELK stack): same as for the Neo4j &#8211; you need to specify how to mount the local fstab<\/p>\n<p><code><br \/>\nelk {<br \/>\nhost.hostname = elk.dilyan.be;                           # Hostname<br \/>\nip4.addr = 192.168.3.122;                                # IP address of the jail<br \/>\npath = \"\/zroot\/jails\/elk\";                               # Path to the jail<br \/>\nmount.fstab=\"\/zroot\/jails\/elk\/etc\/fstab.java\";           # mount local fstab for the java<br \/>\n}<br \/>\n<\/code><\/p>\n<p>cat \/zroot\/jails\/elk\/etc\/fstab.java<br \/>\nfdesc \/dev\/fd fdescfs rw 0 0<br \/>\nproc \/proc procfs rw 0 0<\/p>\n<p>The rest of the service I ran in jails have no particularities in the defitionions &#8211; Apache, wikimedia, Django, OpenVPN<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a note to myself and to save the time in troubleshooting and chasing issues, few specifics to make the below services run in jail environment under FreeBSD 13.1. First, the generic options: # cat \/etc\/jail.conf allow.raw_sockets = 1; allow.set_hostname = 1; allow.sysvipc = 1; mount.devfs; # Mount devfs inside the jail exec.start = &#8220;\/bin\/sh [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-72","post","type-post","status-publish","format-standard","hentry","category-bsd"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails - dilyan.be<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dilyan.be\/?p=72\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails - dilyan.be\" \/>\n<meta property=\"og:description\" content=\"As a note to myself and to save the time in troubleshooting and chasing issues, few specifics to make the below services run in jail environment under FreeBSD 13.1. First, the generic options: # cat \/etc\/jail.conf allow.raw_sockets = 1; allow.set_hostname = 1; allow.sysvipc = 1; mount.devfs; # Mount devfs inside the jail exec.start = &quot;\/bin\/sh [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dilyan.be\/?p=72\" \/>\n<meta property=\"og:site_name\" content=\"dilyan.be\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-09T08:49:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-31T08:33:09+00:00\" \/>\n<meta name=\"author\" content=\"dilyan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dilyan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/dilyan.be\\\/?p=72#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dilyan.be\\\/?p=72\"},\"author\":{\"name\":\"dilyan\",\"@id\":\"https:\\\/\\\/dilyan.be\\\/#\\\/schema\\\/person\\\/5d995599960773a9e6162910b0fb6c6d\"},\"headline\":\"Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails\",\"datePublished\":\"2023-03-09T08:49:33+00:00\",\"dateModified\":\"2023-03-31T08:33:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/dilyan.be\\\/?p=72\"},\"wordCount\":164,\"articleSection\":[\"BSD\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/dilyan.be\\\/?p=72\",\"url\":\"https:\\\/\\\/dilyan.be\\\/?p=72\",\"name\":\"Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails - dilyan.be\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dilyan.be\\\/#website\"},\"datePublished\":\"2023-03-09T08:49:33+00:00\",\"dateModified\":\"2023-03-31T08:33:09+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/dilyan.be\\\/#\\\/schema\\\/person\\\/5d995599960773a9e6162910b0fb6c6d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/dilyan.be\\\/?p=72#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/dilyan.be\\\/?p=72\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/dilyan.be\\\/?p=72#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/dilyan.be\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/dilyan.be\\\/#website\",\"url\":\"https:\\\/\\\/dilyan.be\\\/\",\"name\":\"dilyan.be\",\"description\":\"Dilyan Berkovski&#039;s site\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/dilyan.be\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/dilyan.be\\\/#\\\/schema\\\/person\\\/5d995599960773a9e6162910b0fb6c6d\",\"name\":\"dilyan\",\"sameAs\":[\"https:\\\/\\\/dilyan.be\"],\"url\":\"https:\\\/\\\/dilyan.be\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails - dilyan.be","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dilyan.be\/?p=72","og_locale":"en_US","og_type":"article","og_title":"Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails - dilyan.be","og_description":"As a note to myself and to save the time in troubleshooting and chasing issues, few specifics to make the below services run in jail environment under FreeBSD 13.1. First, the generic options: # cat \/etc\/jail.conf allow.raw_sockets = 1; allow.set_hostname = 1; allow.sysvipc = 1; mount.devfs; # Mount devfs inside the jail exec.start = \"\/bin\/sh [&hellip;]","og_url":"https:\/\/dilyan.be\/?p=72","og_site_name":"dilyan.be","article_published_time":"2023-03-09T08:49:33+00:00","article_modified_time":"2023-03-31T08:33:09+00:00","author":"dilyan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"dilyan","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dilyan.be\/?p=72#article","isPartOf":{"@id":"https:\/\/dilyan.be\/?p=72"},"author":{"name":"dilyan","@id":"https:\/\/dilyan.be\/#\/schema\/person\/5d995599960773a9e6162910b0fb6c6d"},"headline":"Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails","datePublished":"2023-03-09T08:49:33+00:00","dateModified":"2023-03-31T08:33:09+00:00","mainEntityOfPage":{"@id":"https:\/\/dilyan.be\/?p=72"},"wordCount":164,"articleSection":["BSD"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/dilyan.be\/?p=72","url":"https:\/\/dilyan.be\/?p=72","name":"Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails - dilyan.be","isPartOf":{"@id":"https:\/\/dilyan.be\/#website"},"datePublished":"2023-03-09T08:49:33+00:00","dateModified":"2023-03-31T08:33:09+00:00","author":{"@id":"https:\/\/dilyan.be\/#\/schema\/person\/5d995599960773a9e6162910b0fb6c6d"},"breadcrumb":{"@id":"https:\/\/dilyan.be\/?p=72#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dilyan.be\/?p=72"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dilyan.be\/?p=72#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dilyan.be\/"},{"@type":"ListItem","position":2,"name":"Few specifics in running PostgreSQL, MongoDB, Neo4j and ELK in FreeBSD 13.1 jails"}]},{"@type":"WebSite","@id":"https:\/\/dilyan.be\/#website","url":"https:\/\/dilyan.be\/","name":"dilyan.be","description":"Dilyan Berkovski&#039;s site","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dilyan.be\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/dilyan.be\/#\/schema\/person\/5d995599960773a9e6162910b0fb6c6d","name":"dilyan","sameAs":["https:\/\/dilyan.be"],"url":"https:\/\/dilyan.be\/?author=1"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/posts\/72","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dilyan.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=72"}],"version-history":[{"count":4,"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/posts\/72\/revisions"}],"predecessor-version":[{"id":77,"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/posts\/72\/revisions\/77"}],"wp:attachment":[{"href":"https:\/\/dilyan.be\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dilyan.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dilyan.be\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}