启动zookeeper时出现的问题

zkEnv.cmd

@echo off
REM Licensed to the Apache Software Foundation (ASF) under one or more
REM contributor license agreements.  See the NOTICE file distributed with
REM this work for additional information regarding copyright ownership.
REM The ASF licenses this file to You under the Apache License, Version 2.0
REM (the "License"); you may not use this file except in compliance with
REM the License.  You may obtain a copy of the License at
REM
REM     http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.

set ZOOCFGDIR=%~dp0%..\conf
set ZOO_LOG_DIR=%~dp0%..
set ZOO_LOG4J_PROP=INFO,CONSOLE

REM for sanity sake assume Java 1.6
REM see: http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html

REM add the zoocfg dir to classpath
set CLASSPATH=%ZOOCFGDIR%

REM make it work in the release
SET CLASSPATH=%~dp0..\*;%~dp0..\lib\*;%CLASSPATH%

REM make it work for developers
SET CLASSPATH=%~dp0..\build\classes;%~dp0..\build\lib\*;%CLASSPATH%

set ZOOCFG=%ZOOCFGDIR%\zoo.cfg

@REM setup java environment variables

if not defined JAVA_HOME (
  echo Error: JAVA_HOME is not set.
  goto :eof
)
--下面的语句会报错,因为%JAVA_HOME%这个的Path的路径是有空格的,所以会报错。--------correct--:>"%JAVA_HOME%\bin\java.exe"
if not exist %JAVA_HOME%\bin\java.exe ( echo Error: JAVA_HOME is incorrectly set. goto :eof ) set JAVA=%JAVA_HOME%\bin\java

zkServer.cmd

@echo off
REM Licensed to the Apache Software Foundation (ASF) under one or more
REM contributor license agreements.  See the NOTICE file distributed with
REM this work for additional information regarding copyright ownership.
REM The ASF licenses this file to You under the Apache License, Version 2.0
REM (the "License"); you may not use this file except in compliance with
REM the License.  You may obtain a copy of the License at
REM
REM     http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.

setlocal
call "%~dp0zkEnv.cmd"

set ZOOMAIN=org.apache.zookeeper.server.quorum.QuorumPeerMain
echo on
# %JAVA%-------->"%JAVA%"
call %JAVA% "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %*
PAUSE
endlocal
时间: 2024-10-11 15:43:44

启动zookeeper时出现的问题的相关文章

启动zookeeper时,jps显示有进程,但是status查看状态时就Error contacting service. It is probably not running

转自:http://www.cnblogs.com/xiaohua92/p/5460515.html#undefined 安装zookeeper时候,可以查看进程启动,但是状态显示报错:Error contacting service. It is probably not running 安装zookeeper-3.3.2的时候,启动正常没报错,但zkServer.sh status查看状态的时候却出现错误,如下: JMX enabled by defaultUsing config: /ha

Centos7以普通用户启动zookeeper并加入开机自启动服务

我的环境的zookeeper目录为/opt/app/zk,假设我想以zookeeper用户启动 以下示例,在/etc/systemd/system/文件夹下创建一个启动脚本zookeeper.service [Unit] Description=zookeeper After=syslog.target network.target [Service] Type=forking Environment=ZOO_LOG_DIR=/opt/app/zk/log ExecStart=/opt/app/

启动 WLS 时的身份验证错误(解决linux下问题)

故障排除请注意,并非下面所有任务都需要完成.有些问题仅通过执行几项任务就可以解决. 快速链接 为什么发生此问题? 启动身份无效(WLS 7.0 和 WLS 8.1) 内嵌的 LDAP:丢失管理密码(WLS 7.0 和 WLS 8.1) 内嵌的 LDAP:更改管理密码后被管服务器不启动(WLS 7.0 和 WLS 8.1) WebLogic 服务器与 LDAP 服务器连接失败(WLS 7.0 和 WLS 8.1) LDAP 服务器:连接错误(WLS 7.0 和 WLS 8.1) LDAP 服务器:

使用appium进行ios测试,启动inspector时遇到的问题(一)

最近在公司,让做ios的自动化测试,因为以前做过android的自动化测试,用的也是appium,觉得没什么,结果一开始在搭建环境就遇到了很多的问题,现在将我遇到的问题,以及解决方法,给大家分享出来.(ps:吐槽一下testhome,发了两个帖子一个提问帖一个心得分享帖,全都给拉到违规区了,问题也没有人给看) 进入正题,说一下我的环境: xcode 7.1.1 simulator 9.1 appium 1.4.13 iphone 5s  ios9.1 首先说一下,appium 在ios版本选择这

Eclipse启动Tomcat时,45秒超时解决方案

在Eclipse中启动Tomcatserver时,常常因为系统初始化项目多,导致出现45秒超时的Tomcatserver启动错误,出现以下的错误. 曾经我们一般通过找到XML配置文件,将相应Timeout为45的值,改动为觉得足够大来解决这个问题. 可是有时候这样非常麻烦,有时候根本就在配置文件里找不到Timeout的属性值,所以这里有一种能够高速的解决方法. 解决方法: 1.双击Servers视图中的相应的Server,打开Server的属性界面.例如以下图: 2.在上图的Timeouts->

启动Oracle时提示:ORA-01078:failure in processing system parameters

一.使用环境操作系统:CentOS release 6.2 (Final) 数据库:Oracle 12g数据库主目录:/ora12/product/product/12.1.0/db_1 二.问题描述 用sys用户登录sqlplus后,用startup命令启动Oracle时提示:ORA-01078:failure in processing system parametersLRM-00109: could not open parameter file '/ora12/product/prod

启动tomcat时遇到的问题

1.当启动Tomcat时,出现了如下信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\tools\myeclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin;D:\Progr

[转]Eclipse启动Tomcat时45秒超时解决方法

原文地址:http://it.oyksoft.com/post/6577/ Eclipse启动Tomcat时,默认配置的启动超时时长为45秒.假若项目启动超过45秒将会报错.两种解决方法:1.改XMLeclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\servers.xml start-timeout="45" 2.双击Servers视图中的对应的Server,打开Server的属性界面,右边有个Timeou

在启动php时,无法启动此程序,由于计算机中丢失MSVCR110.dll的解决方法

在启动php时,运行RunHiddenconsole.exe php-cgi.exe -b 127.0.0.1:9000 -c时,出现错误:无法启动此程序,由于计算机中丢失MSVCR110.dll 方法/步骤 首先进入 http://www.microsoft.com/zh-CN/download/details.aspx? id=30679 这个网址来进行相关程序的下载. 打开之后,在"选择语言"里选择"中文简体".然后点击右边的"下载"but