Skip to main content
Hi,

I'm doing K2 development on a VPC image running Windows Server 2003. I shut down the image over the weekend and this morning when I start it up K2 Logs the following at startup:

K2Error*.log
07-05-07 09:36:03 K2Sql.LoadLog: Index was outside the bounds of the array.
at ArchiveX..ctor(Byte[] buf)
at K2Sql.LoadLog()
07-05-07 09:36:03 K2Server.Start: Index was outside the bounds of the array.
at K2Sql.LoadLog()
at K2Log.Init()
at K2Server.OnStart(String[] args)

K2Server.log
07-05-07 09:36:02 K2.net Server Version 3.6090.1.0 (Service Pack 3)
07-05-07 09:36:02 -------------------------------------------------
07-05-07 09:36:02 Server starting
07-05-07 09:36:02 Loading .NET Framework v1.1.4322
07-05-07 09:36:02 Framework loaded successfully
07-05-07 09:36:02 Service started under <domain user>
07-05-07 09:36:02 Sql initialized successfully
07-05-07 09:36:02 Server: <server name>, Database: K2
07-05-07 09:36:03 Socket initialized successfully
07-05-07 09:36:03 Worker initialized successfully
07-05-07 09:36:03 Evaluating License Key
07-05-07 09:36:03 K2.net Licensed for 1 CPU(s)
07-05-07 09:36:03 ThreadPool initialized successfully
07-05-07 09:36:03 Manager initialized successfully
07-05-07 09:36:03 Index was outside the bounds of the array.
07-05-07 09:36:03 Exiting Server

Obviously the k2 workspace doesn't work and neither does the K2.net service manager. Does anyone have an idea what the source of the problem is and what I need to do to fix it?
Andrew -
This error appears to occur between when the User Manager configuration is evaluated and when it loads/is referenced.

Are you attempting to use a custom User Manager or using ADUM or SQLUM? Hybrid (Mulit-user manager 'MuM')?
Hi Dave,

I'm using ADUM and I haven't changed the configuration since I first installed K2.net.

--
Andrew
What version of K2 are you running?

SP4 typically reports more text than the message you provided. It should read "User Manager ADUM.K2UserManager initialized" compared to your "Manager initialized successfully" message (SP3 or earlier?).

I suspect the User Manager is not configured properly or can't authenticate against the domain.

I would throttle back to some basic tests sarting with whether the K2 Server service is healthly (can the K2 Service even load?)

If the K2 Service starts fine, then I would attempt to run K2 in console mode (which you are apparently trying to do).

Did anything get re-configured in your VPC machine (NIC, CPU config, etc.)?

If he problem still exists, I would look into the K2 database's _Setting table and/or _server table for various entries (t-shooting depending on your responses).
I'm running SP3. The service starts and according to the windows services applet continues to run but I can't connect the workspace nor the K2 service manager. The error from the worklist is: "Error: Authentication with the server failed". When I start the K2Server.exe from explorer I get the information from the trace log and then the window just sits there.
I didn't reconfigure anything with my VPC. I shut it down on Friday before I left work and then started it this morning when I got in.
I prefer to use the following troubleshooting sequence since succeeding functionality will fail if preceding components aren't healthy:
1. Confirm k2 Service is healthy
2. Confirm a) K2 Service Manager and/or b) Console load properly
3. Confirm Workspace loads locally, then remotely
4. Confirm Processes and UI's initialize and run as expected.

You confirmed Step 1 is working (using domainuser or local system account?).

We're now troubleshooting step 2 a/b.
I would look into your K2Server.config file for proper configuration settings. Are you using SQL authentication or Windows Integrated (WIA)?
The K2 Server Manager loads but cannot connect to the K2Server even though the Windows Services applet shows the K2 server as running. The K2 service is running as a domain user.

Here's my K2Server.config. I've obfuscated some of the information.
<domain> contains the user that runs the K2 service.
<domain2> contains my user ID

[quote user="LDAP://DC=<domain>,DC=<org>,DC=com" NetBiosName="<DOMAIN>" Type="ActiveDirectory" />
<DataSource Path="LDAP://DC=<domain2>,DC=<parentOrg>,DC=com" NetBiosName="<DOMAIN2>" Type="ActiveDirectory" />
</DataSources>
<Database ConnectionString="server=<servername>;database=K2;uid=sa;pwd=<password>;pooling=true;enlist=false;Min Pool Size=5" />
<LogDatabase ConnectionString="server=<servername>;database=K2Log;uid=sa;pwd=<password>;pooling=true;enlist=false;Min Pool Size=5" />
<ThreadPooling Value="K2.net" Count="25" />
<LogThreadPooling Count="5" Priority="Low" />
<Framework Version="v1.1.4322" />
<Trace Enable="True" FileName="K2Server.log" />
<WorklistRemove Seconds="100" />
<IPCThreadPooling Count="5" Priority="Normal" />
<DefaultSMTPServer Server="" />
<SharePoint>
<BasicAuthentication>False</BasicAuthentication>
<UserName>
</UserName>
<Password>
</Password>
<Domain>
</Domain>
</SharePoint>
<DefaultSettings>
<LogConditionResults>False</LogConditionResults>
</DefaultSettings>
</K2Server>
I recommend running a SQL trace as you start the K2 server service to see if you can isolate what query the K2 server is making that is returning this error.

-Eric
Based on your k2server.config sample, you appear to be running under SQL Authentication mode. The sa account appears to be fine ("Sql initialized successfully " status in message returned).

I found some information (relating to SP2a) that may help here:

* * * Caution: backup both the K2 and K2Log databases before manually altering the data or objects * * *

A stored procedure may be querying the K2.dbo._Log table. Look in that table for an entry that looks similar to this:
963034 28027 0x 1

Where as a normal row would look like this:
963034 28027

Try deleting the bad row.

The row may be a corrupt entry that could have come from restarting SQL without first stopping the K2 server service.

On a side note (may/may not be contributing to the problem) - I'm not sure how/why you're using the <domain> and <domain2> references:


<domain> contains the user that runs the K2 service.
<domain2> contains my user ID


These are not user account settings, but domain and machine configurations. The K2 training VPCs have:
<Datasource Path="LDAP://DC=K2MEGA, DC=Local" NetBiosName="K2MEGA" Type="ActiveDirectory" />

When you moved to the new VPC, did the domain change?

Since
Based on your k2server.config sample, you appear to be running under SQL Authentication mode. The sa account appears to be fine ("Sql initialized successfully " status in message returned).

I found some information (relating to SP2a) that may help here:

* * * Caution: backup both the K2 and K2Log databases before manually altering the data or objects * * *

A stored procedure may be querying the K2.dbo._Log table. Look in that table for an entry that looks similar to this:
963034 28027 0x 1

Where as a normal row would look like this:
963034 28027

Try deleting the bad row.

The row may be a corrupt entry that could have come from restarting SQL without first stopping the K2 server service.

On a side note (may/may not be contributing to the problem) - I'm not sure how/why you're using the <domain> and <domain2> references:


<domain> contains the user that runs the K2 service.
<domain2> contains my user ID


These are not user account settings, but domain and machine configurations. The K2 training VPCs have:
<Datasource Path="LDAP://DC=K2MEGA, DC=Local" NetBiosName="K2MEGA" Type="ActiveDirectory" />

When you moved to the new VPC, did the domain change?
Thanks, removing that row allowed the service to start correctly. Everything seems to work now. I'll have to file this away in case this happens again. As far as the domain stuff goes. Nothing has changed. I didn't move to this VPC, this is the only VPC I've ever had with K2 installed. We have other devs in my team that are using identical setups.

Thanks again for the help.
Try delete all row in table _Log

It work for me

Reply