SpamAssassin / Amavisd tuning - TCP active open: Failed connect() errors

I started this post as we were experiencing a problem with occassional delayed mail delivery to our mail store. As I continued writing it, I think that I've resolved it. But I wanted to post this anyway so if I'm doing things right it might help someone else; or, if I'm doing something wrong someone can correct me. :) For reference, we have a quad Sun v440, and process about 500,000 messages a day.
We were seeing messages like this in our log files:
09-Nov-2006 08:28:09.37 tcp_scan Q 1 [email protected] rfc822;[email protected] @tcp_scan-daemon:[email protected] TCP active open: Failed connect() Error: Connection timed out
example.com represents our local domain. The errors seemed to occur proportionally to the amount of incoming mail we received. That is, we saw more of them under load.
We are running SpamAssassin, Amavisd/clamav, and:
Sun Java(tm) System Messaging Server 6.2-5.01 (built Nov 22 2005)
libimta.so 6.2-5.01 (built 11:57:57, Nov 22 2005)
SunOS hostname 5.9 Generic_118558-11 sun4u sparc SUNW,Sun-Fire-V440
This line seems to say that the message is in the tcp_scan channel, and cannot send to 127.0.0.1:10024 (amavisd) because that port isn't listening.
My amavisd max_servers was set at 15. After reading http://www.ijs.si/software/amavisd/amavisd-new-magdeburg-20050519.pdf and making a wild guess, I increased it to 30. The errors were less frequent, but still occurred.
The output of 'sar -d' showed that my local disk was experiencing upwards of 80% utilization. I moved the amavisd temp directory and the spamassassin bayes db to a san volume, and that sped everything up dramatically. The connect errors went away, clamav avg time per message is at 4 seconds down from 10. I am now receiving errors from spamassassin that say:
Nov 9 10:27:27 hostname.example.com spamd[21601]: prefork: server reached --max-children setting, consider raising it
My --max-children is set to 25 right now, and the server is cpu bound under heavy load, so I see no reason to raise it.
So this is my setup. I am no longer having an immediate problem, but comments/questions are welcome.
Config files related to my setup are below.
Excerpts of imta.cnf:
! tcp_scan
[] $E$R${tcp_scan,$L}$U%[$L]@tcp_scan-daemon
! ims-ms
ims-ms defragment subdirs 20 notices 1 7 14 21 28 backoff "pt5m" "pt10m" "pt30m" "pt1h" "pt2h" "pt4h" maxjobs 2 pool IMS_POOL destinat
ionspamfilter1 fileinto $U+$S@$D
ims-ms-daemon
! tcp_local
tcp_local smtp mx single_sys remotehost inner switchchannel identnonenumeric subdirs 20 maxjobs 7 pool SMTP_POOL saslswitchchannel tcp
auth maytlsserver maysaslserver missingrecipientpolicy 0 aliasdetourhost tcpscan-daemon
tcp-daemon
! tcp_intranet
tcp_intranet smtp mx single_sys subdirs 20 dequeue_removeroute maxjobs 7 pool SMTP_POOL allowswitchchannel saslswitchchannel tcp_auth
maytlsserver maysaslserver missingrecipientpolicy 4 aliasdetourhost tcp_scan-daemon
tcp_intranet-daemon
! tcp_scan
tcp_scan smtp single_sys subdirs 5 notices 1 backoff "pt10m" "pt30m" "pt2h" "pt4h" dequeue_removeroute maxjobs 7 pool SMTP_POOL daemon
[127.0.0.1] port 10024
tcp_scan-daemon
option.dat:
SPAMFILTER1_LIBRARY=/opt/sunjes/SUNWmsgsr/lib/libspamass.so
SPAMFILTER1_CONFIG_FILE=/opt/sunjes/SUNWmsgsr/config/SpamAssassin
SPAMFILTER1_STRING_ACTION=data:,require ["addheader"]; addheader "Spam-test: $U"; require "fileinto"; fileinto "Junk";
SPAMFILTER1_OPTIONAL=1
dispatcher.cnf:
[SERVICE=SMTP-SCAN]
DEBUG=-1
PARAMETER=CHANNEL=tcp_scan
PORT=10025
IMAGE=IMTA_BIN:tcp_smtp_server
LOGFILE=IMTA_LOG:tcp_scan-server.log
STACKSIZE=2048000
INTERFACE_ADDRESS=127.0.0.1
SpamAssassin:
host=127.0.0.1
port=783
debug=0
mode=1
field=
verdict=Junk
USE_CHECK=0

Suggest dropping Amavis in preference to the built-in
integration, per our documentation. Simpler, more
performant.Sorry, my title wasn't very accurate. We are running SpamAssassin through the built in integration, and clamav through amavisd. There isn't any built in integration to clamav, is there?

Similar Messages

  • TCP active open: Failed connect()    Error: Connection timed out SMTP

    Hi,
    Messaging server version is,
    ./imsimta version
    Sun Java(tm) System Messaging Server 6.2-6.01 (built Apr 3 2006)
    libimta.so 6.2-6.01 (built 11:20:35, Apr 3 2006)
    SunOS bglbbmr1-a-fixed 5.9 Generic_118558-28 sun4u sparc SUNW,Sun-Fire-V440
    17-Dec-2008 10:47:40.08 1730.8e.741
    tcp_local Q 4 [email protected] rfc822;[email protected] [email protected] /mta/queue/queue/tcp_local/013/ZUg0i1t9I0ZG~.00 <[email protected]>; TCP active open: Failed connect() Error: Connection timed out SMTP/xyz.my-domain.in
    I have been getting this above error on my mail server from last
    4-5 days. I am getting complaints from end users that the users can't
    send any mails using Outlook but I did check with my test user I can
    send mail by using webmail.
    The Failed MX lookup Errors also getting in my logs the error detail given bellow.
    17-Dec-2008 10:47:39.65 1730.91.737
    tcp_local - Y TCP|0.0.0.0||209.85.143.114|25 SMTP/airtelmail.in/aspmx.l.google.com
    17-Dec-2008 10:47:39.92 1754.41.255
    tcp_notify - Y SMTP/infomedia18.in/infomedia18.in
    17-Dec-2008 10:47:39.92 1754.41.256
    tcp_notify Q 7 rfc822;[email protected] [email protected] /mta/queue/queue/tcp_notify/017/ZXg0i1t3U_ZoD.00 <[email protected]>; Failed MX lookup; try again later
    17-Dec-2008 10:47:39.94 1754.41.257
    tcp_notify Q 6 rfc822;[email protected] [email protected] /mta/queue/queue/tcp_notify/010/ZXg0i1t3U_ZoF.00 <0KBZ003MRGU7MQ30@my-domain> Failed MX lookup; try again later
    I tried stopping and starting msg service using stop-msg and start-msg to sort out this above problem but no result. :(
    When I do check the tcp_local queue it has been growing every day as well the tcp_notification queue also.
    /opt/SUNWmsgsr/sbin/imsimta qm su
    Messages
    Channel Queued Size (Kb) Oldest
    tcp_notify 10741 1080610.61 16 Dec, 00:59:24
    tcp_local 8334 733849.31 15 Dec, 00:19:00
    tcp_lmtpcn 0 0.00
    tcp_be 0 0.00
    reprocess 0 0.00
    process 0 0.00
    conversion 0 0.00
    Totals 19075 1814459.92
    This queues are increasing day by day.
    One more thing is that I cant see a service/channel called CONVERSION running on my server when i do use this command.
    ps -aef | grep conversion
    root 6144 6000 0 11:14:28 pts/1 0:00 grep conversion
    When i try to start it using imsimta qm utility, output shows as
    qm.maint>; start conversion
    QM-I-STARTED, channel was not stopped
    qm.maint>;
    Later I stopped and started conversion channel
    qm.maint>; stop conversion
    QM-I-STOPPED, channel stopped
    qm.maint>; start conversion
    QM-I-STARTED, channel started
    qm.maint>;
    I can see that on other servers the conversion channel is running and few msges are in queue. I do have other servers which running the same messaging server. But I am not getting why don't on this server. Where both servers having the same configuration.
    Please, help me to sort out this issue.
    Thanks in advance....
    BSK

    Thanks Mr. Shane,
    The server which is running conversion channel.
    ps -eaf|grep conversion
    mailserv 16824 8472 3 17:08:11 ? 0:48 /opt/SUNWmsgsr/lib/conversion
    mailserv 28728 8472 0 17:17:30 ? 0:00 /opt/SUNWmsgsr/lib/conversion
    root 1057 26387 0 17:18:12 pts/1 0:00 grep conversion
    more /opt/SUNWmsgsr/config/conversions
    in-channel=*; in-type=application; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=x-zip-compressed; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=image; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=audio; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=video; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    Following entry from /opt/SUNWmsgsr/lib/config-templates/imta_tailor
    IMTA_CONVERSION_FILE=<msg.RootPathUNIX>/config/conversions
    The server which doesnt show running conversion channel
    #more /opt/SUNWmsgsr/config/conversions
    !in-channel=*; in-type=*; in-subtype=*; in-disposition=*;
    ! parameter-symbol-0=NAME; parameter-copy-0=*;
    ! dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    ! message-header-file=2; original-header-file=1;
    ! override-header-file=1; override-option-file=1;
    ! command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=application; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=x-zip-compressed; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=image; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=audio; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=video; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    Following entry from /opt/SUNWmsgsr/lib/config-templates/imta_tailor
    IMTA_CONVERSION_FILE=<msg.RootPathUNIX>/config/conversions
    Is this above information u r asking?
    As u wrote erlier, the conversion channel works some times and some times doesn't work.
    Thanks lot...
    BSKADAM

  • TCP active open: Failed connect()    Error: Connection timed out

    Hi,
    There is one message which can't be delieved to the recepient with error " TCP active open: Failed connect() Error: Connection timed out" This is the error that we found in the mail.log_current file.
    I have no problem sending email to the same address from my hotmail account.
    any suggestion ?
    Thanks,
    Joe

    The message can only mean one thing. Your server cannot connect to that host.
    It's possible that the remote system is lying to your Messaging Server, and that's gotten it confused. Some firewalls do this by repeating the entire capability string from the server behind them, but can't actually handle all the capabilities.
    PIX firewalls do this.
    When you connect, they pretend to be able to "startls", but if you try, they hang up. They appear to handle "EHLO", but when you try, they hang up.
    You can put debugging on the tcp_local channel, and see the actual conversation, if you like.
    master_debug and slave_debug go into the imta.cnf definition line. MM_DEBUG=5 goes at the end of your option.dat file.
    then
    imsimta cnbuild
    imsimta restart
    will attempt to send the message. You will want to back the changes out, as you'll get lots of extra log files you really don't need.
    Post the log file, and we can see what's happening.

  • TCP active open: Failed connect()

    hi all,
    i receive error from my email like
    "TCP active open: Failed connect()x.x.x.x :25(No formatted text for errno = 111)"

    Hi Mustapah,
    if the error is in the email, then the hostname and/or IP address of the reporting server/appliance  should be in there.
    I suggest you try to look up the message in message tracking of your IronPort's GUI, this will tell you if the message was received by your appliance(s), and also if it was bounced on the appliance or on a different server.
    Hope that helps,
    Andreas

  • TCP active open: Failed gethostbyname()    ?

    Cannot send mail to outside,but my dns is ok.
    18-Jun-2005 08:43:56.87 tcp_local Q 1 [email protected] rfc822;[email protected] [email protected] TCP active open: Failed gethostbyname() on mta.21cn.com, resolver errno = 2
    # nslookup -type=mx 21cn.com
    Server: ns2.lanps.com.cn
    Address: 10.200.15.7
    Non-authoritative answer:
    21cn.com preference = 10, mail exchanger = mta2.21cn.com
    21cn.com preference = 20, mail exchanger = mta.21cn.com
    Authoritative answers can be found from:
    21cn.com nameserver = dns.21cn.com
    21cn.com nameserver = dns.21cn.net
    mta2.21cn.com internet address = 61.140.60.70
    mta.21cn.com internet address = 61.140.60.20
    dns.21cn.com internet address = 202.104.32.253
    dns.21cn.net internet address = 202.104.32.251

    Please check your other network resolution configurations. resolv.conf, etc.
    nslookup forces a DNS lookup. It's not exactly what the server does, the server issues an OS, "gethostbyname()" call, which looks at many of your configuration files. . .
    What it's trying to tell you, is, "I can't find that host's ip address, when I ask the OS for it"

  • Failed to open the connection error using Business View OLE DB

    I have a Crystal Report built on a Business View with the db being accessed by an OLE driver.  Everything works fine using Crystal Designer, but when I try to access it through BOE I get the "Failed to open the connection" error.  I have the ole drivers installed on the server.
    We are on BOE 12.1.0.
    The db is IBM as400.
    Suggestions??

    Ok so I spent the day trying to find the differences between the working and the non-working application. I began by adding code one piece at a time to the working application. The goal was to try and get it to break on the deployment server. I found the lines of code that is causing the break on the deployment server. Here it is:
        private void setReportParameters()
            try
                crystalReportDocument.SetParameterValue(0, reportUserName.Value);
                crystalReportDocument.SetParameterValue(1, reportArea.Value);
                crystalReportDocument.SetParameterValue(2, reportCDR.SelectedValue);
                crystalReportDocument.SetParameterValue(3, reportStatus.Value);
            catch (Exception ex)
                throw ex;
    This sub-routine is called from my button click code and is used to set the parameters for the report. Once I added this to the working application it broke also. My goal here is to send the parameters to the report from a form the user is filling out. Please keep in mind this code works in Visual Studio 2005 and my local IIS server running on my development machine. It breaks on the target deployment server
    The code broke on reports with sub-reports as well as report with no sub-reports. As soon as it was added and deployed the application through the "Failed to open the connection" error.
    Thoughts?

  • Activity report failed(Communication error)- while check-in Activity

    Hello SDN,
    I am getting following error while Checking in activity from open activities .currently we are using NWDS7.3
    CHECKIN      Finished24s.9Files scuceeded.
    ACTIVATE     Activation Performed.Build request ID : 166
              Internal Problem(Activity report failed(Communication error
    [cause: Unalble to open connection to host<host>:<port>][reason:Address already in use : connect]]))
    Check-in completed successfully but Activation is not completed and giving connectivity error described above. Again
    I activated activity from Activation view. Still I am getting following error description.Plesae provide me solution
    to resolve this issue.
    GET_STATUS      could not retrieve activation status of request '166' (Unable to connect to
    host:port-Address already in use:connect(Service call exception; nested exception java.io.
    IOException: Unable to connect to host:port-Address already in use:connect))
    regards,
    Sree.

    Just check the full hostname of your DTR server, should be like
    hostname.company.com
    and check if somewhere only
    hostname
    is being used.and both are getting successfully pinged. DO not try the NWDS ping. Use command prompt and
    ping hostname
    and
    ping hostname.company.com
    Also this happens due to some clash with some other developer. Please check after some time, may be after a desktop restart. things should start working.
    Edited by: Varun Biswas on Nov 29, 2011 11:53 PM
    Edited by: Varun Biswas on Nov 29, 2011 11:53 PM

  • Why do I keep getting a failed connection error on my iPad trying to connect to facetime

    Why do I keep getting a failed connection error on my iPad trying to connect

    Does the person you are trying to connect with have FaceTime set up and turned on?

  • Failed to open the connection: Error Code 17

    Here's an odd one.
    Environment:
    VB.NET Winform
    Visual Studio 2008
    .NET framework 2.0
    Crystal Reports 2008
    ODBC connection
    I have three reports, living in the same directory. They are essentially identical, except for the grouping. All three run successfully within Crystal reports.
    From a report viewer Winform in VS, two of the three run. As I am dealing with a small data set, the reports render quickly. On the third report, There is a long pause when the report viewer form opens, then I finally get an error:
    "Failed to open the connection.
    Details: [Database Vendor Code: 17]
    Failed to open the connection.
    CallReportByExtension 58F5C135-7BA3-4215-898A-DADA6C7DAD9C.rpt
    Details:[Database Vendor Code: 17]
    I was initially getting similar errors on all three reports, before changing the datasource location to my ODBC connection. I have double-checked the location, verified the database, etc.
    What am I doing wrong? I can provide the VB code if requested, but since the other two reports work properly, I doubt it's code. I do know that I am passing the report name and path correctly to the report viewer form.
    As I am about to kick my monitor through the window and become a street denizen, I would greatly appreciate any help that would be offered.
    Thanks,
    Mike Beckner

    Thanks for the reply. This code works...two of the three reports work.
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Public Class frmReportViewer
        Dim m_datStartDate As Date
        Dim m_datEndDate As Date
        Dim m_strReportPath As String
        Dim m_strReportName As String
        Dim m_strStaticPath As String = "c:\Program Files\CallReportViewer\Reports\"
        Dim crConnectionInfo As New ConnectionInfo
       *****Omitting property declarations--I assign the report name and path via these properties. *****
        Private Sub frmReportViewer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            LoadReport()
        End Sub
        Public Sub LoadReport()
            Dim crReportDocument As New ReportDocument
            Dim crTableLogonInfo As New TableLogOnInfo
            Dim crTables As Tables
            Dim crTable As Table
            Try
                With crConnectionInfo
                    .ServerName = "CallWhereData"
                    .DatabaseName = "CallWhereData"
                    .UserID = "MyID"
                    .Password = "MyPassword"
                End With
                Me.Text = m_strReportName
                crReportDocument.Load(m_strStaticPath & m_strReportPath)
                crReportDocument.SetParameterValue("1StartDate", m_datStartDate)
                crReportDocument.SetParameterValue("2EndDate", m_datEndDate)
                crTables = crReportDocument.Database.Tables
                For Each crTable In crTables
                    crTableLogonInfo = crTable.LogOnInfo
                    crTableLogonInfo.ConnectionInfo = crConnectionInfo
                    crTable.ApplyLogOnInfo(crTableLogonInfo)
                Next
                CrystalReportViewer1.Dock = DockStyle.Fill
                CrystalReportViewer1.ReportSource = crReportDocument
            Catch ex As Exception
                MessageBox.Show(Err.Description)
            End Try
        End Sub
    End Class

  • Open datasocket connection error 42

    Hello,
    When I run my application as a standalone appliation I get error 42 from the "Open Datasocket Connection" VI, I was able to see it using the "Enable debbuging" feature in the build specification.  When I run my application in source code I don't have any problems with the "Open Datasocket Connection".  The address provided is the exact same address for the standalone executable and the source code which points to another computer LabVIEW application.  The protocol I'm using is psp://ComputerName...
    Any ideas?
    Michel
    Solved!
    Go to Solution.

    It could be a problem that the executable cannot access the registery. That seems to be needed for Datasocket. Does it work when you start the application as administrator?
    Btw. Why do you use Datasocket to read a psp variable? You should be able to use Open Variable Connection I think? Datasocket is almost obsolete.

  • Failed to open the connection error

    Hi,
    I have a crystal report in my .net App. I want to fetch data from another server on report running on my machine. Hence, I pass connection dynamically in the code. The remote server will not have DSN configured. I should be able to pass all the details in code only. I do not want any ODBC dependency.
    Following is the code snippet I use to pass these details:
               ReportDocument rpt = new ReportDocument();
                rpt.Load( pathToreport);
                ConnectionInfo crConnectionInfo = new ConnectionInfo();
                crConnectionInfo.ServerName = serverName;
                crConnectionInfo.DatabaseName = DatabaseName;
                crConnectionInfo.UserID = userName;
                crConnectionInfo.Password = passwd;
                CrystalDecisions.CrystalReports.Engine.Tables CrTables = rpt.Database.Tables;
                TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
                foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
                    crtableLogoninfo = CrTable.LogOnInfo;
                    crtableLogoninfo.ConnectionInfo = crConnectionInfo;
                    CrTable.ApplyLogOnInfo(crtableLogoninfo);
                 crystalReportViewer1.ReportSource = rpt;
                crystalReportViewer1.RefreshReport();
    But,running this code gives me error saying,
    Is there any specific format in which i shall pass the server name for this type of connection?
    Or I am missing anything else?
    Please help.

    Yes, you are missing a DSN on the Server. How do you expect CR to connect if you can't give it valid connection info?
    You never said what DB you are using so if it supports OLE DB typically you don't need a connection pre-defined as you would when using ODBC.
    So your Server name would be the actual name of the Server PC and the rest would still be the same. Note: if using Oracle you pass in a blank string for the Database name.
    And of course the user info you are passing in code must be in the DB Server User list.
    Don

  • DB Open fails with error

    We have a 2 node replication enabled setup (master/client). Frequently I'm seeing that DB fails to open on the client with the following error logs:
    [1387876299:345435][693/139824764127264] REP_UNDEF: Read in gen 8
    [1387876299:345707][693/139824764127264] REP_UNDEF: Read in egen 6
    [1387876299:345809][693/139824764127264] REP_UNDEF: EID 0 is assigned for site 2.0.0.1:4998
    Finding last valid log LSN: file: 1709 offset 4018264
    What would cause this frequent error?

    We are using DB version 5.1.19 on RHEL 6.3, with these patches:
    # Intends to solve locked sync
    patch -Np0 <../21036_5.1.19_1.diff
    # Intends to solve PANIC: log sequence error by replication aware logging
    patch -p0 <../20342_5.1.19_1.diff
    # Intends to solve haging passive
    patch -Np0 <../21326_5.1.19_msghang2.diff
    # Intends to solve PANIC: unpinned page
    patch -Np1 <../19130-5.1.19.diff
    # Intends to fix patch 20342_5.1.19_1.diff: log files not removed
    patch -Np0 < ../21448_5.1.19.diff
    # Intends to add repmg queue limit and statistics.
    # In this patch, we modified the IN_QUEUE_LIMIT_BULK from 1000 to 100000
    patch -p0 < ../21420_5.1.19sv_3.diff
    # Intends to solve PANIC: file size not a multiple of the page size
    patch -p0 < ../21254_5.1.19.diff
    # Intends to improve performance by more accurate locks
    patch -p0 < ../21454_5.1.19_prelim3.diff
    # The patch to fix DB_NOTFOUND panic during initial synch process
    # NOTE. This patch is incompatible with the diagnosic 21314_5.1.19_repdiag3.diff patch.
    # the diagnostic patch 22451_5.1.19_repdiag4.diff must be used instead of 21314_5.1.19_repdiag3.diff
    # if 20668_5.1.19_1.diff is applied.
    patch -p0 <../20668_5.1.19_1.diff

  • "Failed to open the connection" problem related to multiple tables in the report?

    Post Author: Gadow
    CA Forum: Data Connectivity and SQL
    System specifics:
    Web environment using ASP.Net 2.0 (from Visual Studio 2005 Professional)
    Crystal Reports 2008, v. 12.0.0.549, Full
    We have set up the following method for displaying reports via our website:
    User is sent to a report-specific page. The user is given some filtering options specific to the report that will be viewed. When the user has specified the data filters, the user clicks a button.
    The page wraps up the report parameters -- selection query, formula values, report location, the name to be displayed, etc. -- into a class which gets put into the Session object.
    The page redirects to DisplayReport.aspx. ALL reports redirect to this page.
    DisplayReport.aspx retrieves the report parameters from Session. A ReportDocument object is created and loaded, then set with the data from the parameters class.
    A ConnectionInfo object is created and set with the relevant log on credentials. All of the reports draw from the same database, so the connection information is hard-coded as the same for all reports. The page then iterates through all of the tables in the Database.Tables collection of the ReportDocument and calls ApplyLogOnInfo to each table using the ConnectionInfo object.
    The page is rendered and the user gets the filtered report.
    We currently have seven reports. Five reports work fine and display the correctly filtered data with no error messages. Two reports generate a Failed to open the connection error and do not display. I have verified that the queries being sent to DisplayReport.aspx are valid, and as I said the connection information itself is hard-coded in the one page that displays the reports and this is identical to all reports.
    The five reports that do work all have a single data table, either an actual database table or a single view. The two reports that do not work all have multiple tables. As far as I can tell, this is the only difference between the sets; all seven reports are based on the same DSN and I have verified the database on all of the reports. All of the reports were written using Crystal Reports 8, and all of the reports display fine in a Windows app I wrote some years ago using Crystal Reports 8. Again, the only difference between those reports that do work and those that do not is the number of tables used in the report: one table or view in the reports that display, more than one table (tables only, none use views) in the reports that do not display.
    As for the code I am using, below are the relevant methods. The function MakeConnectionInfo simply parses out the components of a standard SQL connection string into a ConnectionInfo object. DisplayedReport is the ID of the CrystalReportViewer on the page.Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs)
            Dim o As Object = Session("ReportParams")
            Dim ReportURL As String = ""
            'Verify that there is a ReportParameters object
            If o Is Nothing OrElse o.GetType IsNot GetType(ReportParameters) Then 'Redirect to the error page
                Response.Redirect("/errors/MissingReport.aspx")
            End If
            ReportParams = CType(o, ReportParameters)
            'Verify that the report exists
            ReportURL = "/Reports/ReportFiles/" + ReportParams.ReportName
            ReportPath = Server.MapPath(ReportURL)
            If Not File.Exists(ReportPath) Then
                Response.Redirect("/errors/MissingReport.aspx?Report=" + ReportParams.ReportTitle)
            End If
            InitializeReport()       
        End Sub
        Protected Sub InitializeReport()
            Dim RD As New ReportDocument
            Dim CI As ConnectionInfo = MakeConnectionInfo(DB_Bonus)
            Dim RPF As CrystalDecisions.Shared.ParameterField = Nothing
            RD.Load(ReportPath)
            If ReportParams.SelectString <> "" Then
                Dim Adapt As New SqlDataAdapter(ReportParams.SelectString, DB_Bonus)
                Dim DS As New Data.DataSet
                Adapt.Fill(DS)
                RD.SetDataSource(DS.Tables(0))
            End If
            For Each kvp As KeyValuePair(Of String, String) In ReportParams.Formulas
                Dim FFD As FormulaFieldDefinition = Nothing
                Try
                    FFD = RD.DataDefinition.FormulaFields(kvp.Key)
                Catch ex As Exception
                    'Do nothing
                End Try
                If FFD IsNot Nothing Then
                    Select Case FFD.ValueType
                        Case FieldValueType.DateField, FieldValueType.DateTimeField
                            If IsDate(kvp.Value) Then
                                FFD.Text = String.Format("Date()", Convert.ToDateTime(kvp.Value).ToString("yyyy, MM, dd"))
                            Else
                                FFD.Text = "Date(1960, 01, 01)"
                            End If
                        Case FieldValueType.StringField
                            FFD.Text = String.Format("""""", kvp.Value)
                        Case Else
                            'For now, treat these as if they were strings. If things blow up here,
                            'we will need to add the appropriate formatting for the field type.
                            FFD.Text = String.Format("""""", kvp.Value)
                    End Select
                End If
            Next
            For Each T As CrystalDecisions.CrystalReports.Engine.Table In RD.Database.Tables
                Dim TLI As TableLogOnInfo = T.LogOnInfo
                TLI.ConnectionInfo = CI
                T.ApplyLogOnInfo(TLI)
            Next
            DisplayedReport.ReportSource = RD
        End Sub
    Does this approach not work with reports containing multiple tables, or is there something I'm missing? Any meaningful suggestions would be much appreciated.

    Dear Dixit,
    Please refer to the Crystal report landing page to get the details
    information about the support for crystal report issues.
    Please use the following thread to post your questions related to
    crystal report.
    SAP Business One and Crystal Reports
    Regards,
    Rakesh Pati
    SAP Business One Forum Team.

  • Error"Failed to open the connection"  - Named Instance of SQL Server 2005

    "Failed to open the connection" error, when connecting to the Named Instance of SQL Server 2005
    The report is throwing error, when changing the logon information dynamically through C#.
    Code
         string reportPath = @"D:\NET\TestReport\TestReport.rpt";
         ReportDocument reportDocument = new ReportDocument();
         reportDocument.Load(reportPath);
         foreach(CrystalDecisions.CrystalReports.Engine.Table table in tables)
              TableLogOnInfo tableLogonInfo = table.LogOnInfo;                         
              tableLogonInfo.ConnectionInfo.ServerName = @"TestServer\Instance1";  //Connnecting to Named instance of SQL Server 2005
              tableLogonInfo.ConnectionInfo.UserID = "sa";
              tableLogonInfo.ConnectionInfo.Password = "password";
              tableLogonInfo.ConnectionInfo.DatabaseName = "TEST_DB";
              table.ApplyLogOnInfo(tableLogonInfo);     
         crystalReportViewer1.ReportSource = reportDocument;
    Error Message
         Failed to open the connection.
         Failed to open the connection.
         C:\DOCUME1\PUGALE1\LOCALS~1\Temp\{DF9593A5-5C80-4CBC-ABC3-EC4EF204A7EB}.rpt
    The error is occuring only whenever i am connecting to the Named Instance of SQL Server 2005.
    Thanks in Advance
    Edited by: pugalendran p on Feb 2, 2009 10:32 AM
    Edited by: pugalendran p on Feb 2, 2009 10:43 AM

    Hi,
    Following solution might help you to resolve the issue.
    Solution1:
    Issue happens because universe connection to the Database is not responding and the Data Source Name is not configured to write SQL Server 2005 database.
    Resolution
    Created new DSN connection under SYSTEM DSN to SQL Server 2005 Database.
    Import the universe from the designer.
    Go to File->Parameters.
    Edit Connection.
    On the Database Middleware Page expand SQl Server 2005->Select SQL Server 2005 driver.
    Change the DSN to new DSN connection
    Test the connection.
    Save the Universe and Export it to the repository.
    Solution2:
    I am taking Oracle as an example over here.
    This can be caused when the SQLNET.ora is located in a remote location using mapped drives.
    Resolution
    To resolve,
    check the registry [HKLM\SOFTWARE\ORACLE] you should see a folder called HOME0
    look for any paths that contain a mapped drive partition
    Change the mapped drive letter to a UNC path (
    server\folder)
    Open a command prompt and do a tnsping using the tnsname and verify the location of the SQLNET.ora or TNSNAMES.ora
    If the path is not updated to the new path
    Reboot the server
    Regards,
    Sarbhjeet Kaur

  • "Failed to open the connection" Issue

    Dear All,
    I am using crystal report X1 Release 2 version. I am connecting the crystal report from the application software. When I open the crystal report designer directly and refresh means it displays the report properly.  But when I try to open the crystal report from the Application it shows "Failed to open the connection" error message. What would be the possible reason(s).
    My database is MS Access and am using ODBC to connect with database.
    Expecting your replies at the earliest.
    Thanks in advance.
    Regards,
    Rahaneef T

    I am using MS Access database, it is not protected by Password. I am creating dynamic dsn for the database.
    My application is developed using MS VC++ 6.0 in Windows xp.
    I am using SP 4 for the Crystal report X1 release 2 designer.
    My application is not yet deployed, still using in the dev system.
    I have attached the code snippet below for your reference:
    IApplicationPtr     m_Application;
    IReportPtr           m_ReportType;
    IDatabaseTablePtr      m_DBtable;
    IConnectionPropertyPtr      m_ConnectionPrprty;
    csDSNFormat.Format("ODBC;Driver={Microsoft Access Driver (*.mdb)}; DSN=''; Dbq=%s;",csDBFilePath); //dynamic dsn
    m_ReportType = m_Application->OpenReport(FilePath);
    m_DBtable = m_ReportType->Database->Tables->GetItem(1) ;
    /**delete all previous connection properties **/
    m_DBtable->ConnectionProperties->DeleteAll();
    /** set the dsn for the current database **/
    m_DBtable->ConnectionProperties->Add("DSN",(_variant_t)csDSNFormat);
    m_Viewer.ViewReport();
    /** To refresh the display items **/
    m_ReportType->DiscardSavedData();
    Awaiting for your reply.

Maybe you are looking for