Daily Archives

Articles indexed Thursday November 29 2012

Page 12/17 | < Previous Page | 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • OleDbException in my update method

    - by Hamed Norouzi
    Why do I have this error? The error message is: Syntax error in INSERT INTO statement. I want to add a record to my database, but it isn't working. Where is the problem? The code is: using (OleDbConnection connection = new OleDbConnection(connectionString)) { OleDbDataAdapter DbDataAdabter = new OleDbDataAdapter(); DbDataAdabter.SelectCommand = new OleDbCommand("SELECT * FROM [Phone-Book]", connection); OleDbCommandBuilder cb = new OleDbCommandBuilder(DbDataAdabter); connection.Open(); DataRow dataRow = myDataset.Tables["salam"].NewRow(); dataRow[1] = textBox2.Text; dataRow[2] = textBox3.Text; dataRow[3] = textBox4.Text; dataRow[4] = textBox5.Text; dataRow.EndEdit(); myDataset.Tables["salam"].Rows.Add(dataRow); DbDataAdabter.Update(myDataset , "salam"); connection.Close(); connection.Dispose(); } }

    Read the article

  • Low cost way to host a large table yet keep the performance scalable?

    - by Leo Liang
    I have a growing table storing time series data, 500M entries now, and 200K new records every day. The total size is around 15GB for now. My clients are querying the table via a PHP script mostly, and the size of the result set is around 10K records (not very large). select * from T where timestamp > X and timestamp < Y and additionFilters And I want this operation cheap. Currently my table is hosting in Postgres 7, on a single 16G memory Box, and I would love to see some good suggestion for me to host this in low cost and also allow me to scale up for performance if needed. The table serves: 1. Query: 90% 2. Insert: 9.9% 2. Update: 0.1% <-- very rare.

    Read the article

  • Stored procedure for generic MERGE

    - by GilliVilla
    I have a set of 10 tables in a database (DB1). And there are 10 tables in another database (DB2) with exact same schema on the same SQL Server 2008 R2 database server machine. The 10 tables in DB1 are frequently updated with data. I intend to write a stored procedure that would run once every day for synchronizing the 10 tables in DB1 with DB2. The stored procedure would make use of the MERGE statement. Now, my aim is to make this as generic and parametrized as possible. That is, accommodate for more tables down the line... and accommodate different source and target DB names. Definitely no hard coding is intended. This is my algorithm so far: Have the database names as parameters Have the first query within the stored procedure... result in giving the names of the 10 tables from a lookup table (this can be 10, 20 or whatever) Have a generic MERGE statement that does the sync for each of the above set of tables (based on primary key?) This is where I need more inputs on. What is the best way to achieve this stored procedure? SQL syntax would be helpful.

    Read the article

  • Backbone.Marionette - Collection within CompositeView, which itself is nested in a CollectionView

    - by nicefinly
    *UPDATE: The problem probably involves the tour-template as I've discovered that it thinks the 'name' attribute is undefined. This leads me to think that it's not an array being passed on to the ToursView, but for some reason a string. * After studying similar questions on StackOverflow: How to handle nested CompositeView using Backbone.Marionette? How do you properly display a Backbone marionette collection view based on a model javascript array property? Nested collections with Backbone.Marionette ... and Derick Bailey's excellent blog's on this subject: http://lostechies.com/derickbailey/2012/04/05/composite-views-tree-structures-tables-and-more/ ... including the JSFiddle's: http://jsfiddle.net/derickbailey/AdWjU/ I'm still having trouble with a displaying the last node of a nested CollectionView of CompositeViews. It is the final CollectionView within each CompositeView that is causing the problem. CollectionView { CompositeView{ CollectionView {} //**<-- This is the troublemaker!** } } NOTE: I have already made a point of creating a valid Backbone.Collection given that the collection passed on to the final, child CollectionView is just a simple array. Data returned from the api to ToursList: [ { "id": "1", "name": "Venice", "theTours": "[ {'name': u'test venice'}, {'name': u'test venice 2'} ]" }, { "id": "2", "name": "Rome", "theTours": "[ {'name': u'Test rome'} ]" }, { "id": "3", "name": "Dublin", "theTours": "[ {'name': u'test dublin'}, {'name': u'test dublin 2'} ]" } ] I'm trying to nest these in a dropdown where the nav header is the 'name' (i.e. Dublin), and the subsequent li 's are the individual tour names (i.e. 'test dublin', 'test dublin2', etc.) Tour Models and Collections ToursByLoc = TastypieModel.extend({}); ToursList = TastypieCollection.extend({ model: ToursByLoc, url:'/api/v1/location/', }); Tour Views ToursView = Backbone.Marionette.ItemView.extend({ template: '#tour-template', tagName: 'li', }); ToursByLocView = Backbone.Marionette.CompositeView.extend({ template: '#toursByLoc-template', itemView: ToursView, initialize: function(){ //As per Derick Bailey's comments regarding the need to pass on a //valid Backbone.Collection to the child CollectionView //REFERENCE: http://stackoverflow.com/questions/12163118/nested-collections-with-backbone-marionette var theTours = this.model.get('theTours'); this.collection = new Backbone.Collection(theTours); }, appendHtml: function(collectionView, itemView){ collectionView.$('div').append(itemView.el); } }); ToursListView = Backbone.Marionette.CollectionView.extend({ itemView: ToursByLocView, }); Templates <script id="tour-template" type="text/template"> <%= name %> </script> <script id="toursByLoc-template" type="text/template"> <li class="nav-header"><%= name %></li> <div class="indTours"></div> <li class="divider"></li> </script>

    Read the article

  • How to organize RMI Client-Server eBanking architecture

    - by xenom
    I am developing a secured eBanking service in RMI with a GUI both for Server and Client. The Server must be able to log every operations (new User, deleted User, Withdrawal, Lodgement...) The Client will do these operations. As everything is secured, the Client must at first, create an account with a name and a password in the GUI. After that, the GUI adds the User in the Bank UserList(arrayList) as a new Customer and the User can do several operations. It seems straightforward at first but I think my conception is not correct. Is it correct to send the whole Bank by RMI ? Because at first I thought Bank would be the server but I cannot find another way to do that. Currently, the Client GUI asks for a login and a password, and receives the Bank by RMI. A User is characterized by a name and a hash of the password. private String name; private byte[] passwordDigest; In fact the GUI is doing every security checking and I don't know if it's relevant. When you type login//password, it will search the login in the Bank and compare the hash of the password. In fact I have the impression that the Client knows too much information because when you have the Bank you have everything.. Does it seem correct or do I need to change my implementation ?

    Read the article

  • Rendering PDFs from a database inside MVC views?

    - by Mohammad Sepahvand
    I was wondering if it's possible to do this without using 3rd party compnents in MVC 3. (I am open to free components though.) There are a couple of links out there but they seem to be mostly concerned with reporting and other code samples that do claim to do this sort of thing don't seem to compile. I'm not having any trouble saving and retrieving the PDFs to and from my database, but when I return the PDF as a File or a FileStreamResult the user is prompted with a download. A more desirable approach would be to actually render the PDFs inside the browser. I've had a look at iTextSHarp, it does the job to an extent, but it's not a complete solution. For example it will display the PDF inside the view if and only if the client has Adobe Reader installed, otherwise it prompts for a download. So technically, I'm mostly looking for a PDF viewer. Any ideas?

    Read the article

  • Backup AWS Dynamodb to S3

    - by Ali
    It has been suggested on Amazon docs http://aws.amazon.com/dynamodb/ among other places, that you can backup your dynamodb tables using Elastic Map Reduce, I have a general understanding of how this could work but I couldn't find any guides or tutorials on this, So my question is how can I automate dynamodb backups (using EMR)? So far, I think I need to create a "streaming" job with a map function that reads the data from dynamodb and a reduce that writes it to S3 and I believe these could be written in Python (or java or a few other languages). Any comments, clarifications, code samples, corrections are appreciated.

    Read the article

  • jquery upgrade breaking existing code

    - by Victor
    I have a following event handler which worked in jquery 1.3.2 but stopped working when we upgraded to 1.8.2, still fired but doesn't do anything $('input.maskedInput').focus(function () { $(this).mask("999-999-9999"); }).blur(function () { $(this).unmask(); var numbers = $(this).val().replace(/-/g, '').replace(/_/g, ''); $(this).val(numbers.toString()); }); What could be a problem?

    Read the article

  • Architecture for data layer that uses both localStorage and a REST remote server

    - by Zack
    Anybody has any ideas or references on how to implement a data persistence layer that uses both a localStorage and a REST remote storage: The data of a certain client is stored with localStorage (using an ember-data indexedDB adapter). The locally stored data is synced with the remote server (using ember-data RESTadapter). The server gathers all data from clients. Using mathematical sets notation: Server = Client1 ? Client2 ? ... ? ClientN where, in general, a record may not be unique to a certain client. Here are some scenarios: A client creates a record. The id of the record can not set on the client, since it may conflict with a record stored on the server. Therefore a newly created record needs to be committed to the server - receive the id - create the record in localStorage. A record is updated on the server, and as a consequence the data in localStorage and in the server go out of sync. Only the server knows that, so the architecture needs to implement a push architecture (?) Would you use 2 stores (one for localStorage, one for REST) and sync between them, or use a hybrid indexedDB/REST adapter and write the sync code within the adapter? Can you see any way to avoid implementing push (Web Sockets, ...)?

    Read the article

  • Building Paypal based membership website - total noob - would appreciate help

    - by Ali
    this is a follow up on my question on paypal integration. I'm working ona membership site for racing fans. My membership site has 3 membership levels - free, gold and premium. When a user signs up he/she can gets a free membership on the spot but has the option to upgrade to a gold membership for 4 Dollars a month or a premium membership for 10 Dollars a month. I've gone through the paypal integration guide a few times though and have a vague understanding of how to get this to work. I think the recurring payments option would be fine enough - however I don't know how do I implement this in my system. Like when a user decides to go for a paid account i.e. Gold or premium from basic - what should I do on both my code side and on the paypal account side - I'd really appreciate if anyone would outline what I'd have to do here. Plus when a user decides to upgrade from lets say a Gold to a premium account - there is the issue of computing how much should be charged to upgrade his/her account eg: a user has been billed for 4 dollars and the next day opts to go for a premium account so assuming that the surplus for the rest of the month is 5 dollars and further from that all payments would be recurring 10 dollars monthly - how do I implement this? And in case a user decides to downgrade from a premium account of 10 dollars a month to a gold account of 4 dollars a month - how do I handle the surplus which would have to be refunded for that month alone and changing the membership? And like wise if someone wishes to cancel membership and go to having a free account - how do I refund whatever is owed and cancel the subscription. I'm sorry if it sounds like I'm asking to be spoon fed :( I'm quite new to this and this is for a client and I would really appreciate all the help here and really have to get this working right. Thanks again everyone - waiting for all your replies.

    Read the article

  • Google Games Chat, Episode #9

    Google Games Chat, Episode #9 The Google Games Chat (official motto: "Way less fun than actually playing games") is back! We're hoping to deliver another exciting discussion about industry trends and hot new game-related technologies, but there's a pretty good chance it'll just devolve into 45 minutes of awkward silence. From: GoogleDevelopers Views: 0 5 ratings Time: 03:00:00 More in Science & Technology

    Read the article

  • Easy Web Development With IIS Express

    - by The Official Microsoft IIS Site
    Triggered by a question in the forums the other day, I had started working on a blog post about IIS Express and how it works compared to Visual Studio Development web server, also known as Cassini. During my research I came across this well written and comprehensive post that covers everything that I was going to write about and more. Because of the quality of the information in this post, I wanted to have a quick reference to it in my blog and share it with you. http://www.codeproject.com/Articles...(read more)

    Read the article

  • Fix: Orchard Error ‘The controller for path '/OrchardLocal/' was not found or does not implement IController.

    - by Ken Cox [MVP]
    Suddenly, in a local Orchard 1.6 project, I started getting this error in ShellRoute.cs: The controller for path '/OrchardLocal/' was not found or does not implement IController. Obviously I had changed something, but the error wasn’t helping much.  After losing far too much time, I copied over the original Orchard source code and was back in business. Shortly thereafter, I further flattened my forehead by applying a sudden, solid blow with the lower portion of my palm! You see, in testing the importing of comments via blogML, I had set the added blog as the Orchard site’s Start page. Then, I deleted the blog so I could test another import batch. The upshot was that by deleting the blog, Orchard no longer had a default (home) page at the root of the site. The site’s default content was missing. The fix was to go to the Admin subdirectory (http://localhost:30320/OrchardLocal/admin) . add a new page, and check Set as homepage. Once again, the problem was between the keyboard and the chair. I hope this helps someone else. Ken

    Read the article

  • Advanced Continuous Delivery to Azure from TFS, Part 1: Good Enough Is Not Great

    - by jasont
    The folks over on the TFS / Visual Studio team have been working hard at releasing a steady stream of new features for their new hosted Team Foundation Service in the cloud. One of the most significant features released was simple continuous delivery of your solution into your Azure deployments. The original announcement from Brian Harry can be found here. Team Foundation Service is a great platform for .Net developers who are used to working with TFS on-premises. I’ve been using it since it became available at the //BUILD conference in 2011, and when I recently came to work at Stackify, it was one of the first changes I made. Managing work items is much easier than the tool we were using previously, although there are some limitations (more on that in another blog post). However, when continuous deployment was made available, it blew my mind. It was the killer feature I didn’t know I needed. Not to say that I wasn’t previously an advocate for continuous delivery; just that it was always a pain to set up and configure. Having it hosted - and a one-click setup – well, that’s just the best thing since sliced bread. It made perfect sense: my source code is in the cloud, and my deployment is in the cloud. Great! I can queue up a build from my iPad or phone and just let it go! I quickly tore through the quick setup and saw it all work… sort of. This will be the first in a three part series on how to take the building block of Team Foundation Service continuous delivery and build a CD model that will actually work for any team deploying something more advanced than a “Hello World” example. Part 1: Good Enough Is Not Great Part 2: A Model That Works: Branching and Multiple Deployment Environments Part 3: Other Considerations: SQL, Custom Tasks, Etc Good Enough Is Not Great There. I’ve said it. I certainly hope no one on the TFS team is offended, but it’s the truth. Let’s take a look under the hood and understand how it works, and then why it’s not enough to handle real world CD as-is. How it works. (note that I’ve skipped a couple of steps; I already have my accounts set up and something deployed to Azure) The first step is to establish some oAuth magic between your Azure management portal and your TFS Instance. You do this via the management portal. Once it’s done, you have a new build process template in your TFS instance. (Image lifted from the documentation) From here, you’ll get the usual prompts for security, allowing access, etc. But you’ll also get to pick which Solution in your source control to build. Here’s what the bulk of the build definition looks like. All I’ve had to do is add in the solution to build (notice that mine is from a specific branch – Release – more on that later) and I’ve changed the configuration. I trigger the build, and voila! I have an Azure deployment a few minutes later. The beauty of this is that it’s all in the cloud and I’m not waiting for my machine to compile and upload the package. (I also had to enable the build definition first – by default it is created in disabled state, probably a good thing since it will trigger on every.single.checkin by default.) I get to see a history of deployments from the Azure portal, and can link into TFS to see the associated changesets and work items. You’ll notice also that this build definition also automatically put my code in the Staging slot of my Azure deployment – more on this soon. For now, I can VIP swap and be in production. (P.S. I hate VIP swap and “production” and “staging” in Azure. More on that later too.) That’s it. That’s the default out-of-box experience. Easy, right? But it’s full of room for improvement, so let’s get into that….   The Problems Nothing is perfect (except my code – it’s always perfect), and neither is Continuous Deployment without a bit of work to help it fit your dev team’s process. So what are the issues? Issue 1: Staging vs QA vs Prod vs whatever other environments your team may have. This, for me, is the big hairy one. Remember how this automatically deployed to staging rather than prod for us? There are a couple of issues with this model: If I want to deliver to prod, it requires intervention on my part after deployment (via a VIP swap). If I truly want to promote between environments (i.e. Nightly Build –> Stable QA –> Production) I likely have configuration changes between each environment such as database connection strings and this process (and the VIP swap) doesn’t account for this. Yet. Issue 2: Branching and delivering on every check-in. As I mentioned above, I have set this up to target a specific branch – Release – of my code. For the purposes of this example, I have adopted the “basic” branching strategy as defined by the ALM Rangers. This basically establishes a “Main” trunk where you branch off Dev and Release branches. Granted, the Release branch is usually the only thing you will deploy to production, but you certainly don’t want to roll to production automatically when you merge to the Release branch and check-in (unless you like the thrill of it, and in that case, I like your style, cowboy….). Rather, you have nightly build and QA environments, or if you’ve adopted the feature-branch model you have environments for those. Those are the environments you want to continuously deploy to. But that takes us back to Issue 1: we currently have a 1:1 solution to Azure deployment target. Issue 3: SQL and other custom tasks. Let’s be honest and address the elephant in the room: I need to get some sleep because I see an elephant in the room. But seriously, I can’t think of an application I have touched in the last 10 years that doesn’t need to consider SQL changes when deploying code and upgrading an environment. Microsoft seems perfectly content to ignore this elephant for now: yes, they’ve added Data Tier Applications. But let’s be honest with ourselves again: no one really uses it, and it’s not suitable for anything more complex than a Hello World sample project database. Why? Because it doesn’t fit well into a great source control story. Developers make stored procedure and table changes all day long while coding complex applications, and if someone forgets to go update the DACPAC before the automated deployment, you have a broken build until it’s completed. Developers – not just DBAs – also like to work with SQL in SQL tools, not in Visual Studio. I’m really picking on SQL because that’s generally the biggest concern that I hear. But we need to account for any custom tasks as well in the build process.   The Solutions… ? We’ve taken a look at how this all works, and addressed the shortcomings. In my next post (which I promise will be very, very soon), I will detail how I’ve overcome these shortcomings and used this foundation to create a mature, flexible model for deploying my app – any version, any time, to any environment.

    Read the article

  • Great Customer Service Example

    - by MightyZot
    A few days ago I wrote about what I consider a poor customer service interaction with TiVo, a company that I have been faithful to for the past 12 years or so. In that post I talked about how they helped me, but I felt like I was doing something wrong at the end of the call – when in reality I was just following through with an offer that TiVo made possible through my cable company. Today I had a wonderful customer service interaction with American Express, another company that I have been loyal to for many years.(I am a Gold Card member.) I like my Amex card because I can use it for big purchases and it forces me to pay them off at the end of the month. Well, the reality is that I’m not always so good at doing that, so sometimes my payments are over a couple of months.  :) A few days ago I received an email from “American Express” fraud detection. The email stated that I should call a toll free number and have the last four digits of my card handy. I grew up during the BBS era with some creative and somewhat mischievous friends. I’ve learned to be extremely cautious with regard to my online life! So, I did what you would expect…I sent them a nice reply that said “Go screw yourself.” For the past couple of days someone has been trying to call me and I assumed it was the same prankster trying to get the last four digits of my card. The last caller left a message indicating that they were from American Express and they wanted to talk to me about my card. After looking up their customer service numbers on the www.americanexpress.com web site, I called and was put through to the fraud detection group. The rep explained that there were some charges on my wife’s card that did not fit our purchase profile. She went through each charge and, for the most part, they looked like charges my wife may have made. My wife had asked to use the card for some Christmas shopping during the same timeframe as the charges. The American Express rep very politely explained that these looked out of character to her. She continued through the charges. She listed a charge for $160 – at this point my adrenaline started kicking in. My wife said she was going to charge about $25 or $30 dollars, not $160. Next, the rep listed a charge for over $1200. Uh oh!! Now I know that my account has been compromised. I informed the rep that we definitely did not make those charges. She replied with, “that’s ok Mr Pope, we declined those charges as well as some others.” We went through the pending charges and there were a couple more that were questionable. The rep very patiently waited while I called my wife on my office phone to verify the charges. Sure enough, my wife had not ordered anything from Netflix or purchased anything with Yahoo Wallet! “No problem Mr Pope, we will remove those charges as well.” “We are going to cancel your wife’s card and send her a new one. She will receive it by 7pm tomorrow via Federal Express. Please watch your statements over the next couple of months. If you notice anything fishy, give us a call and we will take care of it for you.” (Wow, I’m thinking to myself!) “Is there anything else I can help you with Mr Pope?” “Nope, thank you very much for catching this so early and declining those charges!”, I said smiling. Apparently she could hear me smiling on the other end of the phone line because she replied with “keep smiling Mr Pope and have a good rest of your week.” Now THAT’s customer service!  Thank you American Express!!! I shall remain an ever faithful customer. Interesting…

    Read the article

  • Making WatiN Wait for JQuery document.Ready() Functions to Complete

    - by Steve Wilkes
    WatiN's DomContainer.WaitForComplete() method pauses test execution until the DOM has finished loading, but if your page has functions registered with JQuery's ready() function, you'll probably want to wait for those to finish executing before testing it. Here's a WatiN extension method which pauses test execution until that happens. JQuery (as far as I can see) doesn't provide an event or other way of being notified of when it's finished running your ready() functions, so you have to get around it another way. Luckily, because ready() executes the functions it's given in the order they're registered, you can simply register another one to add a 'marker' div to the page, and tell WatiN to wait for that div to exist. Here's the code; I added the extension method to Browser rather than DomContainer (Browser derives from DomContainer) because it's the sort of thing you only execute once for each of the pages your test loads, so Browser seemed like a good place to put it. public static void WaitForJQueryDocumentReadyFunctionsToComplete(this Browser browser) { // Don't try this is JQuery isn't defined on the page: if (bool.Parse(browser.Eval("typeof $ == 'function'"))) { const string jqueryCompleteId = "jquery-document-ready-functions-complete"; // Register a ready() function which adds a marker div to the body: browser.Eval( @"$(document).ready(function() { " + "$('body').append('<div id=""" + jqueryCompleteId + @""" />'); " + "});"); // Wait for the marker div to exist or make the test fail: browser.Div(Find.ById(jqueryCompleteId)) .WaitUntilExistsOrFail(10, "JQuery document ready functions did not complete."); } } The code uses the Eval() method to send JavaScript to the browser to be executed; first to check that JQuery actually exists on the page, then to add the new ready() method. WaitUntilExistsOrFail() is another WatiN extension method I've written (I've ended up writing really quite a lot of them) which waits for the element on which it is invoked to exist, and uses Assert.Fail() to fail the test with the given message if it doesn't exist within the specified number of seconds. Here it is: public static void WaitUntilExistsOrFail(this Element element, int timeoutInSeconds, string failureMessage) { try { element.WaitUntilExists(timeoutInSeconds); } catch (WatinTimeoutException) { Assert.Fail(failureMessage); } }

    Read the article

  • Day in the Life of Agile - The Forge Michigan November 27, 2012

    - by csmith18119
    Went to training at The Forge yesterday and did a Day in the life of Agile with Pillar.  It was pretty good. Check them out at: http://pillartechnology.com/ Abstract: A single-day agile project simulation that is engaging, educational, provocative, and fun. This simulation introduces concepts like time-boxed iterations, User Stories, collective estimation, commitment to a product owner for iteration scope, formal verification ritual at iteration conclusion, tracking velocity, and making results big and visible through charts. The exercise is designed to simulate not only how agile teams and practices work, but the inevitable challenges that arise as teams attempt to adopt such practices. One of the best parts of this training was getting some hands on experience with agile.  We used a program called Scratch to create an arcade video game.  Our team chose Frogger.  We had 3 iterations at 20 minutes each.  I think we did pretty good but in the panic of trying to get a bunch done in only 20 minutes made it interesting. To check out our project, I uploaded it to my CodePlex site Download Source Code (Under Scratch/Frogger) Cool class! I highly recommend if you get the opportunity.

    Read the article

  • Apache Conf files: If Hostname=="Web4" Then Use This IP for VirtualHost

    - by jroberts
    I am getting ready to do a "spring cleaning" on the web heads at work. I would really like to put my config files into a git repo, and use the same config files for all the web heads. This is a problem for the sites that are on port 443. Is there anyway to do an if statement or something like that inside the conf file itself? I am trying to avoid writing a script to generate the conf files. Any ideas are greatly appreciated!! Thank you! Jeff

    Read the article

  • sudo suddenly stopped working on debian

    - by chovy
    I've been using 'sudo ' since I setup my server about a week ago. It suddently stopped working with no explanation. I am in 'sudo' group. So there should be no config change required to /etc/sudoers $ sudo apt-get install tsocks [sudo] password for me: me is not in the sudoers file. root@host:/etc# groups me me : me sudo The only thing it could possibly be related to was I added the following line to sshd_config: PermitRootLogin without-password But I have since changed that back to PermitRootLogin yes Permission on file is 400: ls -l /etc/sudoers -r--r----- 1 root root 491 Sep 28 21:52 /etc/sudoers No idea why it stopped working, or how to fix it.

    Read the article

  • Why do these ipfw delayed pipes have no effect?

    - by troutwine
    I'm on OSX 10.7.5 and am attempting to add some latency to the connection to my personal domain with ipfw, using this article as a guide. Normal latency: > ping -c5 troutwine.us PING troutwine.us (198.101.227.131): 56 data bytes 64 bytes from 198.101.227.131: icmp_seq=0 ttl=56 time=92.714 ms 64 bytes from 198.101.227.131: icmp_seq=1 ttl=56 time=91.436 ms 64 bytes from 198.101.227.131: icmp_seq=2 ttl=56 time=91.218 ms 64 bytes from 198.101.227.131: icmp_seq=3 ttl=56 time=91.451 ms 64 bytes from 198.101.227.131: icmp_seq=4 ttl=56 time=91.243 ms --- troutwine.us ping statistics --- 5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 91.218/91.612/92.714/0.559 ms Enabling ipfw: > sudo sysctl -w net.inet.ip.fw.enable=0 net.inet.ip.fw.enable: 1 -> 0 > sudo sysctl -w net.inet.ip.fw.enable=1 net.inet.ip.fw.enable: 0 -> 1 The configuration of the pipe: > sudo ipfw add pipe 1 ip from any to 198.101.227.131 00200 pipe 1 ip from any to any dst-ip 198.101.227.131 > sudo ipfw add pipe 2 ip from 198.101.227.131 to any 00500 pipe 2 ip from 198.101.227.131 to any > sudo ipfw pipe 1 config delay 250ms bw 1Mbit/s plr 0.1 > sudo ipfw pipe 2 config delay 250ms bw 1Mbit/s plr 0.1 The pipes are in place and configured: > sudo ipfw -a list 00100 166 14178 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in 00200 0 0 pipe 1 ip from any to 198.101.227.131 00300 0 0 pipe 2 ip from 198.101.227.131 to any 65535 37452525 32060610029 allow ip from any to any > sudo ipfw pipe list 00001: 1.000 Mbit/s 250 ms 50 sl.plr 0.100000 0 queues (1 buckets) droptail mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 00002: 1.000 Mbit/s 250 ms 50 sl.plr 0.100000 0 queues (1 buckets) droptail mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 Yet, this has had no effect: > ping -c5 troutwine.us PING troutwine.us (198.101.227.131): 56 data bytes 64 bytes from 198.101.227.131: icmp_seq=0 ttl=56 time=100.920 ms 64 bytes from 198.101.227.131: icmp_seq=1 ttl=56 time=91.648 ms 64 bytes from 198.101.227.131: icmp_seq=2 ttl=56 time=91.777 ms 64 bytes from 198.101.227.131: icmp_seq=3 ttl=56 time=91.466 ms 64 bytes from 198.101.227.131: icmp_seq=4 ttl=56 time=93.209 ms --- troutwine.us ping statistics --- 5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 91.466/93.804/100.920/3.612 ms What gives? I understand that ipfw is depreciated, but the manpage does not mention it being disabled. Also, I am not using Network Link Controller as I want to affect a single host.

    Read the article

  • MySQL partition "full"?

    - by gdea73
    I have a server that runs Debian 6.2, with Apache, PHP5, and MySQL. Well, I hadn't done anything with MySQL at all so far, just Apache and PHP; I must have installed it (mysql-server) at some point along the line, and I decided to login to the database for the first time a couple days ago as I was considering using the database for a future website project. I noticed that the "root" user had a password, and I didn't recall having set one. My usual root password was incorrect. So I attempted to reset the password. sudo service mysql stop (stopped successfully) sudo /usr/bin/mysqld_safe --skip-grant-tables --skip-networking & started successfully, from what I can tell. However, mysql itself returns "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld,sock' (2)", and additionally sudo service mysql start returns "/etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! ... failed!" df -h tells me that / is 26% used, a 20GB partition, and /home, roughly 900GB, has only 5% usage. On a potentially related note, I've been experiencing random hangs since I noticed this problem, my tty2 randomly froze several times while idle, and the entire system is suddenly unstable. gnome-terminal also does not open. (Gnome-terminal apparently works now, disregard that part, but the server is still being somewhat unstable, I randomly lost connection when I was SSHed into it from my laptop, twice now.)

    Read the article

  • Plesk Postfix SMTP 550 5.7.1 "Command rejected" for one external sender

    - by Mnebuerquo
    My server is rejecting emails from one external sender. I suspect this might be misconfiguration on the sending server, but I'm not sure from these error messages. The non-delivery report message the sender gets contains this text: #5.7.1 smtp;550 5.7.1 Command rejected> #SMTP# I also see this message in /var/messages at about the same time as the rejection message was sent, though I'm not sure if it's actually related: Nov 29 12:29:28 localhost postfix/smtpd[31829]: sql_sqlite3 plugin: no result found I'm using Plesk 10.4.4 Update #47, Centos 6.2, Postfix 2.8.4-11100615 on my mail server. This is only happening for one sender so far, but I found a Google result on experts-exchange.com which seemed to identify the same problem and with the same sending domain. This was posted back in June, and currently has no answers, so even if I was a paying customer it wouldn't be answered. (http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Q_27760746.html) The generating server is bigfish.com. What I need to determine is if this is a problem on my server or a problem with bigfish.com. Is there more information I can find in config files, logs, etc. to figure this out?

    Read the article

  • uploading php files into my root folder and sending spam

    - by Mustafa Oenal
    i do not understand how but someone is uploading a php file into the public_html directory of my CentOS 6 server like statisticsuQPo.php this php file gives me "linux10+cfcd208495d565ef66e7dff9f98764da" and it is sending spam mail's without end. i have remove the file maybe 10 times but i do got it back every day. how can i solve this problem? is there anything wrong with my apache configuration?

    Read the article

  • WSUS works, but checkhealth logs events 13042 12002 12012 12032 12022 12042 12052

    - by jobu1324
    Our WSUS server stopped working until the patch related to .NET 4.0 was installed, at which point clients started downloading and updating again. However, the WSUS mmc console occasionally disconnects when performing various tasks, such as running automatic approval rules; also wsusutil checkhealth creates the following events: 13042: Self-update is not working. 12002: The Reporting Web Service is not working. 12012: The API Remoting Web Service is not working. 12032: The Server Synchronization Web Service is not working. 12022: The Client Web Service is not working. 12042: The SimpleAuth Web Service is not working. 12052: The DSS Authentication Web Service is not working. Apparently there are many possible causes for these events. I'm looking for a way to figure out what is wrong, so that I can fix it.

    Read the article

  • Server-side SSH jump hosts

    - by Dan Sosedoff
    Trying to figure out server side SSH jump hosts logic. Current network schema: [Client] <--> [Server A: hostname: a.com] <--> [Server B] [Client] <--> [Server A: hostname: b.com] <--> [Server C] Server A responds to both DNS records. Possible flow: Client opens a ssh connection with ssh [email protected]. Server A accepts it and should automatically jump user onto Server B with ssh user2@server_b.com. Client opens a ssh connection with ssh [email protected]. Server A accepts it and should automatically just user onto Server C with ssh user2@server_c.com. In other words, client should be able to connect to the target without performing any local configuration, assuming that we have a stock ssh config. The problem with ssh jumps is that user has to define hosts in local ~/.ssh/config file, which is not acceptable in my case. It needs to be a default sshd behavior. Im aware that you can define a custom command ~/.ssh/authorized_keys on server, but i dont think there is a way to properly detect source hostname where user tries to connect. It is possible at all ?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17  | Next Page >