<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TechSaumya Blogs]]></title><description><![CDATA[TechSaumya Blogs]]></description><link>https://blog.techsaumya.in</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1735542346031/9154dbea-ba35-4d9e-b3a2-4003530da636.png</url><title>TechSaumya Blogs</title><link>https://blog.techsaumya.in</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 17:33:05 GMT</lastBuildDate><atom:link href="https://blog.techsaumya.in/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Step-by-Step Guide: Running Kafka Producers and Consumers on Oracle Cloud VPS with Databricks]]></title><description><![CDATA[In a recent Big Data Analytics lab assignment, we were tasked with ingesting (consuming) data into Databricks from an external system. To tackle this challenge, I explored setting up data producers on a cloud server—leveraging the fact that these ser...]]></description><link>https://blog.techsaumya.in/kafka-on-oracle-vps-with-databricks</link><guid isPermaLink="true">https://blog.techsaumya.in/kafka-on-oracle-vps-with-databricks</guid><category><![CDATA[kafka]]></category><category><![CDATA[Databricks]]></category><category><![CDATA[Oracle]]></category><category><![CDATA[vps]]></category><category><![CDATA[producer consumer]]></category><category><![CDATA[kafka topic]]></category><dc:creator><![CDATA[Saumya Talwani]]></dc:creator><pubDate>Tue, 10 Jun 2025 04:30:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1749015741977/ba76cf41-bc82-4895-9614-2ee08d1b105f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In a recent Big Data Analytics lab assignment, we were tasked with ingesting (consuming) data into Databricks from an external system. To tackle this challenge, I explored setting up data producers on a cloud server—leveraging the fact that these servers already have public IPs, making external communication much easier. After diving deep into configurations and testing, I put together this concise guide to help others set up a similar pipeline efficiently.</p>
<h2 id="heading-allow-external-connections-on-your-vps">Allow External Connections on Your VPS</h2>
<p>First, we need to enable external connections on our VPS. I’ve already covered that in a separate guide, which you can refer to here.</p>
<h2 id="heading-setting-up-your-server">Setting Up Your Server</h2>
<ol>
<li><p>Login to your Linux Server using SSH</p>
</li>
<li><p>Install Java</p>
<pre><code class="lang-bash"> sudo apt install default-jdk
</code></pre>
</li>
<li><p>Download Kafka</p>
<pre><code class="lang-bash"> wget https://archive.apache.org/dist/kafka/3.2.0/kafka_2.12-3.2.0.tgz
 tar -xzf kafka_2.12-3.2.0.tgz
 sudo mv kafka_2.12-3.4.0 /usr/<span class="hljs-built_in">local</span>/kafka
</code></pre>
</li>
<li><p>Create Sytem file units</p>
<pre><code class="lang-bash"> nano /etc/systemd/system/zookeeper.service
</code></pre>
<pre><code class="lang-plaintext"> [Unit]
 Description=Apache Zookeeper server
 Documentation=http://zookeeper.apache.org
 Requires=network.target remote-fs.target
 After=network.target remote-fs.target

 [Service]
 Type=simple
 ExecStart=/usr/local/kafka/bin/zookeeper-server-start.sh /usr/local/kafka/config/zookeeper.properties
 ExecStop=/usr/local/kafka/bin/zookeeper-server-stop.sh
 Restart=on-abnormal

 [Install]
 WantedBy=multi-user.target
</code></pre>
<pre><code class="lang-bash"> nano /etc/systemd/system/kafka.service
</code></pre>
<pre><code class="lang-plaintext"> [Unit]
 Description=Apache Kafka Server
 Documentation=http://kafka.apache.org/documentation.html
 Requires=zookeeper.service

 [Service]
 Type=simple
 Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk-arm64"
 ExecStart=/usr/local/kafka/bin/kafka-server-start.sh /usr/local/kafka/config/server.properties
 ExecStop=/usr/local/kafka/bin/kafka-server-stop.sh

 [Install]
 WantedBy=multi-user.target
</code></pre>
<p> Modify your java path in Environemt="JAVA_HOME=&lt;Your_Path&gt;“ as required. You can find it using</p>
<pre><code class="lang-bash"> readlink -f $(<span class="hljs-built_in">which</span> java)
</code></pre>
</li>
<li><p>Modify server config</p>
<pre><code class="lang-bash"> nano /usr/<span class="hljs-built_in">local</span>/kafka/config/server.properties
</code></pre>
<p> Paste the following under Socket Server Settings.</p>
<pre><code class="lang-plaintext"> listeners=PLAINTEXT://0.0.0.0:9092,PLAINTEXT_EXTERNAL://0.0.0.0:9093
 advertised.listeners=PLAINTEXT://localhost:9092,PLAINTEXT_EXTERNAL://&lt;YOUR_PUBLIC_IP&gt;:9093
 listener.security.protocol.map=PLAINTEXT:PLAINTEXT,PLAINTEXT_EXTERNAL:PLAINTEXT
</code></pre>
<p> replace &lt;YOUR_PUBLIC_IP&gt; with the public IP above.</p>
</li>
<li><p>Reload <code>systemd daemon</code></p>
<pre><code class="lang-bash"> sudo systemctl daemon-reload
</code></pre>
</li>
<li><p>Start zookeeper &amp; kafka server</p>
<pre><code class="lang-bash"> sudo systemctl start zookeeper
 sudo systemctl start kafka
 sudo systemctl status kafka
</code></pre>
</li>
<li><p>Create a Topic</p>
<pre><code class="lang-bash"> usr/<span class="hljs-built_in">local</span>/kafka/bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic myTopic
</code></pre>
</li>
</ol>
<h2 id="heading-on-databricks">On Databricks</h2>
<p>Create a new notebook after initializing a cluster, create the following cells</p>
<pre><code class="lang-python">%sh
java -version
</code></pre>
<pre><code class="lang-python">%sh
wget https://archive.apache.org/dist/kafka/<span class="hljs-number">3.2</span><span class="hljs-number">.0</span>/kafka_2<span class="hljs-number">.12</span><span class="hljs-number">-3.2</span><span class="hljs-number">.0</span>.tgz
ls -ltr ./
</code></pre>
<pre><code class="lang-python">%sh
tar -xzf kafka_2<span class="hljs-number">.12</span><span class="hljs-number">-3.2</span><span class="hljs-number">.0</span>.tgz
</code></pre>
<pre><code class="lang-python">%sh
cd kafka_2<span class="hljs-number">.12</span><span class="hljs-number">-3.2</span><span class="hljs-number">.0</span>
bin/kafka-console-consumer.sh --topic myTopic --bootstrap-server &lt;YOUR_PUBLIC_IP&gt;:<span class="hljs-number">9093</span>
</code></pre>
<p>replace &lt;YOUR_PUBLIC_IP&gt; with the public IP above.</p>
]]></content:encoded></item><item><title><![CDATA[How to Allow External Connections to Your Server on Oracle Cloud (Step-by-Step Guide)]]></title><description><![CDATA[Recently, I had to configure my server on Oracle Cloud. I had previously configured ports 443 and 80 for HTTPS traffic, but this time I needed to allow incoming connections on port 9093 for Kafka.
Naturally, I forgot how I had done this a year ago—be...]]></description><link>https://blog.techsaumya.in/external-connections-oracle-vps</link><guid isPermaLink="true">https://blog.techsaumya.in/external-connections-oracle-vps</guid><category><![CDATA[Cloud]]></category><category><![CDATA[vps]]></category><category><![CDATA[Oracle]]></category><category><![CDATA[Oraclecloudinfrastructure]]></category><category><![CDATA[networking]]></category><dc:creator><![CDATA[Saumya Talwani]]></dc:creator><pubDate>Wed, 04 Jun 2025 05:46:14 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1744810805379/4162f778-b945-460d-8ec0-1e726a341879.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Recently, I had to configure my server on Oracle Cloud. I had previously configured ports 443 and 80 for HTTPS traffic, but this time I needed to allow incoming connections on port <strong>9093</strong> for Kafka.</p>
<p>Naturally, I forgot how I had done this a year ago—because, of course, who remembers such things after that long? So I did what anyone would do: started Googling all over again.</p>
<p>I figured this would be the simplest way to keep track of documentation I might need later—so here we are. This is a quick, no-nonsense guide for future-me (and maybe even future-you) on how to allow external traffic to a specific port on an Oracle Cloud VPS.</p>
<ol>
<li><p>Open Oracle Cloud Console</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748933502337/9c1a4f14-46db-49c0-b255-26628bc12340.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Go to VCN</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748933578597/14986120-ae26-494f-b8e4-75d16072cccb.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Select the VCN in which the current server is configured.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748933586287/620a559c-e96e-44c9-a308-2f2dfaa13599.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Select the subnet in which the current server is configured.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748933616692/ffc5fcc4-0550-45aa-92e8-d85bb6cf3e3b.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Select the Default Security List for <code>vcn-name</code> , where vcn-name would be the name of your VCN.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748933611892/546660e4-f6e3-4d67-a43e-eae8f63ceac1.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Click on Add Ingress Rules and enter the following:</p>
<p> <code>Source CIDR</code> : 0.0.0.0/0 (allow all)</p>
<p> <code>Destination Port Range</code> : 9093</p>
<p> <code>IP Protocol</code> : TCP</p>
<p> <code>Description</code> : Kafka ( or anything you would like to write so that you remember which service you have reserved the port for )</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748933636879/71268b04-4c3f-4326-85a3-e0670695ae80.png" alt class="image--center mx-auto" /></p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748933640548/e2b72ed2-d132-40a0-a6f3-400602097bcc.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Now Log on to your Server using SSH and Allow port 9093 to accept TCP Connections on port 9093 on the Firewall. (Oracle Cloud Infrastructure Ubuntu Installations use <code>iptables</code> by default )</p>
</li>
</ol>
<pre><code class="lang-bash">sudo iptables -A INPUT -p tcp --dport 9093 -j ACCEPT
</code></pre>
]]></content:encoded></item></channel></rss>