I am trying to setup the Apache Druid on a single machine following quickstart guide here. When I start historical server, it shows io.druid.java.util.common.IOE: No known server exception on screen.
Command:
java `cat conf-quickstart/druid/historical/jvm.config xargs` \
-cp "conf-quickstart/druid/_common:conf-quickstart/druid/historical:lib/*" \
io.druid.cli.Main server historical
Full stack-trace-
2018-04-07T18:23:40,234 WARN [main]
io.druid.java.util.common.RetryUtils - Failed on try 1, retrying in
1,246ms. io.druid.java.util.common.IOE: No known server at
io.druid.discovery.DruidLeaderClient.getCurrentKnownLeader(DruidLeaderClient.java:276)
~[druid-server-0.12.0.jar:0.12.0] at
io.druid.discovery.DruidLeaderClient.makeRequest(DruidLeaderClient.java:128)
~[druid-server-0.12.0.jar:0.12.0] at
io.druid.query.lookup.LookupReferencesManager.fetchLookupsForTier(LookupReferencesManager.java:569)
~[druid-server-0.12.0.jar:0.12.0] at
io.druid.query.lookup.LookupReferencesManager.tryGetLookupListFromCoordinator(LookupReferencesManager.java:420)
~[druid-server-0.12.0.jar:0.12.0] at
io.druid.query.lookup.LookupReferencesManager.lambda$getLookupListFromCoordinator$4(LookupReferencesManager.java:398)
~[druid-server-0.12.0.jar:0.12.0] at
io.druid.java.util.common.RetryUtils.retry(RetryUtils.java:63)
[java-util-0.12.0.jar:0.12.0] at
io.druid.java.util.common.RetryUtils.retry(RetryUtils.java:81)
[java-util-0.12.0.jar:0.12.0] at
io.druid.query.lookup.LookupReferencesManager.getLookupListFromCoordinator(LookupReferencesManager.java:388)
[druid-server-0.12.0.jar:0.12.0]
I have tried to setup from scratch many times with exactly the same steps mentioned on quick-start guide, but I am unable to resolve this error. How to resolve this error?
If you already tried to start druid, then delete the druid-X.Y.Z/log and druid-X.Y.Z/var folders.
Start zookeeper ./zookeeper-X.Y.Z/bin/zkServer.sh start
Recreate those folders you erased with druid-X.Y.Z/bin/init
Run each command in a new tab in this order
java `cat conf-quickstart/druid/coordinator/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/coordinator:lib/*" io.druid.cli.Main server coordinator
java `cat conf-quickstart/druid/overlord/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/overlord:lib/*" io.druid.cli.Main server overlord
java `cat conf-quickstart/druid/broker/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/broker:lib/*" io.druid.cli.Main server broker
java `cat conf-quickstart/druid/historical/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/historical:lib/*" io.druid.cli.Main server historical
java `cat conf-quickstart/druid/middleManager/jvm.config | xargs` -cp "conf-quickstart/druid/_common:conf-quickstart/druid/middleManager:lib/*" io.druid.cli.Main server middleManager
You should now have 1 tab open for each of those commands (so 5).
Insert the data curl -X 'POST' -H 'Content-Type:application/json' -d #quickstart/wikiticker-index.json localhost:8090/druid/indexer/v1/task
You will then see {"task":"index_hadoop_wikiticker_2018-06-06T19:17:51.900Z"}
I have the following problem
I successfully launched Selenium Grid hub with:
java -jar selenium-server-standalone-2.53.0.jar -role hub
After that I tried to launch PhantomJS node with:
phantomjs --webdriver=8090 --webdriver-selenium-grid-hub=http://localhost:4444
but got Error:
[INFO - 2016-03-25T13:56:28.397Z] GhostDriver - Main - running on
port 8090 [INFO - 2016-03-25T13:56:28.397Z] GhostDriver - Main -
registering to Selenium HUB 'http://localhost:4444' version: using
'127.0.0.1:8090' with
org.openqa.grid.selenium.proxy.DefaultRemoteProxy as remote proxy.
[ERROR - 2016-03-25T13:56:28.400Z] GhostDriver - main.fail -
{"line":97,"sourceURL":"phantomjs://platform/hub_register.js","stack":"register#phantomjs://platform/hub_register.js:97:79\nglobal
code#phantomjs://code/main.js:78:37"}
phantomjs://platform/console++.js:263 in error
Standard node works ok, but PhantomJS failes. What I'm doing wrong?
For anyone still looking, there are linux and windows x64 builds available here with the workaround of v2.1.1 (windows build is on a pull request - the hex editor workaround wont work for windows cos the .exe's are compressed)
https://github.com/mrorgues/PhantomJSCustomEdition
workaround***
d/l source from phantomjs http://phantomjs.org/build.html and edit hub_register.js in the src/ghostdriver
comment out lines as shown below:
//var ghostdriver = ghostdriver || {};
return {
capabilities: [{
browserName: "phantomjs",
version: version,
//platform: ghostdriver.system.os.name + '-' + ghostdriver.system.os.version + '-' + ghostdriver.system.os.architecture,
maxInstances: 1,
seleniumProtocol: "WebDriver"
compile and everything works!
shortcut:
https://github.com/darwin10/phantomjs
Original Source : https://github.com/detro/ghostdriver/issues/394
Try replacing localhost with local IP
phantomjs --webdriver=8090 --webdriver-selenium-grid-hub=http://localhost:4444
with
phantomjs --webdriver=8090 --webdriver-selenium-grid-hub=http://127.0.0.1:4444
You can override part of binary file with the dd command.
I'm going to replace platform: with //atform::
$ cp /usr/local/bin/phantomjs .
$ ./phantomjs --version
2.1.1
$ xxd -c 16 phantomjs | grep -C 2 'platform:'
01c6aaa0: 7273 696f 6e3a 2076 6572 7369 6f6e 2c0a rsion: version,.
01c6aab0: 2020 2020 2020 2020 2020 2020 2020 2020
01c6aac0: 706c 6174 666f 726d 3a20 6768 6f73 7464 platform: ghostd
01c6aad0: 7269 7665 722e 7379 7374 656d 2e6f 732e river.system.os.
01c6aae0: 6e61 6d65 202b 2027 2d27 202b 2067 686f name + '-' + gho
$ printf '//' | dd of=phantomjs conv=notrunc bs=1 seek=$((0x01c6aac0+0))
2+0 records in
2+0 records out
2 bytes transferred in 0.000117 secs (17085 bytes/sec)
$ xxd phantomjs | grep 'atform:'
01c6aac0: 2f2f 6174 666f 726d 3a20 6768 6f73 7464 //atform: ghostd
$ ./phantomjs --version
2.1.1
$ mv phantomjs /usr/local/bin/
If you cannot locate the string, try to increase octets per line (xxd -c 256).
I have spent 2 months trying to fix this problem, trying everything possible, my main issue was that many solutions won't connect to the grid, and ones that do are in docker containers what can only connect to a local grid hosted on the same Docker host.
So... I finally built my own solution which works:
https://github.com/madhavajay/selenium-node-phantomjs
Docker image is madhavajay/selenium-node-phantomjs
It uses PhantomJS 2.1.1 Custom Build with fixed Ghostdriver and then my own tweaks to the latest fork of Ghostdriver to allow a custom --remoteHost param all wrapped up in a Docker Container with configurable Environment Variables.
I hope this saves someone the lost weeks I suffered.
I had the same issue. Instead of downloading the source code and compiling, as suggested by Ojen G., I used a fix posted by neuro-sys to make the change in the executable. My OS is Ubuntu 16.04.
Download replacestrings.c program.
wget https://gist.githubusercontent.com/neuro-sys/3bf00b6cf28a93e07e44/raw/52f715fd49fbd271a9450b61d5cd3cf29907a5a0/replacestring.c
Compile program
gcc replacestring.c -o replacestring
Replace Java source code string in binary, creating fixed binary.
./replacestring "$(strings /usr/lib/phantomjs/phantomjs | grep "platform: ghostdriver")" " " < /usr/lib/phantomjs/phantomjs > f_phantomjs
Make binary executable; and put as replacement
chmod +x f_phantomjs
sudo chown root:root f_phantomjs
sudo mv f_phantomjs /usr/lib/phantomjs
cd /usr/lib/phantomjs
sudo echo "Fixed error in phantomjs; old file in e_phantomjs" > README.txt
sudo mv phantomjs e_phantomjs
sudo ln f_phantomjs phantomjs
After these steps, it runs fine (Selenium hub already running):
phantomjs --webdriver=8080 --webdriver-selenium-grid-hub=http://localhost:4444
[INFO - 2016-05-07T16:33:35.534Z] GhostDriver - Main - running on port 8080
[INFO - 2016-05-07T16:33:35.534Z] GhostDriver - Main - registering to Selenium HUB 'http://localhost:4444' version: using '127.0.0.1:8080' with org.openqa.grid.selenium.proxy.DefaultRemoteProxy as remote proxy.
[INFO - 2016-05-07T16:33:35.604Z] HUB Register - register - Registered with grid hub: http://localhost:4444/ (ok)
Following this gist:
https://gist.github.com/neuro-sys/41e368839a9b20dafb34
Editing the binary to put a // in front of the offending line worked for me, but not the string replace thing.
-> Follow the part about using hdex
Search for platform:
and replace with //atform:
by replacing the letters pl with // (2F2F in hex)
I am trying to simulate Hadoop YARN SLS (Scheduling Load Simulator) with the sources given in Hadoop's GitHub and the SLS source files are located in [REF-1].
Here the step I have done :
Using VMWARE as the Host.
Using Ubuntu 14.04
Installing Hadoop v 2.6.0 [REF-2]
User : hduser | group : hadoop
Installing any needed packages (e.g. maven)
Get the clonning file of Hadoop's GitHub [REF-1]
Syntax : git clone https://git.apache.org/hadoop.git
Result : hduser#ubuntu:~/hadoop$
I made the changes inside directory hduser#ubuntu:~/hadoop/hadoop-tools$
FYI : I used the codes from MaxinetSLS [REF-3] as the way I compile the source files. The SLS source files can be downloaded by using this syntax in Linux : git clone https://github.com/wette/netSLS.git. By default, I can run this program with no error. The SLS Simulator can work perfectly.
From MaxiNetSLS's source files, I copied this files below into my work in hduser#ubuntu:~/hadoop/hadoop-tools$ :
netSLS/generator > hduser#ubuntu:~/hadoop/hadoop-tools$
netSLS/html > hduser#ubuntu:~/hadoop/hadoop-tools$
netSLS/sls.sh > hduser#ubuntu:~/hadoop/hadoop-tools$
netSLS/sls/hadoop/ > hduser#ubuntu:~/hadoop/hadoop-tools/hadoop-sls$
Then, I modified some files as follows.
netSLS/sls.sh
#!/usr/bin/env bash
function print_usage {
echo -e "usage: sls.sh TraceFile"
echo -e
echo -e "Starts SLS with the given trace file."
}
if [[ -z $1 ]]; then
print_usage
exit 1
fi
TRACE_FILE=$(realpath $1)
if [[ ! -f ${TRACE_FILE} ]]; then
echo "File not found: ${TRACE_FILE}"
print_usage
exit 1
fi
cd hadoop-sls
OUTPUT_DIRECTORY="/tmp/sls"
mkdir -p ${OUTPUT_DIRECTORY}
ARGS="-inputsls ${TRACE_FILE}"
ARGS+=" -output ${OUTPUT_DIRECTORY}"
ARGS+=" -printsimulation"
mvn exec:java -Dexec.args="${ARGS}"
hduser#ubuntu:~/hadoop/hadoop-tools/hadoop-sls/pom.xml$
[REF-4]
hduser#ubuntu:~/hadoop/hadoop-tools$ nano hadoop-sls/hadoop/etc/hadoop/sls-runner.xml
[REF-5]
Next step, I try to :
Compile the script using hduser#ubuntu:~/hadoop/hadoop-tools/hadoop-sls$ mvn compile
Compiled with no error (mvn_compile_perfect.jpg).
Run the program using hduser#ubuntu:~/hadoop/hadoop-tools$ ./sls.sh generator/small.json
Got the error here (error_json_compile.jpg). :(
Until now, I have went through some information related with similar problems I faced [REF-6] and tried it, but I still get the same problem. I guess I think the problem is in the ~/hadoop/hadoop-tools/hadoop-sls/pom.xml I mistakenly modified. I have lack of knowledge with Linux Environment. :(
References : http://1drv.ms/21zcJIH (txt file)
*Cannot post more than 2 links in my post. :(
I need to start the service of Jboss 7.1.1 remotely through SSH. But when execute the command does not happened.
The command: ssh user#server '/etc/init.d/jboss-as start' #(no error, no service started)
The script jboss-as:
#!/bin/sh
case "$1" in
start)
echo "Starting JBoss AS 7"
su --command "/path/to/jboss-as-7.1.1.Final/bin/standalone.sh >& /dev/null &" root
;;
stop)
echo "Stopping JBoss AS 7"
su --command "/path/to/jboss-as-7.1.1.Final/bin/jboss-cli.sh --connect command=:shutdown" root
;;
*)
echo "Usage: /etc/init.d/jboss-as {start|stop}"
exit 1
;;
esac
exit 0
How to execute the command: ssh user#server 'service jboss-as start' or ssh user#server '/etc/init.d/jboss-as start'?
The connection with ssh is OK
The Jboss Server is OK
If i execute the code: ssh user#server '/etc/init.d/mysql restart' it happens!
One of a few things are limiting your ability to run this service with the command as that is a valid method of starting the service.
user#server '/etc/init.d/jboss-as start'
All of which you can test remotely after initiating the SSH connection. SSH into the server and start the service with the same user you are going to connect with using the above command.
Firstly make sure the service is actually called 'jboos-as' with ls /etc/init.d/ |grep 'jboss'. The result will be exactly how you will call the command so replace jboss-as with the output from the grep.
Secondly it is a permissions issue on the init script. From what I could see online you have to create this script so if the permissions are not setup correctly it will not execute.
To check run ls -al /etc/init.d/ |grep 'jboss' and your output should appear as follows:
Output:
-rwxr-xr-x. 1 root root 2979 Sep 19 05:34 jboss*
The user issuing the start command will need to match the first user listed. In this case the first 'root' and/or be in the same group as the group listing which is the second 'root' in the example. This can vary if for instance your user is in the wheel group, but generally services are run as root or a specific user for that service.
Lastly The more important aspect is that the file is executable. This is listed as the x value in the ls -al output above. If no 'x's are listed you will need to make the file executable with the following:
chmod +x /etc/init.d/jboss
IMPORTANT all the above command will need you to referrence the file as it output in the first grep command, so /etc/init.d/jboss-as or /etc/init.d/jboss or /etc/init.d/jboss-something different.
I hope this helps you out and if it does not please post the results of the ls -al output and we can help you further.
Ok.
Let`s go.
Search the name of the jboss service:
ls /etc/init.d/ |grep 'jboss' Returned "jboss-as". It is ok!
Permissions:
ls -al /etc/init.d/ |grep 'jboss' Returned exactly the same output: -rwxr-xr-x. 1 root root 2979 Sep 19 05:34 jboss-as Its ok!
Still do not works.
The principal objective to execute this command is an action of button in the Java program using SWT and the lib that implements SSH called JSCH. Look the code:
Session session = jsch.getSession("user", "SERVER_IP_ADDRESS", PORT);
session.setPassword("pass");
java.util.Properties config = new java.util.Properties();
config.put("StrictHostKeyChecking", "no");
session.setConfig(config);
session.connect();
Channel channel = session.openChannel("exec");
((ChannelExec)channel).setCommand("'/etc/init.d/jboss-as start'"); #command to start jboss service
channel.setInputStream(null);
((ChannelExec)channel).setErrStream(System.err);
InputStream in=channel.getInputStream();
channel.connect();
The below is the code I am trying to execute to download the source code from AppEngine:
/Users/sridhar/Desktop/backupdata/appengine-java-sdk-1.7.4/bin/appcfg.sh download_app -A maharasims2 -V 23 download_app .
I am getting the Bad Format error:
Bad argument: Expected download directory as an argument after download_app.
AppCfg [options] -A app_id [ -V version ] download_app <out-dir>
Download a previously-uploaded app to the specified directory. The app
ID is specified by the "-A" option. The optional version is specified
by the "-V" option.
Can anyone help me out?
I tried the following and it worked.
Step 1: jdk/bin/appcfg.sh -A < apppid > -V < version > download_app < directory >
Example :
/Users/Desktop/appengine-java-sdk-1.7.4/bin/appcfg.sh -A testapp -V 23 download_app ~/Desktop/backupdata/downloads/
Step 2: http://architecturalatrocities.com/post/19073788679/fixing-the-trustanchors-problem-when-running-openjdk-7
Note :
Use step 2 if you are encountering the following error :
"java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty"
The options should go before the command:
appcfg.sh -A maharasims2 -V 23 download_app .