Hi,
The socket receive error still persists. Here is what I am doing.
I am integrating a java code inside MarkLogic to convert an EBCDIC file to 
ASCII using MLJAM. Apache Tomcat 7.0 is being used as the server. The code is 
running fine for small files, but for huge file processing, MarkLogic is 
throwing an error saying

SVC-SOCRECV: xdmp:http-post("http://10.76.81.81:8080/mljam/mljam/local/eval";, 
adminadmin) -- Socket receive error: wait 10.78.14.16:63085-10.76.81.81:8080: 
Timeout (decodeResponseLine1)

1. I have tried increasing request timeout , keep alive timeout and session 
timeout in Marklogic, but that is not working.
2. I tried increasing the -<session-config>
                                               
<session-timeout>60</session-timeout>
                                          </session-config> in my 
apache-tomcat-7.0.57/conf/web.xml
I am not finding any configuration settings in my downloaded Apache Tomcat 
7.0.57 installer to increase any socket timeout or keep alive timeout. Please 
help me as to where I can find these settings.
The code is working fine in Eclipse and the file takes almost 4-5 mins to 
decode completely, but in MarkLogic before 1 minute its throwing Socket timeout 
error.

FYI

I tried testing the Apache connection by  executing my marklogic code before 
starting the Apache Server.  I received a

SVC-SOCCONN: xdmp:http-post("http://10.76.81.81:8080/mljam/mljam/local/eval";, 
<options 
xmlns="xdmp:http"><authentication><username>admin</username><password>admin</passw...</options>)
 -- Socket connect error: wait 0.0.0.0:60587: Timeout

This error vanishes when I start my Apache server. The error I am receiving on 
file processing indicates some SOCRECV error and hence I am deducting that the 
java code is getting timed out at the server.
Also the Marklogic database is not used anywhere. I am picking up a file from 
my local directory.

Apache tomcat is running on my machine while the ML is hosted on a server. 
Please guide as to how to resolve this timeout error .

My ML code is as below
********************************************************************************************************************

import module namespace jam = "http://xqdev.com/jam";
 at "jam.xqy";
 
jam:start-in("http://10.76.81.81:8080/mljam/mljam";, "admin", "admin", "local"),
jam:eval-in('{

import java.io.*;
 
   int PlusSign = 0x0C;       
                    int MinusSign = 0x0D;     
                    int NoSign = 0x0F;        
                    int DropHO = 0xFF;        
                    int GetLONibble  = 0x0F;   
                    int UNSIGNED_BYTE = 0xff;
                    int BITS_RIGHT = 0xf;
       //print("Hello");
       
       String Format = "ebcdic-cp-us";
                        String FiletoRead="D:/EBCDIC/CharTest1.txt";
                                
                                InputStreamReader rdr;
                                InputStreamReader xxr;  
                                int ECBDICChar=0;
    try
    {
    rdr = new InputStreamReader(new FileInputStream(FiletoRead), 
java.nio.charset.Charset.forName(Format));
                        xxr= new InputStreamReader(new 
FileInputStream(FiletoRead));
                        int i=1;                                        
                        int mainrecord_size=54;
                        int record_control_variable_size=4;
                        int loop_Record_size=25;                                
        
                        int j=1;
                        int Value_Creator=0;
                        int x=1;
                        long comp3_values=0;
                        String com3posList="";
                        int comp3_Pos=67;
                        boolean istranNumber=false;
                        byte[] byArray = new byte[10];
                        boolean Comp3LoopStared=false;
while((ECBDICChar = rdr.read()) != -1) 
{               
                        int zz=xxr.read();
        if ((i>mainrecord_size))
        {
          if(i<=mainrecord_size+record_control_variable_size)
          {
            print(zz);
            Value_Creator=Value_Creator * 10 + zz;
                           if(Value_Creator>0)
             {
             istranNumber=true;
             for (int iterator=0;iterator<Value_Creator;iterator++)
                                {
                                int value =comp3_Pos+iterator*loop_Record_size;
                                com3posList+=","+value+",";     
                                }

             }
          }          
        }
        int vCheck=0;
        if((com3posList.contains(","+Integer.toString(i)+",")))
        {
          if(istranNumber)
          {
          vCheck=1;
          }
        }
        if((vCheck==1)||Comp3LoopStared)
        {
        byArray[x-1]= (byte)ECBDICChar;
         x++;                           
                                  Comp3LoopStared=true;
                                  if(x==10)
          {
          {
           long val = 0L;
                                                    boolean negative = false;
                for (int iter = 0; iter < byArray.length; iter++)
                {
                 int raw = byArray[iter] &amp; UNSIGNED_BYTE;
                  int digitA = raw >> 4;
                                                        int digitB = raw &amp; 
BITS_RIGHT;
                    if (digitA < 10) {
                                                            val *= 10L;
                                                            val += (long) 
digitA;

                                                        } else if (digitA == 11 
|| digitA == 13) { 
                                                            negative = true;
                                                        }
                     if (digitB < 10) {
                                                            val *= 10L;
                                                            val += (long) 
digitB;

                                                        } else if (digitB == 11 
|| digitB == 13) {
                                                            negative = true;
                                                        }                    
                }
                if (negative)
                                                        val = -val;
                                                    comp3_values= val;
          }
          x=1;
                                        print(comp3_values);
                                        Comp3LoopStared=false;
          }
        }
        
if((i<mainrecord_size+1)||(i>mainrecord_size+record_control_variable_size))
        {
          if(!Comp3LoopStared)
          {
            print((char)ECBDICChar);
          }
        }
          if 
(j>=mainrecord_size+(Value_Creator*loop_Record_size)+record_control_variable_size)
          {
                                        Value_Creator=0;
                                        i=1;
                                        j=1;
                                        istranNumber=false;
                                        //print("''\n");
                                }
                        
                        else{
                                 i++;
                                 j++;                           
                                }
           
       
        
}
}
catch(Exception EXP)
{
EXP.printStackTrace();
}

       } ',"local"),
jam:get-stdout-in("local"),
jam:end-in ("local")

*************************************************************************************************************************


Thanks,
Vipitha
-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Sunday, February 01, 2015 7:51 AM
To: [email protected]
Subject: General Digest, Vol 127, Issue 66

Send General mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://developer.marklogic.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of General digest..."


Today's Topics:

   1. XDMP-PLACEKEYSLOCKING: ?Fast locking cannot be used with
      place keys. (Ardal Powell)
   2. Re: XDMP-PLACEKEYSLOCKING: ?Fast locking cannot be used with
      place keys. (Danny Sokolsky)
   3. Re: XDMP-PLACEKEYSLOCKING: ?Fast locking cannot be used with
      place keys. (Ardal Powell)
   4. Re: MLJAM: Socket receive error timeout (Danny Sokolsky)


----------------------------------------------------------------------

Message: 1
Date: Sat, 31 Jan 2015 19:55:37 -0500
From: Ardal Powell <[email protected]>
Subject: [MarkLogic Dev General] XDMP-PLACEKEYSLOCKING: ?Fast locking
        cannot be used with place keys.
To: MarkLogic Developer Discussion <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

Hi all,

I'm getting the above error on running an xdmp:document-load in one of the 
modules in the MarkLogic Dev II course. All the other modules run OK. 

The error persists after locking on the databases, top-sopngs-dev, ...modules, 
and ...triggers is set to Strict.

The offending lines are:

        for $d in 
xdmp:filesystem-directory("/home/ardal/mls-developer-2/top-songs-dev/content/songs/")//dir:entry

        return xdmp:document-load($d//dir:pathname,
                <options xmlns="xdmp:document-load">
                        <uri>/songs/{fn:string($d//dir:filename)}</uri>
                        <collections>...</collections>
                        <forests>
                                 
<forest>{xdmp:forest("top-songs-dev-01")}</forest>
                        </forests>
                </options>

Any help appreciated.

Thanks,
Ardal
_______________________
Ardal Powell
[email protected]
518.779.6188













------------------------------

Message: 2
Date: Sun, 1 Feb 2015 02:02:45 +0000
From: Danny Sokolsky <[email protected]>
Subject: Re: [MarkLogic Dev General] XDMP-PLACEKEYSLOCKING: ?Fast
        locking cannot be used with place keys.
To: MarkLogic Developer Discussion <[email protected]>
Message-ID:
        <d4f697174c071d46b891b38bfc6eafa636e...@exchg10-be01.marklogic.com>
Content-Type: text/plain; charset="Windows-1252"

Hi Ardal,

Remove the <forests> element from your options node and that error will go away.

Since we introduced the latest forest placement algorithms in MarkLogic 7, most 
of the time it is a bad idea to choose your own forest.

I thought setting locking to strict for that database would make this work, 
however, so I am not too sure why that did not work.  Are you sure you set that 
for the database where you are loading this document?

At any rate, you probably do not need the forest placement key in there, so I 
would just remove it.

-Danny

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Ardal Powell
Sent: Saturday, January 31, 2015 4:56 PM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] XDMP-PLACEKEYSLOCKING: ?Fast locking cannot be 
used with place keys.

Hi all,

I'm getting the above error on running an xdmp:document-load in one of the 
modules in the MarkLogic Dev II course. All the other modules run OK. 

The error persists after locking on the databases, top-sopngs-dev, ...modules, 
and ...triggers is set to Strict.

The offending lines are:

        for $d in 
xdmp:filesystem-directory("/home/ardal/mls-developer-2/top-songs-dev/content/songs/")//dir:entry

        return xdmp:document-load($d//dir:pathname,
                <options xmlns="xdmp:document-load">
                        <uri>/songs/{fn:string($d//dir:filename)}</uri>
                        <collections>...</collections>
                        <forests>
                                 
<forest>{xdmp:forest("top-songs-dev-01")}</forest>
                        </forests>
                </options>

Any help appreciated.

Thanks,
Ardal
_______________________
Ardal Powell
[email protected]
518.779.6188











_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general


------------------------------

Message: 3
Date: Sat, 31 Jan 2015 21:20:49 -0500
From: Ardal Powell <[email protected]>
Subject: Re: [MarkLogic Dev General] XDMP-PLACEKEYSLOCKING: ?Fast
        locking cannot be used with place keys.
To: MarkLogic Developer Discussion <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

Thanks, Danny. That was it. 

I set locking to Strict wherever I could find a setting, which was in the three 
Top-songs entries in Configure / Databases in the Admin console.

Ardal

On Jan 31, 2015, at 9:02 PM, Danny Sokolsky wrote:

> Hi Ardal,
> 
> Remove the <forests> element from your options node and that error will go 
> away.
> 
> Since we introduced the latest forest placement algorithms in MarkLogic 7, 
> most of the time it is a bad idea to choose your own forest.
> 
> I thought setting locking to strict for that database would make this work, 
> however, so I am not too sure why that did not work.  Are you sure you set 
> that for the database where you are loading this document?
> 
> At any rate, you probably do not need the forest placement key in there, so I 
> would just remove it.
> 
> -Danny
> 
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Ardal 
> Powell
> Sent: Saturday, January 31, 2015 4:56 PM
> To: MarkLogic Developer Discussion
> Subject: [MarkLogic Dev General] XDMP-PLACEKEYSLOCKING: ?Fast locking cannot 
> be used with place keys.
> 
> Hi all,
> 
> I'm getting the above error on running an xdmp:document-load in one of the 
> modules in the MarkLogic Dev II course. All the other modules run OK. 
> 
> The error persists after locking on the databases, top-sopngs-dev, 
> ...modules, and ...triggers is set to Strict.
> 
> The offending lines are:
> 
>       for $d in 
> xdmp:filesystem-directory("/home/ardal/mls-developer-2/top-songs-dev/c
> ontent/songs/")//dir:entry
> 
>       return xdmp:document-load($d//dir:pathname,
>               <options xmlns="xdmp:document-load">
>                       <uri>/songs/{fn:string($d//dir:filename)}</uri>
>                       <collections>...</collections>
>                       <forests>
>                                
> <forest>{xdmp:forest("top-songs-dev-01")}</forest>
>                               </forests>
>               </options>
> 
> Any help appreciated.
> 
> Thanks,
> Ardal
> _______________________
> Ardal Powell
> [email protected]
> 518.779.6188
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general



------------------------------

Message: 4
Date: Sun, 1 Feb 2015 02:21:27 +0000
From: Danny Sokolsky <[email protected]>
Subject: Re: [MarkLogic Dev General] MLJAM: Socket receive error
        timeout
To: MarkLogic Developer Discussion <[email protected]>
Message-ID:
        <d4f697174c071d46b891b38bfc6eafa636e...@exchg10-be01.marklogic.com>
Content-Type: text/plain; charset="utf-8"

You can try adding an xdmp:set-request-time-limit to increase the time limit 
for that query.  Try something like this:



xdmp:set-request-time-limit(600),

xdmp:http-post("http://localhost:8080/mljam/mljam/local/eval";)



-Danny


From: [email protected] 
[mailto:[email protected]] On Behalf Of Vipitha Kapildas
Sent: Saturday, January 31, 2015 6:15 AM
To: [email protected]
Subject: [MarkLogic Dev General] MLJAM: Socket receive error timeout


Hi,

I am integrating java code inside MarkLogic to convert some EBCDIC files to 
ASCII using MLJAM. Apache Tomcat 7.0 is being used as the server. The code is 
running fine for small files, but for huge file processing, MarkLogic is 
throwing an error as

"SVC-SOCRECV: xdmp:http-post("http://localhost:8080/mljam/mljam/local/eval";, 
adminadmin) -- Socket receive error: wait 10.78.14.16:63085-10.76.81.81:8080: 
Timeout (decodeResponseLine1)"



As per my understanding, I need to increase the socket receive timeout period 
for the Apache server.

Please guide with the steps as how to do it if I am not wrong.



Thanks,

Vipitha




**************** CAUTION - Disclaimer *****************

This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely

for the use of the addressee(s). If you are not the intended recipient, please

notify the sender by e-mail and delete the original message. Further, you are 
not

to copy, disclose, or distribute this e-mail or its contents to any other 
person and

any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken

every reasonable precaution to minimize this risk, but is not liable for any 
damage

you may sustain as a result of any virus in this e-mail. You should carry out 
your

own virus checks before opening the e-mail or attachment. Infosys reserves the

right to monitor and review the content of all messages sent to or from this 
e-mail

address. Messages sent to or from this e-mail address may be stored on the

Infosys e-mail system.

***INFOSYS******** End of Disclaimer ********INFOSYS***


-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://developer.marklogic.com/pipermail/general/attachments/20150201/f613b291/attachment.html
 

------------------------------

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general


End of General Digest, Vol 127, Issue 66
****************************************
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to