Database already connected

687 views
Skip to first unread message

Kane, Rick

unread,
Apr 15, 2014, 1:58:25 PM4/15/14
to d...@peg.com
I tried this on the datad...@peg.com forum and did not get a reply so I would like to try it here.

Progress 10.2B04

I have a windows service that connects to a Progress database running on a linux server. Last night I started to receive the following error:

Microsoft.Data.Odbc.OdbcException: ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Database is already connected.
ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Database is already connected.
at Microsoft.Data.Odbc.OdbcConnection.Open()
at GbpcpdPtMstrSrv.Service1.Replicate()

I tried stopping/starting the service.
I tried uninstalling/installing the service.

I found the following message in the Progress database log:

[2014/04/14@18:19:40.492-0500] P-19610 T--598013504 I BROKER 0: (12454) Server 2 has 1 unresolved pending connections(s). Please check port 11002.

This started last night during an online database backup. I don't know if the backup is related or not.

I ran 'netstat -nap | grep 11002' on the linux server and it is _sqlsrv2.

I need to free this up without having to take the databases down if at all possible. Does anyone have any ideas on how I might do that?

Thanks,

PEG# 1998030601

Rick Kane
Applications Group Manager
Green Bay Packaging Inc.
Coated Products Operations
(920) 337-1856




Dmitri Levin

unread,
Apr 15, 2014, 5:22:06 PM4/15/14
to d...@peg.com
If you are running SQL login broker separate from primary login broker, then you can restart just sql login broker without affecting 4GL sessions.

$DLC/bin/proserve -db name ... -Mn XXX  -ServerType 4GL          == primary login broker
$DLC/bin/proserve  -db name -m3 -Mpb XX -ServerType SQL       == sql login broker.

Dmitri Levin
alphabroder Co.

Kane, Rick

unread,
Apr 16, 2014, 9:23:01 AM4/16/14
to d...@peg.com
Thanks.

We do start the SQL broker separate from the 4GL broker but when we do a shutdown we just specify the database name and it shuts down all brokers. In looking at the manual for proshut it looks like I can just add the -S service-name parameter and only shut down the SQL broker as you suggest. My concern is that we start the SQL broker first which I assume makes it the primary as it includes -L , -B and other parameters that the 4GL broker does not.

I have a work around for my problem now so I will probably wait until this weekend and then bring all brokers down. I may experiment in a test environment though.

Thanks for your help.

Rick

Glenn Garrison

unread,
Apr 16, 2014, 10:06:08 AM4/16/14
to d...@peg.com
Whatever order you start the brokers in, shut them down in the reverse order.

If it were me, I'd start the SQL Broker 2nd, then shut it down first
(in the shutdown script).

That always works for me.

Glenn
--
G. Glenn Garrison
Garrison Systems Inc
www.Garrison1.com


George Potemkin (peg)

unread,
Apr 16, 2014, 10:20:30 AM4/16/14
to d...@peg.com
> In looking at the manual for proshut it looks like I can just add the -S
> service-name parameter and only shut down the SQL broker as you suggest.

No. Proshut -H/-S is connecting db through a /login/ broker to pass a
shutdown request to a /primary/ database broker. It will stop the database.

The only way to stop a login broker separately from other processes is a
kill command (e.g. kill -15).

Regards,
George Potemkin
Progress Technologies
S.-Petersburg, Russia
Phone: +7 (812) 438 2757
http://www.progress-tech.ru



Kane, Rick

unread,
Apr 16, 2014, 10:58:29 AM4/16/14
to d...@peg.com
I was wondering myself why I start the SQL broker first since it has very little use compared to the 4GL broker. I've done it this way for a very long time. I looked back in my notes which state that the first broker should be the SQL-92 broker and then the 4GL broker as a secondary (-m3) broker. Unfortunately like many notes they do not explain why. I'm thinking I must have read that in a manual someplace but I couldn't say where.

Thanks,
Rick

Paul Koufalis

unread,
Apr 17, 2014, 10:50:30 AM4/17/14
to d...@peg.com
What are your -Mi -Ma -Mpb parameters for the SQL broker?

A bug was introduced in early 10.2B0x where if the -Ma is greater than
about 5, these pendconnect errors start to occur.


Paul

******************************************
* Paul Koufalis
* Progresswiz informatique
*
* Email: p...@progresswiz.com
* Phone: 514 247 2023
*
* Progress, MFG/PRO, UNIX, Windows, EDI
******************************************

Dmitri Levin

unread,
Apr 17, 2014, 11:13:45 AM4/17/14
to d...@peg.com
George

I was wondering what for is promon R&D 4 / 7 / 7 option?
7. Terminate a server

11:08:12        Server Options

  0 29556830 Login                                  0      0      0      4   0
  1 50004072 Login      TCP                         0      0      0      5  10123
  2 17498142 Auto       TCP                         1      0      0      5   1026

Enter server number, <return> (to continue), or P (previous menu):

It will terminate a [ remote client ] server. If I type 2 above, server 17498142 (on port 1026) will be gone.
But it will not terminate SQL login broker 1. 
So the way to terminate it is

kill -15 50004072

Me thinking it should be somewhere in Promon to terminate login broker.


Dmitri Levin
alphabroder Co.



----------------------------------------
> From: gpot...@progress-tech.ru
> Subject: Re: Database already connected
> Date: Wed, 16 Apr 2014 18:20:30 +0400
> To: d...@peg.com

Kane, Rick

unread,
Apr 17, 2014, 12:17:35 PM4/17/14
to d...@peg.com
-Mi 4 -Ma 10 -Mpb 1

-----Original Message-----
From: Paul Koufalis [mailto:p...@progresswiz.com]
Sent: Thursday, April 17, 2014 9:51 AM
To: Kane, Rick; d...@peg.com
Subject: RE: Database already connected

Paul Koufalis

unread,
Apr 17, 2014, 12:31:18 PM4/17/14
to d...@peg.com
Certainly sounds similar to what I faced. I suggest reducing -Ma from 10 to
5 and increasing -Mn and -Mpb each by one:

-Mn (whatever it is now + 1) -Mpb 2 -Mi 1 -Ma 5

Setting -Mi to 1 or 4 doesn't make much difference for _sqlsrv2 as it spawns
one thread per connected user.

Kane, Rick

unread,
Apr 17, 2014, 12:34:56 PM4/17/14
to d...@peg.com
Thanks, I will try that. This is the first time I've run into this but if I can prevent it from happening again I will try it.

Thanks,
Rick

Walter Munozriquelme

unread,
Oct 13, 2016, 1:10:29 PM10/13/16
to Progress (OpenEdge) - DBA, d...@peg.com, rk...@gbpcoated.com

Dear I have a very similar problem throws me errors .. Database is already connected / Optional feature not implemented / Driver's SQLSetConnectAttr failed

As resolved?

Thank you very much

Pankaj Patel

unread,
Sep 28, 2020, 4:53:08 AM9/28/20
to Progress (OpenEdge) - DBA
Hi Paul n all,
Does this bug(you mentioned) still exist for Progress version greater or equal to 10.2B0x?
What should be the recommended value for "-Ma" for any version of Progress?

How much additional memory (any baseline recommendation) needed in case of increase in "-Mn"?

Thanks,
Pankaj
Reply all
Reply to author
Forward
0 new messages