You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by "Zotti, Ryan J." <Ry...@capitalone.com> on 2015/04/17 00:24:11 UTC

RE: Storm is unable to connect to the network or localhost

I've written a topology in Kafka and Storm. The topology works great until I try to make a Bolt that tries to either connect to the internet (via a restful API) or localhost (MongoDB) -- Storm is not able to connect to either. Does anyone know why this might happen? Is Kafka interfering somehow? For what it's worth, I'm running Kafka and Storm inside a Docker container that is itself run inside a server protected by a proxy server with a strong firewall. What makes this tough to debug is that I'm able to connect to localhost and I'm also able to run the restful API inside the Docker container and firewall when I'm not using Storm. So I'm guessing either Kafka or Storm is causing the issue. When Storm runs, is the process handed off to root? I have proxy settings that are only configured for myself (not root), so it's possible that if the Storm process is handed off to some ID other than my own then my proxy settings would no longer apply, although this shouldn't affect a connection to localhost.

Below is my python Bolt code if anyone is interested.

import storm
import urllib2

class TestBolt(storm.BasicBolt):

    def process(self, tup):
        throw_away_input = str(tup.values[0]).strip()
        response = urllib2.urlopen('http://python.org/')
    html = response.read()
        storm.emit([html])

TestBolt().run()

Thanks,
Ryan

Ryan Zotti
Software Engineer, Enterprise Data Services
804.393.1656
ryan.zotti@capitalone.com<ma...@capitalone.com>

[cid:image001.jpg@01D07872.88A34270]

________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed.  If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Re: Storm is unable to connect to the network or localhost

Posted by Shivendra Singh <SS...@walmartlabs.com>.
Having ip mappings in /etc/hosts is often a remedy for such issues. Maybe it can help.

From: Nathan Leung <nc...@gmail.com>>
Reply-To: "user@storm.apache.org<ma...@storm.apache.org>" <us...@storm.apache.org>>
Date: Thursday, April 16, 2015 at 3:30 PM
To: user <us...@storm.apache.org>>
Subject: Re: Storm is unable to connect to the network or localhost

The storm process is run by the same user that the supervisor is running as.

On Thu, Apr 16, 2015 at 6:24 PM, Zotti, Ryan J. <Ry...@capitalone.com>> wrote:
I've written a topology in Kafka and Storm. The topology works great until I try to make a Bolt that tries to either connect to the internet (via a restful API) or localhost (MongoDB) -- Storm is not able to connect to either. Does anyone know why this might happen? Is Kafka interfering somehow? For what it's worth, I'm running Kafka and Storm inside a Docker container that is itself run inside a server protected by a proxy server with a strong firewall. What makes this tough to debug is that I'm able to connect to localhost and I'm also able to run the restful API inside the Docker container and firewall when I'm not using Storm. So I'm guessing either Kafka or Storm is causing the issue. When Storm runs, is the process handed off to root? I have proxy settings that are only configured for myself (not root), so it’s possible that if the Storm process is handed off to some ID other than my own then my proxy settings would no longer apply, although this shouldn’t affect a connection to localhost.

Below is my python Bolt code if anyone is interested.

import storm
import urllib2

class TestBolt(storm.BasicBolt):

    def process(self, tup):
        throw_away_input = str(tup.values[0]).strip()
        response = urllib2.urlopen('http://python.org/')
    html = response.read()
        storm.emit([html])

TestBolt().run()

Thanks,
Ryan

Ryan Zotti
Software Engineer, Enterprise Data Services
804.393.1656<tel:804.393.1656>
ryan.zotti@capitalone.com<ma...@capitalone.com>

[cid:image001.jpg@01CFA4FA.31511390]


________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed.  If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.


Re: Storm is unable to connect to the network or localhost

Posted by Nathan Leung <nc...@gmail.com>.
The storm process is run by the same user that the supervisor is running as.

On Thu, Apr 16, 2015 at 6:24 PM, Zotti, Ryan J. <Ry...@capitalone.com>
wrote:

> I've written a topology in Kafka and Storm. The topology works great until
> I try to make a Bolt that tries to either connect to the internet (via a
> restful API) or localhost (MongoDB) -- Storm is not able to connect to
> either. Does anyone know why this might happen? Is Kafka interfering
> somehow? For what it's worth, I'm running Kafka and Storm inside a Docker
> container that is itself run inside a server protected by a proxy server
> with a strong firewall. What makes this tough to debug is that I'm able to
> connect to localhost and I'm also able to run the restful API inside the
> Docker container and firewall when I'm not using Storm. So I'm guessing
> either Kafka or Storm is causing the issue. When Storm runs, is the process
> handed off to root? I have proxy settings that are only configured for
> myself (not root), so it’s possible that if the Storm process is handed off
> to some ID other than my own then my proxy settings would no longer apply,
> although this shouldn’t affect a connection to localhost.
>
>
>
> Below is my python Bolt code if anyone is interested.
>
>
>
> import storm
>
> import urllib2
>
>
>
> class TestBolt(storm.BasicBolt):
>
>
>
>     def process(self, tup):
>
>         throw_away_input = str(tup.values[0]).strip()
>
>         response = urllib2.urlopen('http://python.org/')
>
>     html = response.read()
>
>         storm.emit([html])
>
>
>
> TestBolt().run()
>
>
>
> Thanks,
>
> Ryan
>
>
>
> *Ryan Zotti*
> *Software Engineer, Enterprise Data Services*
>
> 804.393.1656
> ryan.zotti@capitalone.com
>
>
>
> [image: cid:image001.jpg@01CFA4FA.31511390]
>
>
>
> ------------------------------
>
> The information contained in this e-mail is confidential and/or
> proprietary to Capital One and/or its affiliates. The information
> transmitted herewith is intended only for use by the individual or entity
> to which it is addressed.  If the reader of this message is not the
> intended recipient, you are hereby notified that any review,
> retransmission, dissemination, distribution, copying or other use of, or
> taking of any action in reliance upon this information is strictly
> prohibited. If you have received this communication in error, please
> contact the sender and delete the material from your computer.
>