Skip to content

Conversation

@kination
Copy link

What is this PR for?

To show the localhost:port number info when running zeppelin.sh script.

What type of PR is it?

[Improvement]

Todos

  • - Task

What is the Jira issue?

  • Not an issue.

How should this be tested?

Run ./zeppelin.sh or ./zeppelin_daemon.sh and see the message about localhost is appearing.

$(mkdir -p "${ZEPPELIN_PID_DIR}")
fi

echo "Browse localhost:8080 in your browser"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @djKooks. Thanks for your contribution!

What if the users are not using localhost?

Fix to show public IP address or localhost
Fix to show public IP address or localhost
@kination
Copy link
Author

@AhyoungRyu Oh, it was my mistake. Sorry for silly bugs.
I just updated script to find public IP.


echo "Browse localhost:8080 in your browser"
IP_ADDR="$(ifconfig en0 | grep inet | grep -v inet6 | cut -d ' ' -f2)"
echo -e "Browse $IP_ADDR:8080 in your browser.\nIf you are testing on your local computer, use localhost:8080"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djKooks As you can see in Apache Zeppelin Configuration, user can also change the server port using ZEPPELIN_PORT and zeppelin.server.port value. Can we update the port as well? Sorry about this. I should've told about it with my last comment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AhyoungRyu Thanks! Which file do I have to refer for this value? zeppelin-site.xml or zeppelin-env.sh or else?

Copy link
Contributor

@AhyoungRyu AhyoungRyu Sep 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djKooks As you can see in the referred docs

You can configure Apache Zeppelin with either environment variables in conf/zeppelin-env.sh (conf\zeppelin-env.cmd for Windows) or Java properties in conf/zeppelin-site.xml. If both are defined, then the environment variables will take priority.

User can change the port using both zeppelin-site.xml and zeppelin-env.sh. If the user modify only zeppelin-env.sh or both, then you can easily refer zeppelin-env.sh file. But we should also cover the other case that only zeppelin-site.xml is changed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AhyoungRyu Okay. I'll check and update.

Copy link
Author

@kination kination Oct 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AhyoungRyu I updated script to read port num from zeppelin-env.sh, but still have problem on reading from zeppelin-site.xml. There are some xml parser but needs additional parser to be installed, and that seems really not good.
How do you think about adding id for each nodes? Like below...

<configuration>

<property>
  <name>zeppelin.server.addr</name>
  <value id="zeppelin.server.addr">0.0.0.0</value>
  <description>Server address</description>
</property>

<property>
  <name>zeppelin.server.port</name>
  <value id="zeppelin.server.port">8080</value>
  <description>Server port.</description>
</property>
...

How do you think about it? This will cause no side effect as long as I know.
If you are not sure about it, I'll update this first so you could look through it carefully.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that would be possible approach I think.

If you are not sure about it, I'll update this first so you could look through it carefully.

Sounds good! :)

@AhyoungRyu
Copy link
Contributor

@djKooks Yeah I just saw the commit right after you pushed. It's not a silly bug :) But the port part should be updated as well. Some users can use other port number not 8080. Could you check again please?

@AhyoungRyu
Copy link
Contributor

AhyoungRyu commented Oct 7, 2016

@djKooks Sorry for my late response. Seems there is already similar feature merged few days ago. Could you please take a look at #1399? But it only print in the log files. I think you can use it. What do you think? :D

@kination
Copy link
Author

kination commented Oct 9, 2016

@AhyoungRyu It looks different. The one in #1399 records ip address in log, but I want to show this during script is running. It seems ok to keep working on.

@AhyoungRyu
Copy link
Contributor

AhyoungRyu commented Oct 9, 2016

@djKooks Yeah you're right. I left the comment like that at the first time, but I realized that it's different change after checking it again. Sorry for any confusion.

@kination
Copy link
Author

@AhyoungRyu No problem~thanks for guide! I'll keep work on it.

@kination
Copy link
Author

@AhyoungRyu Sorry for late reply.
I updated scripts to read port number from environment setups. Please look on and let me know if there is any problem on running this.

@AhyoungRyu
Copy link
Contributor

@djKooks Thanks for kind reminder :)

Currently Zeppelin works with "zero-configuration" status. As you know, even if users didn't activate conf/zeppelin-env.sh.template or conf/zeppelin-site.xml.template, Zeppelin works with default configurations. I think you missed this side. Can you test this patch without zeppelin-env.sh and zeppelin-site.xml again?

Check status with no env file
check env file status
@kination
Copy link
Author

@AhyoungRyu you're right. Thanks for comments. I just update lines for file check.

@jongyoul
Copy link
Member

@djKooks Hi, Is there any issue for installing xmllint? I found it in Mac and Linux but I'm not sure if it exists in all of linux and mac. Do you have any idea?

@AhyoungRyu
Copy link
Contributor

@djKooks Sorry for my late response.

Tested again and it works as expected only when I'm using wireless interpreter.
If I connected wired internet, it doesn't print host info as below

$ ./bin/zeppelin-daemon.sh restart
Zeppelin stop                                              [  OK  ]
Browse :8080 in your browser.
If you are testing on your local computer, use localhost:8080
Zeppelin start                                             [  OK  ]

Can you check again this?

@AhyoungRyu
Copy link
Contributor

@djKooks And in my personal opinion, I wonder we need to print wireless network address in shell window since it changes depending on the user's network environment. What do you think?

@kination
Copy link
Author

kination commented Nov 1, 2016

@AhyoungRyu Actually, I was also thinking about whether this commit needs now. I'll drop this issue and maybe look it again after when it seems useful.
Thanks for help.

@kination kination closed this Nov 1, 2016
@AhyoungRyu
Copy link
Contributor

@djKooks Yeah right. Thanks for your consideration.
And please do not hesitate if you want to contribute to Zeppelin next time. All ppl in the community will help you!

@kination
Copy link
Author

kination commented Nov 1, 2016

@AhyoungRyu Okay. Thanks~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants