ubuntu-12.04

Restart Mysql automatically when ubuntu on EC2 micro instance kills it when running out of memory

淺唱寂寞╮ 提交于 2019-12-01 03:41:30
问题 When the system runs out of memory, ubuntu 12.04 kills the mysql process: Out of memory: Kill process 17074 (mysqld) score 146 or sacrifice child So the process ends up killed. This happens at peaks of server load and mainly because of apache getting wild and eating the remaining available memory. Possible approaches could be: Change somewhere somehow the priority of mysql, so it's not killed (probably a bad fix as something else will be killed) Monitor the status of mysql and restart

Zookeeper ensemble not coming up

我是研究僧i 提交于 2019-12-01 03:37:00
问题 I am trying to configure the ensemble of 3 nodes following the documentation. All of them are on Linux Ubuntu. on all the three nodes configuration file looks like this : zoo.cfg under $ZOOKEEPER_HOME/conf tickTime=2000 dataDir=/home/zkuser/zookeeper_data clientPort=2181 initLimit=5 syncLimit=2 server.1=ip.of.zk1:2888:3888 server.2=ip.of.zk2:2888:3888 server.3=ip.of.zk3:2888:3888 I've also placed respective " myid " files under /home/zkuser/zookeeper_data/ directory. This myid files contain 1

Kivy hello world not working

和自甴很熟 提交于 2019-12-01 03:34:08
问题 I am trying to make kivy work on my Ubuntu system. I followed the instructions from their wesbite. But when I try to run the following hello world code from their website: import kivy kivy.require('1.5.1') # replace with your current kivy version ! from kivy.app import App from kivy.uix.button import Button class MyApp(App): def build(self): return Button(text='Hello World') if __name__ == '__main__': MyApp().run() I get following error : [INFO ] Kivy v1.5.1 [INFO ] [Logger ] Record log in

Is it possible to call method within a java application from a different JVM?

自古美人都是妖i 提交于 2019-12-01 02:49:32
问题 When I first developed a java service for windows using apache daemon, I used the JVM mode which I liked a lot. You specify your class and start\stop (static) methods. But with Linux, Jsvc doesn't look like it has the same option. I would really like to know why ?! Anyway If I'm going to use Linux's init system, I'm trying to find a similar way to accomplish the same behavior which is to start the app in anyway but to stop it, I'll have to call a method in a class. My question is, after the

Changing the file descriptor size in httperf

和自甴很熟 提交于 2019-12-01 02:12:22
问题 I'm doing a series of benchmarks and found the httpperf tool. But the version in my ubuntu 12.04 has a too small file descriptor size. Because it warns me with this message: httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE There used to be guide to compile httperf with a bigger size in http://gom-jabbar.org/articles/2009/02/04/httperf-and-file-descriptors but the site is down now. Does anyone knows the steps to compile the tool with the proper

GoLang - termbox: panic: open /dev/tty: no such device or address

我的未来我决定 提交于 2019-12-01 01:32:10
I am coding with Go 1.2 on Ubuntu 12.04 LTS machine - using LiteIDE (very pleased with it). I downloaded and installed the go termbox package - built the demo keyboard.go - built fine. But when I run from LiteIDE, I get this panic - same happens with all the termbox demos: panic: open /dev/tty: no such device or address Any clues would be helpful.... OK, that's completely reasonable: interactive terminal applications require, well, terminal to be available. Terminals may be real— hardware —or virtual (like Linux virtual terminals you see on a typical x86 box when you hit Ctrl-Alt-F1) or

non www to www using AWS Elastic Load balancer and Nginx

有些话、适合烂在心里 提交于 2019-11-30 23:29:05
I have an app running on example.com and now I wanna redirect all the traffic to the www.example.com since we are collaborating with Akamai's CDN for your website. My domain is parked in Route53, added the CNAME of Elastic Load Balancer's CNAME to pointing to *.example.com and I am running nginx web server with the following configuration. If I use this configuration ELB is throwing the instance out, now domain.com works fine and www.domain.com fine, but redirecting is not happening. server { listen 80; server_name example.com; # rewrite ^ http://www.example.com$request_uri? permanent; root

GoLang - termbox: panic: open /dev/tty: no such device or address

余生长醉 提交于 2019-11-30 20:55:49
问题 I am coding with Go 1.2 on Ubuntu 12.04 LTS machine - using LiteIDE (very pleased with it). I downloaded and installed the go termbox package - built the demo keyboard.go - built fine. But when I run from LiteIDE, I get this panic - same happens with all the termbox demos: panic: open /dev/tty: no such device or address Any clues would be helpful.... 回答1: OK, that's completely reasonable: interactive terminal applications require, well, terminal to be available. Terminals may be real—hardware

gcloud installation permission issue on Ubuntu 12.04

99封情书 提交于 2019-11-30 18:50:52
I have installed PHP App Engine SDK first. Then, I installed Google Cloud SDK using: sudo curl https://sdk.cloud.google.com | bash but it's showing error while installing. Then, I installed Google Cloud SDK from a zip file, but it shows an error at the final stage of installation: /home/nikhil/google-cloud-sdk/install.sh Welcome to the Google Cloud SDK! Traceback (most recent call last): File "/home/nikhil/google-cloud-sdk/bin/bootstrapping/install.py", line 20, in <module> from googlecloudsdk.gcloud import gcloud File "/home/nikhil/google-cloud-sdk/bin/bootstrapping/../../lib/googlecloudsdk

wkhtmltopdf patched qt?

北城以北 提交于 2019-11-30 17:58:58
I'm trying to convert multiple URLs to PDF. However, when I compile wkhtmltopdf or run apt-get install wkhtmltopdf and try, it says: Error: This version of wkhtmltopdf is build against an unpatched version of QT, and does not support more then one input document. If I use the static version, I get Segmentation fault error. How do I build wkhtmltopdf against a patched version of QT, or are there any other solutions besides converting one by one and reuniting? My OS is Ubuntu 12.04 64-bit. Thanks. m3rg First check out the source git clone git://gitorious.org/~antialize/qt/antializes-qt.git