Deploy hdp-storm with juju failed.

Bug #1671328 reported by 258189379@qq.com
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hdp-storm (Juju Charms Collection)
New
Undecided
Unassigned

Bug Description

Hi:
Hi:
  I have tried to deploy the hdp-storm to our platform with juju, but failed.The error occurred both our platform or open source OpenStack platform. I need your help, thanks.

My environment:
Cloud: Our platform and open source OpenStack Mitaka.
Juju:
root@juju-new:~# juju version
2.1.1-xenial-amd64

Issue 1:
When I had execute the following commands, the juju status indicates that the hooks/install error, the detailed logs as below:

Detailed error logs:
2017-03-08 08:58:03 INFO juju-log Installing hdp-storm
2017-03-08 08:58:03 DEBUG worker.uniter.jujuc server.go:178 hook context id "nimbus-server/0-install-727104530942160795"; dir "/var/lib/juju/agents/unit-nimbus-

server-0/charm"
2017-03-08 08:58:03 INFO juju-log ==> install_base_pkg
2017-03-08 08:58:03 INFO install Traceback (most recent call last):
2017-03-08 08:58:03 INFO install File "/var/lib/juju/agents/unit-nimbus-server-0/charm/hooks/install", line 50, in <module>
2017-03-08 08:58:03 INFO install hooks.execute(sys.argv)
2017-03-08 08:58:03 INFO install File "/var/lib/juju/agents/unit-nimbus-server-0/charm/hooks/charmhelpers/core/hookenv.py", line 501, in execute
2017-03-08 08:58:03 INFO install self._hooks[hook_name]()
2017-03-08 08:58:03 INFO install File "/var/lib/juju/agents/unit-nimbus-server-0/charm/hooks/install", line 41, in install
2017-03-08 08:58:03 INFO install install_base_pkg(packages)
2017-03-08 08:58:03 INFO install File "/var/lib/juju/agents/unit-nimbus-server-0/charm/hooks/hdputils.py", line 66, in install_base_pkg
2017-03-08 08:58:03 INFO install tmpfile = au.download_and_validate(listurl, listsum)
2017-03-08 08:58:03 INFO install File "/var/lib/juju/agents/unit-nimbus-server-0/charm/hooks/charmhelpers/fetch/archiveurl.py", line 85, in download_and_validate
2017-03-08 08:58:03 INFO install tempfile, headers = urlretrieve(url)
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/urllib.py", line 94, in urlretrieve
2017-03-08 08:58:03 INFO install return _urlopener.retrieve(url, filename, reporthook, data)
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/urllib.py", line 240, in retrieve
2017-03-08 08:58:03 INFO install fp = self.open(url, data)
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/urllib.py", line 208, in open
2017-03-08 08:58:03 INFO install return getattr(self, name)(url)
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/urllib.py", line 437, in open_https
2017-03-08 08:58:03 INFO install h.endheaders(data)
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/httplib.py", line 1013, in endheaders
2017-03-08 08:58:03 INFO install self._send_output(message_body)
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/httplib.py", line 864, in _send_output
2017-03-08 08:58:03 INFO install self.send(msg)
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/httplib.py", line 826, in send
2017-03-08 08:58:03 INFO install self.connect()
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/httplib.py", line 1220, in connect
2017-03-08 08:58:03 INFO install self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/ssl.py", line 487, in wrap_socket
2017-03-08 08:58:03 INFO install ciphers=ciphers)
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/ssl.py", line 243, in __init__
2017-03-08 08:58:03 INFO install self.do_handshake()
2017-03-08 08:58:03 INFO install File "/usr/lib/python2.7/ssl.py", line 405, in do_handshake
2017-03-08 08:58:03 INFO install self._sslobj.do_handshake()
2017-03-08 08:58:03 INFO install IOError: [Errno socket error] [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

My workaround:
I tried to upgrade the python version to 2.7.12 and the error gone. But new error came.

Issue 2:
I execute the command " juju add-relation nimbus-server:zookeeper hdp-zookeeper:zookeepe" ,there came the new error indicating that the TypeError: startswith first arg must be str, unicode, or tuple, not NoneType.

2017-03-08 12:01:35 INFO juju-log zookeeper:15: zookeeper-relation-changed zk_hostname=192.168.0.12
2017-03-08 12:01:35 DEBUG worker.uniter.jujuc server.go:178 hook context id "nimbus-server/3-zookeeper-relation-changed-4673527987843966163"; dir

"/var/lib/juju/agents/unit-nimbus-server-3/charm"
2017-03-08 12:01:35 INFO juju-log zookeeper:15: ===> fileGetKV (/etc/storm/conf/storm.yaml, storm.zookeeper.servers:)
2017-03-08 12:01:35 DEBUG worker.uniter.jujuc server.go:178 hook context id "nimbus-server/3-zookeeper-relation-changed-4673527987843966163"; dir

"/var/lib/juju/agents/unit-nimbus-server-3/charm"
2017-03-08 12:01:35 INFO juju-log zookeeper:15: ===> fileSetKV (/etc/storm/conf/storm.yaml, None,
- "192.168.0.12")
2017-03-08 12:01:35 INFO zookeeper-relation-changed Traceback (most recent call last):
2017-03-08 12:01:35 INFO zookeeper-relation-changed File "/var/lib/juju/agents/unit-nimbus-server-3/charm/hooks/zookeeper-relation-changed", line 36, in <module>
2017-03-08 12:01:35 INFO zookeeper-relation-changed hooks.execute(sys.argv)
2017-03-08 12:01:35 INFO zookeeper-relation-changed File "/var/lib/juju/agents/unit-nimbus-server-3/charm/hooks/charmhelpers/core/hookenv.py", line 501, in execute
2017-03-08 12:01:35 INFO zookeeper-relation-changed self._hooks[hook_name]()
2017-03-08 12:01:35 INFO zookeeper-relation-changed File "/var/lib/juju/agents/unit-nimbus-server-3/charm/hooks/zookeeper-relation-changed", line 30, in

zookeeper_relation_changed
2017-03-08 12:01:35 INFO zookeeper-relation-changed fileSetKV(com.storm_yaml_path, storm_zookeeper_servers, "\n- \""+ZK_hostname+"\"")
2017-03-08 12:01:35 INFO zookeeper-relation-changed File "/var/lib/juju/agents/unit-nimbus-server-3/charm/hooks/bdutils.py", line 94, in fileSetKV
2017-03-08 12:01:35 INFO zookeeper-relation-changed if contents[l].startswith(key):
2017-03-08 12:01:35 INFO zookeeper-relation-changed TypeError: startswith first arg must be str, unicode, or tuple, not NoneType
2017-03-08 12:01:35 ERROR juju.worker.uniter.operation runhook.go:107 hook "zookeeper-relation-changed" failed: exit status 1
2017-03-08 12:01:35 DEBUG juju.worker.uniter.operation executor.go:84 lock released
2017-03-08 12:01:35 INFO juju.worker.uniter resolver.go:100 awaiting error resolution for "relation-changed" hook
2017-03-08 12:01:35 DEBUG juju.worker.uniter agent.go:17 [AGENT-STATUS] error: hook failed: "zookeeper-relation-changed"

My workaround:
Modify the /var/lib/juju/agents/unit-nimbus-server-4/charm/hooks/zookeeper-relation-changed,change the fileSetKV's second parameter from the var type to a string type as "storm_zookeeper_servers".
@hooks.hook('zookeeper-relation-changed')
def zookeeper_relation_changed():
    log('zookeeper-relation-changed called')
    ZK_hostname = relation_get('private-address')
    if not ZK_hostname:
        sys.exit(0)
    log('zookeeper-relation-changed zk_hostname={}'.format(ZK_hostname))
    storm_zookeeper_servers = fileGetKV( com.storm_yaml_path, "storm.zookeeper.servers:")
    fileSetKV(com.storm_yaml_path, storm_zookeeper_servers, "\n- \""+ZK_hostname+"\"")

After changing: fileSetKV(com.storm_yaml_path, "storm_zookeeper_servers", "\n- \""+ZK_hostname+"\"")
with the workaround ,it seems the error gone.But new error came.

Issue 3:
When I ran the netstat -nat command ,I found the storm-ui port 8080 is not listed, the storm-ui service is not running.
I run the "juju run --unit storm-worker/3 "hooks/install" commands ,the 8080 port seemed opened. and I use the command: curl http://storm-nimbusserver-ip:8080 , It responses the error below:

</pre></body></html>root@juju-new:~# curl http://192.168.0.22:8080
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><title>Storm UI</title><link href="/css/bootstrap-1.4.0.css" rel="stylesheet" type="text/css"><link href="/css/style.css" rel="stylesheet" type="text/css"><script src="/js/jquery-1.6.2.min.js" type="text/javascript"></script><script src="/js/jquery.tablesorter.min.js" type="text/javascript"></script><script src="/js/jquery.cookies.2.2.0.min.js" type="text/javascript"></script><script src="/js/bootstrap-twipsy.js" type="text/javascript"></script><script src="/js/script.js" type="text/javascript"></script></head><body><h1><a href="/">Storm UI</a></h1><h2>Internal Server Error</h2><pre>java.lang.NullPointerException
 at org.apache.thrift7.transport.TSocket.open(TSocket.java:166)
 at org.apache.thrift7.transport.TFramedTransport.open(TFramedTransport.java:81)
 at backtype.storm.thrift$nimbus_client_and_conn.invoke(thrift.clj:71)
 at backtype.storm.ui.core$main_page.invoke(core.clj:241)
 at backtype.storm.ui.core$fn__3873.invoke(core.clj:1016)
 at compojure.core$make_route$fn__1686.invoke(core.clj:93)
 at compojure.core$if_route$fn__1674.invoke(core.clj:39)
 at compojure.core$if_method$fn__1667.invoke(core.clj:24)
 at compojure.core$routing$fn__1692.invoke(core.clj:106)
 at clojure.core$some.invoke(core.clj:2390)
 at compojure.core$routing.doInvoke(core.clj:106)
 at clojure.lang.RestFn.applyTo(RestFn.java:139)
 at clojure.core$apply.invoke(core.clj:603)
 at compojure.core$routes$fn__1696.invoke(core.clj:111)
 at ring.middleware.reload$wrap_reload$fn__1719.invoke(reload.clj:14)
 at backtype.storm.ui.core$catch_errors$fn__3911.invoke(core.clj:1075)
 at ring.middleware.keyword_params$wrap_keyword_params$fn__2331.invoke(keyword_params.clj:27)
 at ring.middleware.nested_params$wrap_nested_params$fn__2368.invoke(nested_params.clj:65)
 at ring.middleware.params$wrap_params$fn__2305.invoke(params.clj:55)
 at ring.middleware.multipart_params$wrap_multipart_params$fn__2394.invoke(multipart_params.clj:103)
 at ring.middleware.flash$wrap_flash$fn__2565.invoke(flash.clj:14)
 at ring.middleware.session$wrap_session$fn__2556.invoke(session.clj:43)
 at ring.middleware.cookies$wrap_cookies$fn__2493.invoke(cookies.clj:160)
 at ring.adapter.jetty$proxy_handler$fn__3353.invoke(jetty.clj:16)
 at ring.adapter.jetty.proxy$org.mortbay.jetty.handler.AbstractHandler$0.handle(Unknown Source)
 at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 at org.mortbay.jetty.Server.handle(Server.java:326)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
 at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
 at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
 at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

I am not sure about the workarounds I did, is it really caused by the hdp-storm bug?
And I also want to know the last issue's workaround and the correct deployment steps.

The error came both our cloud and open source openstack mitaka version. I expect your suggestion, thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.