<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>SocketException — Sahi Pro Community</title>
        <link>https://community.sahipro.com/forums/</link>
        <pubDate>Fri, 13 Nov 2026 09:19:15 +0000</pubDate>
        <language>en</language>
            <description>SocketException — Sahi Pro Community</description>
    <atom:link href="https://community.sahipro.com/forums/discussions/tagged/SocketException/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Sahi Error - Address already in use: connect</title>
        <link>https://community.sahipro.com/forums/discussion/991/sahi-error-address-already-in-use-connect</link>
        <pubDate>Thu, 21 May 2009 13:53:19 +0000</pubDate>
        <category>Sahi - Open Source</category>
        <dc:creator>voleynik</dc:creator>
        <guid isPermaLink="false">991@/forums/discussions</guid>
        <description><![CDATA[Hello friends:<br />
I was wondering if you could give us your suggestion about the situation we have.<br />
<br />
Here are the details about what we do:<br />
<br />
Each script has 2 lines:<br />
<br />
&lt;&lt;&lt;&lt;&lt;&lt;<br />
<br />
_include(&quot;ceb-login.sah&quot;);<br />
ceb_test(&quot;user01&quot;, &quot;testing1&quot;, new Array(&quot;0201&quot;, &quot;0074&quot;, &quot;0049&quot;));<br />
<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
<br />
where:<br />
user could be 01-30<br />
array could have any number of elements with any values.<br />
<br />
Each script includes the file &quot;ceb-login.sah&quot; with one function &quot;ceb_test()&quot;:<br />
<br />
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br />
<br />
function ceb_test($usr, $pwd, $funding_accounts){<br />
_wait(1000);<br />
_setValue(_textbox(&quot;userid&quot;), $usr);<br />
_click(_submit(&quot;Continue&quot;));<br />
_setValue(_password(&quot;password&quot;), $pwd);<br />
_click(_submit(&quot;Sign on&quot;));<br />
_wait(8000);<br />
for(var $i = 0; $i &lt; $funding_accounts.length; $i++){<br />
_assertContainsText($funding_accounts[$i], document.body);<br />
}<br />
}<br />
<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
<br />
The scripts are organized into the suite &quot;ceb.suite&quot; as follows:<br />
<br />
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br />
<br />
ceb01.sah $URL<br />
....<br />
ceb30.sah $URL<br />
<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
<br />
Finally the suite is run in  batch mode using the following batch file:<br />
<br />
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br />
<br />
set CP=..\lib\ant-sahi.jar<br />
set SUITE=..\scripts\ceb.suite<br />
set IEXPLORE=&quot;C:\Program Files\Internet Explorer\IEXPLORE.EXE&quot;<br />
set URL=$URL<br />
<br />
..\tools\toggle_IE_proxy.exe enable<br />
<br />
java -cp %CP% net.sf.sahi.test.TestRunner %SUITE% %IEXPLORE% %URL% default HOST 9999 3 iexplore.exe<br />
<br />
..\tools\toggle_IE_proxy.exe disable<br />
<br />
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br />
<br />
When we start everything with 3 threads, the test runs OK.<br />
If we start with 10 thread, we get the following errors:<br />
<br />
``````````````` in the browser `````````````````````<br />
<br />
Sahi Error - Address already in use: connect<br />
Either the remote server is down or not reachable<br />
or<br />
You need an external proxy to be configured.<br />
<br />
You could configure the external proxy by editing &lt;sahi_root&gt;/config/sahi.properties and setting these properties:<br />
<br />
*.proxy.enable=true<br />
*.proxy.host=external_proxy_server_hostname_or_ip<br />
*.proxy.port=external_proxy_server_port<br />
<br />
If your proxy needs authorization, you should set these properties too.<br />
*.proxy.auth.enable=true<br />
*.proxy.auth.name=proxy_authorization_username<br />
*.proxy.auth.password=proxy_authorization_password<br />
<br />
You should do the same with ext.* settings for h-t-t-p-s sites.<br />
<br />
+ show stacktrace<br />
<br />
````````````````` on the console `````````````````<br />
java.net.BindException: Address already in use: connect<br />
at java.net.PlainSocketImpl.socketConnect(Native Method)<br />
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)<br />
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)<br />
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)<br />
at java.net.Socket.connect(Socket.java:519)<br />
at java.net.Socket.connect(Socket.java:469)<br />
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)<br />
<br />
<br />
```````````````````````````````````````<br />
Any help would be greatly appreciated.<br />
Regards,<br />
Vladimir.]]>
        </description>
    </item>
   </channel>
</rss>
