无法在Apache Kafka中启动Zookeeper服务器(Unable to start Zookeeper server in Apache Kafka)
我在
kafka_home/bin/windows
( 这里建议)。 然后我得到了与此相同的问题,它建议从kafka家中启动程序。 从Windows文件夹启动时出现此错误:INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig) [2014-08-21 11:53:55,748] FATAL Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain) org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config/zookeeper.properties at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:110) at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:99) at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:76) Caused by: java.lang.IllegalArgumentException: config/zookeeper.properties file is missing at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:94) ... 2 more Invalid config, exiting abnormally
有谁知道如何解决这个问题?
I am in
kafka_home/bin/windows
(as suggested here). Then I get the same problem as here, where it suggests to launch the program from the kafka home. I get this error when launching from the windows folder:INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig) [2014-08-21 11:53:55,748] FATAL Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain) org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config/zookeeper.properties at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:110) at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:99) at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:76) Caused by: java.lang.IllegalArgumentException: config/zookeeper.properties file is missing at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:94) ... 2 more Invalid config, exiting abnormally
Does anybody know how to solve this?
原文:https://stackoverflow.com/questions/44263348
最满意答案
默认情况下,PhantomjS浏览器(CasperJS使用)会自动呈现页面的完整高度 。 在CasperJS中,相应的方法是
casper.capture()
要设置页面的水平宽度,请设置视口大小:
var casper = require('casper').create({ viewportSize: {width: 1280, height: 800} });
此设置仅影响屏幕截图的宽度 , 高度将尽可能大,以呈现整个页面。
例:
var casper = require('casper').create({ verbose: true, logLevel: 'debug', pageSettings: { userAgent: 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36' } }); casper.options.viewportSize = {width: 1280, height: 1024}; casper.start("http://stackoverflow.com/questions/tagged/phantomjs"); casper.then(function() { casper.capture("stackoverflow.png"); }); casper.run();
得到的图像(439 kb)高3448像素,超过选项中设置的1024像素。
By default PhantomjS browser (which is used by CasperJS) renders full height of the page automatically. In CasperJS the corresponding method is
casper.capture()
To set the horizontal width of the page, set viewport size:
var casper = require('casper').create({ viewportSize: {width: 1280, height: 800} });
This setting will only affect the width of the screenshot, the height will be as big as necessary to render the whole page.
Example:
var casper = require('casper').create({ verbose: true, logLevel: 'debug', pageSettings: { userAgent: 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36' } }); casper.options.viewportSize = {width: 1280, height: 1024}; casper.start("http://stackoverflow.com/questions/tagged/phantomjs"); casper.then(function() { casper.capture("stackoverflow.png"); }); casper.run();
The resulting image (439 kb) is 3448 pixels high which is way more than 1024 pixels set in options.
相关问答
更多-
语言设置有点奇怪,但屏幕分辨率可能“错误”,因为您正在设置视口,而不是屏幕分辨率。 AFAIK Google Analytics使用window.screen -object。 我没有与CasperJS合作过,但是在Phantom中你可以这样做: page.onInitialized = function () { page.evaluate(function () { window.screen = { width: 1600, height ...
-
阅读本文: http : //jqmtricks.wordpress.com/2014/02/06/content-div-height-fill-page-height/ DEMO function SetHeightOfDiv() { var screen = $.mobile.getScreenHeight(); var header = $(".ui-header").hasClass("ui-header-fixed") ? $(".ui-header").outerHeight( ...
-
默认情况下,PhantomjS浏览器(CasperJS使用)会自动呈现页面的完整高度 。 在CasperJS中,相应的方法是 casper.capture() 要设置页面的水平宽度,请设置视口大小: var casper = require('casper').create({ viewportSize: {width: 1280, height: 800} }); 此设置仅影响屏幕截图的宽度 , 高度将尽可能大,以呈现整个页面。 例: var casper = require('casper' ...
-
这可以通过css中的媒体查询来实现。您可以为每个设备编写单独的css。 例如 :- @media screen and ( max-height: 600px ){ body { height:600px; } } This can be achieve with help of media query in css.You can write separate css for each device. For example :- @media screen and ...
-
当容器大于视口时,将高度设置为浏览器视口的100%?(Set height to 100% of browser viewport when container is bigger than viewport?)[2023-03-08]
5.1.2。 视口百分比长度:'vw','vh','vmin','vmax'单位 视口百分比长度是相对于初始包含块的大小。 当初始包含块的高度或宽度发生变化时,会相应地缩放。 使用视口百分比长度。 在这种情况下, 100vh 。 .contentBox { height: 100vh; } 更新示例 您也可以使用calc()来减去10px顶部/底部边距: .contentBox { height: calc(100vh - 20px); /* Subtract the 10px top/b ... -
根据官方文档,你可以使用viewportSize选项来做到这一点。 var casper = require("casper").create({ // other options here viewportSize: { width: 1920, height: 1080 } }); 在每次页面加载后,这将是比覆盖视口大小更轻量级的解决方案。 Here's how it works with CasperJS: // at the start o ...
-
检查内容编辑器的TEXT VIEW中的代码。 当您在其中粘贴内容时,Wordpress内容编辑器会生成一些标记。 使用TEXT VIEW粘贴相同内容并确保没有其他文本。 它会工作正常。 在您当前的情况下,正在生成额外的
..
和...
标记。 Check the code in TEXT VIEW of content editor. Wordpress content editor generates some tags when you paste content in ... -
水平放置图像中心并使视口高度达到100%(Positioning image horizontally center and make height 100% of viewport)[2022-07-07]
只需添加left:0;right:0;margin:0 auto; 以img.bg ( 例子 ): body{ margin: 0px; padding: 0px; overflow: hidden; } #main{ margin: auto; } img.bg { /* Set rules to fill background */ max-height: 100%; /* Set up proportionate scaling */ ... -
我发现了我的问题: 它取决于|的性质 运营商! 第一个操作是我的测试开始,第二个操作是| 运营商是grep和我的$? 引用控制台上的最后一个命令,因此它返回grep的退出代码而不是mocha-casperjs -runner 解决方案: 在Bash中管道输出和捕获退出状态 I have found my problem: It lies in the nature of the | operator! The first operation is the start of my tests and the ...
-
无论应用于html元素的样式如何,它都应始终返回视口的尺寸。 你不能设置它。 因为这需要浏览器窗口也要调整大小。 您可以使用JS调整窗口大小,但不应该这样做。 您可以使用css更改html元素的高度和宽度,但这不会更改clientWidth。 如果要获取html元素的实际宽度,请使用document.documentElement.offsetWidth 移动是一个不同的故事。 it should always return the dimension of the viewport regardless ...