Siege Aborted Due to Excessive Socket Failure

Siege aborted due to excessive socket failure

The problem may be that you run out of ephemeral ports. To remedy that, either expand the number of ports to use, or reduce the duration that ports stay in TIME_WAIT, or both.

Expand the usable ports:

Check your current setting:

$ sudo sysctl net.inet.ip.portrange.hifirst

net.inet.ip.portrange.hifirst: 49152

Set it lower to expand your window:

$ sudo sysctl -w net.inet.ip.portrange.hifirst=32768

net.inet.ip.portrange.hifirst: 49152 -> 32768

(hilast should already be at the max, 65536)

Reduce the maximum segment lifetime

$ sudo sysctl -w net.inet.tcp.msl=1000

net.inet.tcp.msl: 15000 -> 1000

Siege startup error - unable to connect to socket

There was a bug in earlier versions of Siege that prevented the use of IP addresses on certain systems. By downloading and compiling the latest version of siege (>3) this issue should be resolved.

Can someone explain the ivy.xml dependency's conf attribute?

First of all, Ivy is not Maven ;)

Maven2 is a software project management and comprehension tool, whereas Ivy is only a dependency management tool.

Ivy heavily relies on a unique concept called configuration.

In Ivy, a module configuration is a way to use or to see the module.

For instance, you can have a test and runtime configuration in your module. But you can also have a MySQL and an Oracle configuration. Or an Hibernate and a JDBC configuration.

In each configuration, you can declare:

  • what artifacts (jar, war, ...) are required.
  • your dependencies on other modules, and describe which configuration of the dependency you need. This is called configuration mapping.

So the conf attribute does precisely that: Describes a configuration mapping for a dependency.

The mapped child element is your "right hand side of the -> symbol" and represents the name of the dependency configuration mapped. '*' wildcard can be used to designate all configurations of this module.

See more at "Simplest Explanation of Ivy Configuration" from Charlie Hubbard

The important part of that is Ivy downloads dependencies and organizes them.

An ivy-module (ie ivy.xml file) has two main parts:

  • What dependencies do you need?
  • How do you want them organized?

The first part is configured under the <dependencies> element.

The 2nd is controlled by the <configurations> element

When Ivy is downloading these dependencies it needs to know what scopes to use when pulling these transitive dependencies (are we pulling this for testing, runtime, compilation, etc?). We have to tell Ivy how to map our configurations to Maven scopes so it knows what to pull.


Maven2 on its side has something called the scope.

You can declare a dependency as being part of the test scope, or the buildtime scope.

Then depending on this scope you will get the dependency artifact (only one artifact per module in maven2) with its dependencies depending on their scope. Scopes are predefined in maven2 and you can't change that.

That means :

There are a lot of unnecessary dependencies downloaded for many libraries.

For example, Hibernate downloads a bunch of JBoss JARs and the Display Tag downloads all the various web framework JARs. I found myself excluding almost as many dependencies as I added.

The problem is that hibernate can be used with several cache implementations, several connection pool implementation, ... And this can't be managed with scopes, wheres Ivy configurations offers an elegant solution to this kind of problem.

For instance, in Ivy, assuming hibernate has an Ivy file like this one, then you can declare a dependency like that:

<dependency org="hibernate" name="hibernate" rev="2.1.8" conf="default->proxool,oscache"/>

to get hibernate with its proxool and oscache implementations, and like that:

<dependency org="hibernate" name="hibernate" rev="2.1.8" conf="default->dbcp,swarmcache"/>

to get hibernate with dbcp and swarmcache.

By mapping your default master configuration to "proxool,oscache" or to "dbcp,swarmcache", you specify what you need exactly from the module "hibernate".


You can find those "proxool,..." arguments by listing the Ivy configuration defined for each modules associate with the library. For instance:

<ivy-module version="2.0">
<info organisation="ssn-src" module="pc"/>
<configurations defaultconfmapping="default->default">
<conf name="default" />
<conf name="provided" description="they are provided by the env." />
<conf name="compile" extends="default,provided" />
<conf name="war" extends="default"/>
</configurations>
<dependencies>

Example:

let's suppose modA has two configurations, default and test.

As a practical matter, it's going to be highly unusual to want to leave out the conf attribute of the dependency element.

The ivy.xml for modA might have a dependency:

<dependency org="theteam" name="modB" rev="1.0" conf="default->*" />

You're starting from default, rather than from both default and test.

The above example makes modA's default depend on modB's conf1, conf2, and conf3.

Or you might want to say that modA's default only depends on modB's conf1:

<dependency org="theteam" name="modB" rev="1.0" conf="default->*conf1*" />

How to embed Java Web Start (with jnlp) application on google?

I was looking for an answer but I couldn't find it anywhere. Maybe everyone are hosting on sourceforge.net or Java Web Start is not popular at all. First I have found post on newsgroup saying that on code.google.com you can call .jnlp file directly form SVN. This encouraged me to play with sites.google.com and it occurs to be very simple.

1) Create page and embed all files there – for this purpose 'file cabinet' page type will be the best. So you will have page http://sites.google.com/site/MyPage with bunch of jars attached to it.

2) In your launch.jnlp file put following edits:

for codebase

<jnlp codebase="http://sites.google.com/site/MyPage" href="launch.jnlp" spec="1.0+">

for any jars referenced:

<jar href="http://sites.google.com/site/MyPage/SomeLibrary.jar"/>

3) Attach launch.jnlp to MyPage and that is all.

4) Clicking on launch file will start application.

Organizing everything in more structured way doesn't break anything as long as you remember to update links in launch.jnlp.

Find two consecutive rows

Assuming the rows have sequential IDs, something like this may be what you're looking for:

select top 1 * 
from
Bills b1
inner join Bills b2 on b1.id = b2.id - 1
where
b1.IsEstimate = 1 and b2.IsEstimate = 1
order by
b1.BillDate desc


Related Topics



Leave a reply



Submit