[ https://issues.apache.org/jira/browse/STORM-3537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16976263#comment-16976263 ]
Wu commented on STORM-3537: --------------------------- How can I prevent topology application to use these worker ports. For example redis connection. > Ports configed in storm.yaml file can be used by other application. > ------------------------------------------------------------------- > > Key: STORM-3537 > URL: https://issues.apache.org/jira/browse/STORM-3537 > Project: Apache Storm > Issue Type: Bug > Affects Versions: 2.1.0 > Reporter: Wu > Priority: Major > > When submit a storm topology, it fail if the port is used by other > application, for example a python Flask application. > {code:java} > //代码占位符 > // storm.yaml > supervisor.slots.ports: > - 6720orc@bj2904: > // start storm nibums ans Supervisor > // start python flask > ~/program/simhash_doc_title$ ./start.sh > * Serving Flask app "/home/orc/program/simhash_doc_title/simhash.py" > * Environment: production > WARNING: Do not use the development server in a production environment. > Use a production WSGI server instead. > * Debug mode: off > * Running on http://0.0.0.0:6720/ (Press CTRL+C to quit) > // submit storm topology > 2019-11-15 18:16:12.310 o.a.s.u.Utils main [ERROR] Received error in thread > main.. terminating server... > java.lang.Error: java.security.PrivilegedActionException: > java.net.BindException: Address already in use > at org.apache.storm.utils.Utils.handleUncaughtException(Utils.java:653) > ~[storm-client-2.1.0.jar:2.1.0] > at org.apache.storm.utils.Utils.handleUncaughtException(Utils.java:632) > ~[storm-client-2.1.0.jar:2.1.0] > at > org.apache.storm.utils.Utils.lambda$createDefaultUncaughtExceptionHandler$2(Utils.java:1014) > ~[storm-client-2.1.0.jar:2.1.0] > at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1057) > [?:1.8.0_191] > at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1052) > [?:1.8.0_191] > at java.lang.Thread.dispatchUncaughtException(Thread.java:1959) > [?:1.8.0_191] > Caused by: java.security.PrivilegedActionException > at java.security.AccessController.doPrivileged(Native Method) > ~[?:1.8.0_191] > at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_191] > at org.apache.storm.daemon.worker.Worker.start(Worker.java:180) > ~[storm-client-2.1.0.jar:2.1.0] > at org.apache.storm.daemon.worker.Worker.main(Worker.java:144) > ~[storm-client-2.1.0.jar:2.1.0] > Caused by: java.net.BindException: Address already in use > at sun.nio.ch.Net.bind0(Native Method) ~[?:1.8.0_191] > at sun.nio.ch.Net.bind(Net.java:433) ~[?:1.8.0_191] > at sun.nio.ch.Net.bind(Net.java:425) ~[?:1.8.0_191] > at > sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) > ~[?:1.8.0_191] > at > org.apache.storm.shade.io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:130) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:558) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1358) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1019) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.channel.AbstractChannel.bind(AbstractChannel.java:254) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:366) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at > org.apache.storm.shade.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) > ~[storm-shaded-deps-2.1.0.jar:2.1.0] > at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_191] > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)