<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Init Script Failing in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74728#M34785</link>
    <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102253"&gt;@jacovangelder&lt;/a&gt;&amp;nbsp; That does not seem to do it for me either. I have updated the location of the init script to be a workspace location rather than DBFS.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2024 21:40:58 GMT</pubDate>
    <dc:creator>semsim</dc:creator>
    <dc:date>2024-06-17T21:40:58Z</dc:date>
    <item>
      <title>Init Script Failing</title>
      <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74075#M34714</link>
      <description>&lt;P&gt;I am getting an error when I try to run the cluster scoped init script. The script itself is as follows:&lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;/P&gt;&lt;P&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade -y&lt;/P&gt;&lt;P&gt;sudo apt install libreoffice-common libreoffice-java-common libreoffice-writer openjdk-8-jre-headless -y&lt;/P&gt;&lt;P&gt;below you can find the error message:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Init script failure&lt;/STRONG&gt;&lt;SPAN&gt;:&lt;BR /&gt;Cluster scoped init script &amp;lt;path to .sh file&amp;gt; failed: Script exit status is non-zero&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've tried uploading the .sh via databricks CLI. I have also read about enabling logging which would be nice to get some help with.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your help and time.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 20:06:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74075#M34714</guid>
      <dc:creator>semsim</dc:creator>
      <dc:date>2024-06-14T20:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Init Script Failing</title>
      <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74104#M34727</link>
      <description>&lt;P&gt;It is failing with exit status non-zero, which means the issue is in the init script file; please ensure there are no control-m chars in your init script sh file. you can run&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;dos2unix &amp;lt;init_scrip_shell_file&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;or manually remove control-m chars in vi editor and upload. It should work.&lt;/P&gt;
&lt;P&gt;Ideally, It&lt;SPAN&gt;&amp;nbsp;is recommended to use custom compute cluster policies for any library installation instead of init scripts.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 04:43:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74104#M34727</guid>
      <dc:creator>SashankKotta</dc:creator>
      <dc:date>2024-06-15T04:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Init Script Failing</title>
      <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74288#M34737</link>
      <description>&lt;P&gt;Most likely your init script has windows line endings.&lt;BR /&gt;Open it in VSCode and change the line endings to Unix (LF) line endings.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 18:47:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74288#M34737</guid>
      <dc:creator>jacovangelder</dc:creator>
      <dc:date>2024-06-15T18:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Init Script Failing</title>
      <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74685#M34777</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102253"&gt;@jacovangelder&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/108479"&gt;@SashankKotta&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Is that all it could be? I've double checked the line endings and it is LF with no ^M chars. I took the file directly from WSL and uploaded it to DBFS.and it is still failing with a non-zero exit status.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 17:38:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74685#M34777</guid>
      <dc:creator>semsim</dc:creator>
      <dc:date>2024-06-17T17:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Init Script Failing</title>
      <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74688#M34778</link>
      <description>&lt;P&gt;Did some debugging for you. It works for me using this&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#!/bin/bash

sudo apt update &amp;amp;&amp;amp; sudo apt upgrade -y
sudo apt-get install libreoffice-common libreoffice-java-common libreoffice-writer openjdk-8-jre-headless -y&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;Not sure why apt get works and apt install doesn't&lt;BR /&gt;&lt;/SPAN&gt;Btw,&amp;nbsp;Init scripts on DBFS are being deprecated any moment now. Best update to Workspace files or a UC volume.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 18:19:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74688#M34778</guid>
      <dc:creator>jacovangelder</dc:creator>
      <dc:date>2024-06-17T18:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Init Script Failing</title>
      <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74728#M34785</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102253"&gt;@jacovangelder&lt;/a&gt;&amp;nbsp; That does not seem to do it for me either. I have updated the location of the init script to be a workspace location rather than DBFS.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 21:40:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74728#M34785</guid>
      <dc:creator>semsim</dc:creator>
      <dc:date>2024-06-17T21:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Init Script Failing</title>
      <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74791#M34789</link>
      <description>&lt;P&gt;You're right, it doesn't work. Not sure why my cluster was showing up as running last night, most likely something caching related. I'll try to jump into it at some later point if I have some time. Very strange!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 06:23:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/74791#M34789</guid>
      <dc:creator>jacovangelder</dc:creator>
      <dc:date>2024-06-18T06:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Init Script Failing</title>
      <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/75208#M34893</link>
      <description>&lt;P&gt;Could you elaborate on the caching idea?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 13:43:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/75208#M34893</guid>
      <dc:creator>semsim</dc:creator>
      <dc:date>2024-06-20T13:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Init Script Failing</title>
      <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/75353#M34945</link>
      <description>&lt;P&gt;The following code solved my problem:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sudo rm -r /var/lib/apt/lists/* 
sudo apt clean &amp;amp;&amp;amp; sudo apt update --fix-missing -y
*add apt statement for library you're trying to install*&lt;/LI-CODE&gt;&lt;P&gt;This allowed me to successfully spin up the cluster every time using init scripts.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 13:53:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/75353#M34945</guid>
      <dc:creator>semsim</dc:creator>
      <dc:date>2024-06-21T13:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Init Script Failing</title>
      <link>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/91514#M38182</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/104721"&gt;@semsim&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102253"&gt;@jacovangelder&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I added the code you mentioned at the beginning of the script, but I still got errors.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#!/bin/bash
sudo rm -r /var/lib/apt/lists/* 
sudo apt clean &amp;amp;&amp;amp; sudo apt update --fix-missing -y
if ! [[ "18.04 20.04 22.04 23.04 24.04" == *"$(lsb_release -rs)"* ]];
then
    echo "Ubuntu $(lsb_release -rs) is not currently supported.";
    exit;
fi

# Add the signature to trust the Microsoft repo
# For Ubuntu versions &amp;lt; 24.04 
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
# For Ubuntu versions &amp;gt;= 24.04
curl https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg

# Add repo to apt sources
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list

# Install the driver
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools18
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' &amp;gt;&amp;gt; ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo apt-get install -y unixodbc-dev

sudo apt-get install python3-pip -y
pip3 install --upgrade pyodbc&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error msg : Script exit status is non-zero.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zmsoft_0-1727158072557.png" style="width: 566px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/11444i8E667C039F708891/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zmsoft_0-1727158072557.png" alt="zmsoft_0-1727158072557.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 06:12:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/init-script-failing/m-p/91514#M38182</guid>
      <dc:creator>zmsoft</dc:creator>
      <dc:date>2024-09-24T06:12:06Z</dc:date>
    </item>
  </channel>
</rss>

