ubuntu,mysql,haproxy,high-availabilityRelated issues-Collection of common programming errors
Blachshma
matlab ubuntu
I have an excel-file which consists of about roughly 10,000 rows and has a size of around 800KBWhen I try to import the data to MATLAB both with GUI import tool, or using XLSREAD I get the following message:Could not open the spreadsheet. MATLAB reported the following error: XLSREAD unable to read sheet “Sheet1” File contains unexpected record length. Try saving as Excel 98I tried saving as excel 98, but didn’t help?…funny thing is, I can import other excel-files which are bigger than 10,000 r
William Tate
java linux ubuntu audio
I am porting java application from Windows to Linux (Ubuntu 10.10) and came across the playing the sound on the Linux machine. The following code was cut out from the application, it is summarizes the wav file loading into a clip and playing it while needed in loop (till stop pressed). Using JDK6 on windows we run this with no problem, but on open JDK 6 on the Linux there is no sound at all! I have read a lot of stuff on the net here but could not fix the problem. I would appreciate if you coul
Andreas Pasch
java ubuntu process kill
I have a small java server listening on port 10299 for performing some image processing on demand. I start the program as follows:java -Xms15m -Xmx25m -jar /tools/image-server.jar > /tools/image-server.log &After an indeterminate period of time the process gets killed whithout any error message (or at least i haven’t discovered any…). The OS is Ubuntu 10.04.3 LTS.The code itself seems to be working fine, since it is running without error on my other machine.What could cause the unexpect
user2215139
ubuntu sonar
I have downloaded sonar 3.5.1 from sonar using wget “http://dist.sonar.codehaus.org/sonar-3.5.1.zip” command. Then I unziped using unzip sonar-3.5.1.zip command. But when I tried to start sonar using “sudo ./sonar.sh start”, I got the error:…/sonar-3.5.1/bin/linux-x86-64/./wrapper:Syntax error: “(” unexpected Failed to start sonar.May I know the reason by anyone. edited: output of uname -a,Linux ocrfrt 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686 i686 i686 GNU/Linux
Jonas
ubuntu yaws
I need help with setting up yaws-1.89 in ubuntu. This is the error I get:=INFO REPORT==== 3-Dec-2010::16:52:40 === Yaws: Using config file /home/hudson2010/yaws.conf=ERROR REPORT==== 3-Dec-2010::16:52:40 === Config Warning: Directory /var/yaws/ebin for ebin_dir doesn’t exist=ERROR REPORT==== 3-Dec-2010::16:52:40 === Yaws: bad conf: Unexpected tokens “max_connections” at line 30 terminating=INFO REPORT==== 3-Dec-2010::16:52:40 ===application: yawsexited: {shutdown,{yaws_app,start,[normal,[]]}}typ
Andy Lester
linux shell ubuntu xml-parsing sed
I have a file containing the following lines:<parameter name=”PortMappingEnabled” access=”readWrite” type=”xsd:boolean”></parameter><parameter name=”PortMappingLeaseDuration” access=”readWrite” activeNotify=”canDeny” type=”xsd:unsignedInt”></parameter><parameter name=”RemoteHost” access=”readWrite”></parameter><parameter name=”ExternalPort” access=”readWrite” type=”xsd:unsignedInt”></parameter><parameter name=”ExternalPortEndRange” access=”readW
Tim Cooper
ubuntu egrep
Basically if I input a command such as egrep –color=ALWAYS “A{0,10}B” and then enter a string such as ‘AAAAAB’, this gives the desired behavior of being a match. However if I instead change it to egrep –color=ALWAYS “A{,10}B” it is no longer matching strings like the one I gave. In fact I have not been able to come up with a string that matches the one given. Is this unexpected behavior using the {,m} operator, or is my understanding of that operator not correct, as to me {0,10} should be
Rio Eduardo BG Simatupang
ubuntu terminal neo4j
I already followed those instruction in their website http://www.neo4j.org/download/linux but when I install and start neo4j, it seems to be neo4j version 1.9.5 stable.But sadly I want the latest version of neo4j, so I downloaded the neo4j-community-2.0.0-RC1-unix.tar.gz and followed the instruction at http://technoracle.blogspot.com/2012/04/neo4j-installing-running-and-shell.htmlbut when I try to run the neo4j with this command -> sh ./neo4j, it doesn’t work. It displays errors../neo4j: 35: ./n
SNAG
linux ubuntu sed non-ascii-chars
I have a sample text file with some numbers encoded as Non Ascii characters. I Have the character map used to encode the file but when I am using sed to replace each of these characters, I am getting unexpected results. like these¤»¤ ¡ 1 33ô1ô ôôôôô1ô ôôôôôôôôô¤ôôôôô»ôôôôô¤ôôôôôô ô¡ ô 1 3ôThe commands which I have tried are these sed -r ‘s/`echo ô`/5/g’ new.txt sed -r ‘s/\ô/5/g’ new.txtalso perlperl -pe ‘s/\ô/5/g’ < new.txtI need help for this please. Thanks.
agf
python ubuntu gtk pygtk python-idle
I’m trying to import GTK in Ubuntu Python 2.7, and I get the following error. PyGTK imports just fine. When I import gtk, I get the following error:Exception in Tkinter callback Traceback (most recent call last): File “/usr/lib/python2.7/lib-tk/Tkinter.py”, line 1413, in __call__return self.func(*args) File “/usr/lib/python2.7/idlelib/MultiCall.py”, line 167, in handlerr = l[i](event) File “/usr/lib/python2.7/idlelib/PyShell.py”, line 1140, in enter_callbackself.runit() File “/usr/lib/python2.7/
Dr. No
php mysql security
I’m developing a game in PHP+Mysql that is hosted in a shared web hosting.I’m very concerned of the security, because in games is very common that some people try to cheat or broke the game.Until now, I have tested XSS, SQL injection, check permissions of folders, secure passwords, … but well, I know my limitations and I want to be prepared in case something unexpected happens (I don’t know, maybe some techique that I don’t know, or a check that I miss, a guessed password …) If I realize of
Gerep
php mysql zend-framework caching zend-db
When I have a loop like this:foreach(…) {$r1 = $zend_db->fetchRow(“SELECT … “);$zend_table->insert($data_array, $where); }… running a few thousand times. Is it possible, that $r1 doesn’t contain a record inserted in the previous loop?At http://dev.mysql.com/doc/refman/5.1/en/query-cache.html they write “The query cache does not return stale data. When tables are modified, any relevant entries in the query cache are flushed.” But maybe ZEND does some unexpected caching for SELECT or I
Jacob Gabrielson
python mysql sqlalchemy
What’s the right way to control timeouts, from the client, when running against a MySQL database, using SQLAlchemy? The connect_timeout URL parameter seems to be insufficient.I’m more interested in what happens when the machine that the database is running on, e.g., disappears from the network unexpectedly. I’m not worried about the queries themselves taking too long. The following script does what you’d expect (i.e., time out after approximately one second) if somehost is unavailable before
nickf
php mysql comparison
In one bit of code I’m working on, I need to pull a value from the database and check if it is 0. Originally, I had written this as:if ($myVal == 0) { …But when I looked at it again today, I realised a bug there:var_dump(“foo” == 0); // bool(true)// and while we’re here… var_dump(intval(“foo”)); // int(0)Since this value is coming from the database, that usually means it will be a string, so I suppose I could do this:if ($myVal === “0”)but it seems counter-intuitive since I actually want to
Jonathan Leffler
mysql sql postgresql rdbms max
I am using select field1, max(updated_date) from mytable. I get the correct value for max(updated_date), i.e. the largest date. However for field1 I just get the the value for the first record, i.e. “ta1” when I really want the “ta3” value from the third record (the one with the max date value).e.g.+————+———————+ | field1 | update_date | +————+———————+ | ta1 | 2012-03-11 11:05:15 | | ta2 | 2012-03-11 11:05:32 | | ta3 |
Liedman
mysql database
I have a MySQL table with coordinates, the column names are X and Y. Now I want to swap the column values in this table, so that X becomes Y and Y becomes X. The most apparent solution would be renaming the columns, but I don’t want to make structure changes since I don’t necessarily have permissions to do that.Is this possible to do with UPDATE in some way? UPDATE table SET X=Y, Y=X obviously won’t do what I want.Edit: Please note that my restriction on permissions, mentioned above, effectively
Yogesh Suthar
mysql sql
Today I have posted an answer with a query like thisSELECT * FROM table_name where column_name IN (val1,val2,…)Some another user has posted the answer a query like thisSELECT * FROM table_name where val1 IN (column_name)As you can see here the position of the column_name and values are interchanged.From Mysql Docsexpr IN (value,…)Returns 1 if expr is equal to any of the values in the IN list, else returns 0. If all values are constants, they are evaluated according to the type of expr and so
SimpleTouch
mysql ruby-on-rails heroku amazon-web-services
Every once in a while, when we either restart the app or a dyno gets cycled/restarted automatically, a dyno restarts but comes back up with Can’t connect to MySQL server on (url) (110) error. In then will continuously throw !! Unexpected error while processing request: can’t modify frozen array errors at every request we get until we manually restart the dyno. It is then perfectly fine just like all of our other dynosJan 29 22:18:23 myapp heroku/web.26: State changed from up to starting Jan 29
Starx
php mysql
I wrote a php code to replace SQL row values. But it is not working as expectedERROR : Parse error: syntax error, unexpected T_STRING in …… on line 3I think i should not use these quotes ” ” right ? But, when i ran this without ” ” got this errorError updating comment table: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘1’ at line 1Here is my Code<?php include_once(“db.php”); $sql1 = “update t
Ankit Lamba
java mysql hibernate inner-join
I am executing an inner-join query using hibernate-session.createQuery() and I got the error:Feb 21, 2014 5:22:07 PM org.hibernate.hql.internal.ast.ErrorCounter reportError ERROR: line 1:151: unexpected token: on Feb 21, 2014 5:22:07 PM org.hibernate.hql.internal.ast.ErrorCounter reportError ERROR: line 1:151: unexpected token: on line 1:151: unexpected token: onat org.hibernate.hql.internal.antlr.HqlBaseParser.fromJoin(HqlBaseParser.java:1693)at org.hibernate.hql.internal.antlr.HqlBaseParser.fr
coneybeare
apache-2.2 logging log-files haproxy
I am trying to clean out some of the log clutter from my machines and am starting by removing requests that are generated from the server themselves. I have cache warmers running around the clock and I don’t want these polluting the logs.I was able to get apache to stop logging local requests by adding a dontlog for the local IP:SetEnvIf Remote_Addr “RE\.DA\.CT\.ED” dontlog CustomLog “|logger -p local3.info -t http” combined env=!dontlogand now I am looking for something similar to put in a conf
Chris
haproxy
I am having some issues with HAProxy configuration. I have been playing around with it to try and make it more resilient to high server loads and Denial of Service. However, I felt it was working fine until suddenly I was victim of a (D)DoS attack – Haproxy was reporting the backend as down even though I could still access it fine via the direct port.Could somebody please check my HAProxy config and see if there is somewhere I am messing up or why I would be experiencing this.. I just can’t seem
Anand Soni
amazon-ec2 load-balancing haproxy rabbitmq
I wanted to use HAProxy for my web app for load balancing purpose. I am trying to add a new rabbitmq node dynamically in HAProxy server using command : haproxy -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid). I am doing tcp connection mode with leastconn balance algorithm in load balancing. What is expected is when there is 3 connection in one rabbitmq, I add a new rabbit server in HAProxy server. so the next connection would pass to 2nd rabbitmq server which is not happening in my case.
nbevans
haproxy
Is it possible for HAproxy to reload its configuration at runtime, without dropping existing connections?I’ve looked high and low in the documentation for some mention of this but have been unsuccessful. Does anybody know off hand?Thanks.
Anony-Mousse
load-balancing haproxy
We are using HAPROXY to cluster two app servers. Currently, for test purpose, the 2 servers are virtual servers.We are observing lot of Concurrency warnings being logged in the server logs as below[CacheListener] Possible concurrency problem: Replicated version id 273 is less than or equal to in-memory version for session tDC2DAPeZ8ChQ74l1cHgig__What I found, when I did a search in google, is that many such instances could lead to load balancer crashing.I think the issue logged here : https://
guojinpeng
connection statistics reset haproxy was
I’m using haproxy for load balance, it works very happily.I setup a statistics page, this page return “the connection was reset” while I refresh it sometimes.listen status 0.0.0.0:8080stats enablestats refresh 5sstats uri /admin Is this a bug or there’s some configurition problem?thanks!
user1075894
haproxy stunnel pound
I’m looking at introducing a loadbalancer to my existing site infrastructure to help with traffic growth and provide a level of failure protection.The site I am running uses SSL certificates for the login section and I will need to continue with this functionality. The backend servers will need to be aware of the originating IP address so I can’t use the TCP loadbalancing function and will need the SSL terminated on the loadbalancer so I can insert aX-Forwarded-ForHeader. I have seen a couple of
Andrew Smith
iptables haproxy ddos linux-kernel rate-limiting
Please do not reply with “this is not possible”, as it’s waste of time. I am developing cloud appliance and I have a valid reason to protect this layer against DDoS, and there are few companies doing the same, so please dont tell me that I dont have the point, as many companies looking to buy this solution and I dont see the problem with implementing it using stock LinuxMy Linux kernel is crashing with oops on 10.000 connections due to lack of resources like CPU and RAM. I was wondering how to l
Daniel Hough
ssl haproxy
I’m having an issue where HAProxy is crashing with no explanation when I switch from 1.4.12 to 1.5-dev12. The reason I’m switching is for the SSL offloading.My config file doesn’t have any errors, it’s quite simple and it works well with 1.4 – but for some reason when I run it with 1.5-dev12 I see the logs noting that the two backends I have have been set up, and then when I hit one of the frontends, I get an HTTP 400 in the browser and suddenly HAProxy isn’t running anymore when I check.I under
growse
haproxy rabbitmq graphite
I’m trying to pull some metrics into Graphite over a RabbitMQ exchange. I’ve got my publishers merrily publishing data to an exchange called metrics, and I’ve configured carbon.conf with the following:ENABLE_AMQP = True AMQP_HOST = hostname AMQP_PORT = 5672 AMQP_VHOST = /vhost AMQP_USER = user AMQP_PASSWORD = password AMQP_EXCHANGE = metrics AMQP_METRIC_NAME_IN_BODY = TrueThe rMQ installation is a two-node cluster behind haproxy.When this works, it works great. However, quite often, carbon throw
Sandeep
jvm high-availability
I have read on high availability and scalability for J2EE apps. What I could not find is there any patterns on HA (resilience) that we can adopt to mitigate JVM failures.Let me give an example.A service is performing some business logic , writing or reading to/from DB and so on and there is a JVM crash. The reasons could be from pulling the power cord to kill the java process etc etc..How do we do failover for the transactions that were the victims of such unexpected?Thanks a lot for giving me t
Ramie
azure high-availability
After trying to implement High Availability to one of the existing servers following this article https://www.windowsazure.com/en-us/documentation/articles/virtual-machines-capture-image-windows-server/After I was done the newly created machine is running, however I cannot RDP or PING any of the services that are running on the server existing. It shows that the VM is runningHas anyone faced such a problem before ?
Andy
linux high-availability drbd heartbeat linux-ha
I’ve got an active-passive Heartbeat cluster with Apache, MySQL, ActiveMQ and DRBD.Today, I wanted to perform hardware-maintenance on the secondary node (node04), so I stopped the heartbeat service before shutting it down.Then, the primary node (node03) received a shutdown notice from the secondary node (node04).This logging comes from the primary node: node03heartbeat[4458]: 2010/03/08_08:52:56 info: Received shutdown notice from ‘node04.companydomain.nl’. heartbeat[4458]: 2010/03/08_08:52:56 i
bosh
mysql high-availability mysqlimport
Once a day I need to update an MySQL table with a new file downloaded from the Net using ftp and then mysqlimport. However, I want my website to keep running smoothly during the mysqlimport operation, which takes quite some time (it’s a big table). What would be a good way to assure that users do not wait for the import to finish? I am thinking of importing to a temporary table and then renaming it. Is that a good plan?
nepdev
vmware high-availability xen san
I have been looking at virtual storage appliances available for the VMware platform, transforming local storage to replicated storage. Such as VMWare VSA. These still require an extended budget, all includedAny options for XenServer, allowing for live migration, fault tolerance, and high availability without using external SANs?
Ryan French
c# load-balancing rabbitmq high-availability masstransit
I have just finished creating an API where the requests from the API are forwarded to a back-end service via MassTransit/RabbitMQ using the Request/Response pattern. We are now looking at pushing this into production, and are wanting to have multiple instances of the application (both API and service) running on different services, with a load balancer distributing the requests between them.This leaves us in a position where we could potentially lose all of the messages if one of the servers is
Mike Schall
caching high-availability appfabric
I have AppFabric installed and working great caching my ASP.Net Sessions. I have 3 W2k8 Enterprise servers as my cache hosts. I created my cache with the Secondaries=1 option. I’m trying to test the High Availability option. In order to do this, I would like to login to my website, find the cache server that has my session and unplug it from the network (simulating a server crash). If I can still work as a logged in user, I can prove that High Availability is working and the secondary copy
McGovernTheory
Hasnain
asp.net sql visual-studio webserver high-availability
I have a Web application made in ASP.NET and MS SQL 2005 as databaseASP.NET Web App is hosted on : http://192.168.0.90and MS SQL Server DB on : 192.168.0.91User use url : http://192.168.0.91 to access the server.MY DR IP address for Web App http://192.168.0.150 and Database is : 192.168.0.151Suppose my Web Server Fails. i need to Automatically divert user to my Web Application DR Server IP same with DB Server.without user knowing it ? how can i do it…Waiting for your earliest revert.RegardsHas
flypen
virtualization high-availability
I took a look at Redhat Enterprise Linux HA and VMWare HA solution. It’s easy to understand. Several physical servers can build a cluster. The system monitor the status of all VMs. If one VM is down, it can be restarted on other physical server. The applications on this VM can be restarted, too.However, I have a question. In Guest OS, when most of applications write data to files successfully, actually the data are sent to OS cache (e.g., page cache in Linux) if direct IO isn’t used. If Guest OS
Web site is in building