将mod\u wsgi与dash、pyspark和mesos一起使用时出错

2024-04-26 19:07:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用的是apache2服务器和modèwsgi,它执行我的服务器MSPN.py在其中创建Spark上下文的文件,并用破折号显示所选数据的图形。 另外,我在本地配置了apachemesos,以便将来能够在集群中使用它。你知道吗

当我运行python解释器时,一切都正常服务器MSPN.py“可以通过localhost:8050访问。当我尝试将它与apache2一起使用时,使用localhost/server,它可以正确加载网页,但是当我尝试用数据更新图形时,以及在spark数据帧中使用collect()、count()或toPandas()等函数时,我在执行过程中遇到以下错误:

使用Spark的WebUI:

错误WebUI:

Error WebUI

/var/log/apache2出错/错误.log地址:

[Stage 0:>                                                          (0 + 4) / 8] [wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] [2018-08-13 20:56:05,341] ERROR in app: Exception on /_dash-update-component [POST]
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] Traceback (most recent call last):
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2292, in wsgi_app
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     response = self.full_dispatch_request()
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1815, in full_dispatch_request
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     rv = self.handle_user_exception(e)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1718, in handle_user_exception
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     reraise(exc_type, exc_value, tb)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1813, in full_dispatch_request
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     rv = self.dispatch_request()
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1799, in dispatch_request
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     return self.view_functions[rule.endpoint](**req.view_args)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/dash/dash.py", line 558, in dispatch
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     return self.callback_map[target_id]['callback'](*args)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/dash/dash.py", line 515, in add_context
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     output_value = func(*args, **kwargs)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/www/tussam/serverMSPN.py", line 302, in update_figure
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     points = batt.count()
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/pyspark/sql/dataframe.py", line 455, in count
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     return int(self._jdf.count())
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/py4j/java_gateway.py", line 1160, in __call__
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     answer, self.gateway_client, self.target_id, self.name)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/pyspark/sql/utils.py", line 63, in deco
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     return f(*a, **kw)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/usr/local/lib/python2.7/dist-packages/py4j/protocol.py", line 320, in get_return_value
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     format(target_id, ".", name), value)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] Py4JJavaError: An error occurred while calling o104.count.
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] : org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 0.0 failed 4 times, most recent failure: Lost task 0.3 in stage 0.0 (TID 18, localhost, executor 0): org.apache.spark.api.python.PythonException: Traceback (most recent call last):
.423757 2018] [wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/worker.py", line 218, in main
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     func, profiler, deserializer, serializer = read_udfs(pickleSer, infile, eval_type)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/worker.py", line 138, in read_udfs
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     arg_offsets, udf = read_single_udf(pickleSer, infile, eval_type)
.423773 2018] [wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/worker.py", line 118, in read_single_udf
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     f, return_type = read_command(pickleSer, infile)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/worker.py", line 58, in read_command
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     command = serializer._read_with_length(file)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/serializers.py", line 170, in _read_with_length
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     return self.loads(obj)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/serializers.py", line 562, in loads
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     return pickle.loads(obj)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] ImportError: No module named serverMSPN
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] 
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.api.python.BasePythonRunner$ReaderIterator.handlePythonException(PythonRunner.scala:298)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.python.PythonUDFRunner$$anon$1.read(PythonUDFRunner.scala:83)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.python.PythonUDFRunner$$anon$1.read(PythonUDFRunner.scala:66)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.api.python.BasePythonRunner$ReaderIterator.hasNext(PythonRunner.scala:252)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:37)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:439)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:408)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:408)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.WholeStageCodegenExec$$anonfun$10$$anon$1.hasNext(WholeStageCodegenExec.scala:614)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.columnar.InMemoryRelation$$anonfun$1$$anon$1.hasNext(InMemoryRelation.scala:139)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.memory.MemoryStore.putIteratorAsValues(MemoryStore.scala:216)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.BlockManager$$anonfun$doPutIterator$1.apply(BlockManager.scala:1092)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.BlockManager$$anonfun$doPutIterator$1.apply(BlockManager.scala:1083)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.BlockManager.doPut(BlockManager.scala:1018)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.BlockManager.doPutIterator(BlockManager.scala:1083)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.BlockManager.getOrElseUpdate(BlockManager.scala:809)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.getOrCompute(RDD.scala:335)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.iterator(RDD.scala:286)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:96)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:53)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.Task.run(Task.scala:109)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:345)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat java.lang.Thread.run(Thread.java:748)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] 
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] Driver stacktrace:
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$failJobAndIndependentStages(DAGScheduler.scala:1599)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1587)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1586)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
.423982 2018] [wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:1586)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:831)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:831)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat scala.Option.foreach(Option.scala:257)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:831)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:1820)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1769)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1758)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:48)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:642)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.SparkContext.runJob(SparkContext.scala:2027)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.SparkContext.runJob(SparkContext.scala:2048)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.SparkContext.runJob(SparkContext.scala:2067)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.SparkContext.runJob(SparkContext.scala:2092)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD$$anonfun$collect$1.apply(RDD.scala:939)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.withScope(RDD.scala:363)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.collect(RDD.scala:938)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.SparkPlan.executeCollect(SparkPlan.scala:297)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.Dataset$$anonfun$count$1.apply(Dataset.scala:2770)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.Dataset$$anonfun$count$1.apply(Dataset.scala:2769)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.Dataset$$anonfun$52.apply(Dataset.scala:3253)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:77)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.Dataset.withAction(Dataset.scala:3252)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.Dataset.count(Dataset.scala:2769)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat java.lang.reflect.Method.invoke(Method.java:498)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat py4j.Gateway.invoke(Gateway.java:282)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat py4j.commands.CallCommand.execute(CallCommand.java:79)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat py4j.GatewayConnection.run(GatewayConnection.java:214)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat java.lang.Thread.run(Thread.java:748)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] Caused by: org.apache.spark.api.python.PythonException: Traceback (most recent call last):
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/worker.py", line 218, in main
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     func, profiler, deserializer, serializer = read_udfs(pickleSer, infile, eval_type)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/worker.py", line 138, in read_udfs
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     arg_offsets, udf = read_single_udf(pickleSer, infile, eval_type)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/worker.py", line 118, in read_single_udf
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     f, return_type = read_command(pickleSer, infile)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/worker.py", line 58, in read_command
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     command = serializer._read_with_length(file)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/serializers.py", line 170, in _read_with_length
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     return self.loads(obj)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]   File "/var/lib/mesos/slaves/66dc83f4-cc10-47ae-ab84-27417fe20511-S0/frameworks/921c3262-c01a-4981-b292-02b37cfa55cb-0003/executors/0/runs/74d10141-b3ba-49af-ae8a-579f3e83c958/spark-2.3.0-bin-hadoop2.7/python/lib/pyspark.zip/pyspark/serializers.py", line 562, in loads
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562]     return pickle.loads(obj)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] ImportError: No module named serverMSPN
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] 
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.api.python.BasePythonRunner$ReaderIterator.handlePythonException(PythonRunner.scala:298)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.python.PythonUDFRunner$$anon$1.read(PythonUDFRunner.scala:83)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.python.PythonUDFRunner$$anon$1.read(PythonUDFRunner.scala:66)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.api.python.BasePythonRunner$ReaderIterator.hasNext(PythonRunner.scala:252)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:37)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:439)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:408)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:408)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIteratorForCodegenStage1.processNext(Unknown Source)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.WholeStageCodegenExec$$anonfun$10$$anon$1.hasNext(WholeStageCodegenExec.scala:614)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.sql.execution.columnar.InMemoryRelation$$anonfun$1$$anon$1.hasNext(InMemoryRelation.scala:139)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.memory.MemoryStore.putIteratorAsValues(MemoryStore.scala:216)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.BlockManager$$anonfun$doPutIterator$1.apply(BlockManager.scala:1092)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.BlockManager$$anonfun$doPutIterator$1.apply(BlockManager.scala:1083)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.BlockManager.doPut(BlockManager.scala:1018)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.BlockManager.doPutIterator(BlockManager.scala:1083)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.storage.BlockManager.getOrElseUpdate(BlockManager.scala:809)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.getOrCompute(RDD.scala:335)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.iterator(RDD.scala:286)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:96)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:53)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.scheduler.Task.run(Task.scala:109)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:345)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] \t... 1 more
[wsgi:error] [pid 11026:tid 140350716606208] [remote ::1:13562] 

为什么我用“python”运行它服务器MSPN.py“如果我能执行collect()、count()等函数。。但是,当我使用apache2运行它时,它不会吗?你知道吗


Tags: inpyorgwsgiremotelibapacheerror