I am using Apache command line interface to accept run time parameters.
While in my code, I am using -t to specify run time topology name.
But to my surprise, it didn't work. I took 2 hours to debug this problem and finally by chance I compare the result and find our that
It's complaining about the - character. What is wrong with it?
I used Notepad++ and there is good plugin called HexEditor and it gives our the answer
This is causing strange problem.
You may ask why. This is because when someone sent me the command from Outlook, it was already junked.
OK. the lesson and learn here is to be careful of the characters you pasted from Outlook, especially when it's in Chinese environment. We may try to type the command again to avoid problems.
If you find this article is useful, please click the ads on this page to help. Thank you very much.
I am using supevisord which is a great tool to spawn processes
http://supervisord.org/running.html
When I get things configured, I run supervisor with the command below:
supervisord -c /etc/supervisord.conf
Supervisor runs successfully and I can see programs got started, but when I check processes using
supervisorctl status
I got an strange error as below:
I tried several solutions for example change supervisord.conf ot use http socket
It even reported an refuse connection error.
supervisorctl status http://127.0.0.1:9001 refused connection.
I searched a lot and finally got the solution.
Problem:
I was using a old version of supervisord.conf file, people who work on clusters and do maintenance work often do this. But the problem happend because I did a fresh install of supervisord, and copied a supervisord.conf from another machine. The install is the latest version, and the copied one is old, which caused the problem.
The solution is very simple:
echo_supervisord_conf > /etc/supervisord.conf
#modify supervisord.conf, after it's done
sudo supervisord -c /etc/supervisord.conf
sudo supervisorctl status
The first line generates a new supervisord.conf which is a template, and then you can modify with the programs you want to start. And then start supervisord and check status. The result is good.
If you find this article is useful, please click the ads on this page to help. Thank you very much.
We are using Storm 0.9.3 and when we try to start supervisor node we found it reported the error below:
Clearly this is a slf4j multiple binding problem. Basically this famous library is used in different jars, when there are multiple slf4j find in the path only one will be picked up so that some jars called in a different version of slf4j will cause these compatibility problems.
For the log above it clear states that there are 3 slf4j bindings under lib
slf4j-jdk14-1.5.6.jar
slf4j-nop-1.5.3.jar
logback-classic-1.0.13.jar
And it needs 1.6 above as it said
SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.
SLF4J: Your binding is version 1.5.5 or earlier.
SLF4J: Upgrade your binding to version 1.6.x.
Storm is compiled and tested, why it will have multiple slf4j* jars? The actual result is Storm vanilla package is good, but we add some jars to its lib folder:
So that when we package our Storm jar, we don't need each time to include all the packages it required, this is to save time: we develop on windows and upload developed package jar into cluster, if we can have a smaller generated jar file we save our time.
Let's not judge whether this method is good or not, but the problem here is to solve the binding problem.
The solution is simple:
From eclipse dependency
Let's remove these two jars which are slf4j 1.5.*
slf4j-jdk14-1.5.6.jar
slf4j-nop-1.5.3.jar
It can successfully launch now.
Then here comes another question: when we package Storm application, we want solve the slf4j multiple binding problem?
There is a nice pom.xml for you to reference (partial of pom.xml), this is what I searched and copied from internet, honor and thanks go to the original author.
org.codehaus.gmavengmaven-plugin1.5packageexecute
File targetDir = new
File("${project.basedir.path}/target".toString())
println "dir is ${targetDir.path}"
String jarBaseName = "${project.artifactId}-${project.version}"
File jarWithUnwantedStuff = new File(targetDir,
"${jarBaseName}-jar-with-dependencies.jar".toString())
def explodedJarDir = new File(targetDir, "explodedJar".toString())
def ant = new AntBuilder() // create an antbuilder
ant.unzip(src: "${jarWithUnwantedStuff.path}",
dest: explodedJarDir.path,
overwrite: "false")
File finalJar = new File(targetDir, "${jarBaseName}-deployable.jar")
unwantedClassesDir = new File(explodedJarDir,
"/org/slf4j/impl".toString())
unwantedClassesDir.deleteDir()
ant.zip(basedir: explodedJarDir.path, destFile: finalJar.path)
If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.
We have attended an Android training class and the lecturer told us that Genymotion is so far the best Android emulator.
https://www.genymotion.com/
I have setup a device as shown above: Nexus 5 and it can successfully run. But the problem is, when I am in company, I cannot access the network. But you can see on the top the WiFi icon shows connection is successful.
I searched and finally found out a solution.
1. Click and hold the Connected WiFi (typically the name is WiredSSID) for 2 or 3 seconds.
2. Choose modify network
3. Specify the proxy hostname and port, then click Save
4. Now you can web surf!
If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.
Our ALM system upgraded to ALM 12 and I tried to use new URL in Internet Explorer but...
error message:
I am using Windows 7 and finally I found a solution.
In Windows XP: it's "%USERPROFILE%\Local Settings\Application Data\HP ALM-Client"
In Windows 7: it's "%UserProfile%\AppData\Local\HP\ALM-Client"
Fix
- Make sure that user has Write permission on the ALM client installation folder.
- Delete this folder
- Then close IE, then go to the IE icon in the start menu, right-click on the IE icon and select “run as administrator” from the menu.
In my Windows 7 environment, I go to C:\Users\{user}\AppData\Local\HP\ALM-Client
delete the recent generated folder and then launch IE as an administrator
It's back running again!
If you find this blog is useful, please kindly click the ads on this page to help. Thank you very much.