As discussed in #database-discussion on discord. The following actions to setup a new DOL server on Ubuntu 16.04 or Debian Jessie result in an exception message when adding Guard Paths.
The below (mostly scripted) can be used on a fresh Debian Jessie VM to reproduce the error.
apt-get install -y git
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian jessie main" | sudo tee /etc/apt/sources.list.d/mono-official.list
apt-get update
apt-get install -y mono-complete nuget mariadb-server
mysql -u root -p
> use mysql;
> update user set plugin = '' where user = 'root';
> flush privileges;
> create database dol;
git clone https://github.com/Eve-of-Darkness/db-public.git
cd db-public/src/scripts/bin/linux
./concat
cat public-db.sql | mysql -u root -p -D dol
cd ~
git clone https://github.com/Dawn-of-Light/DOLSharp.git
cd DOLSharp/
git checkout 1.9.7.3665
nuget restore DOLServer/packages.config -SolutionDirectory ./
MONO_IOMAP=case xbuild /p:Configuration=Debug "Dawn of Light.sln"
cd Debug
LANG=en_US.CP1252 mono --debug --gc=sgen --server DOLServer.exe
# exit DOLServer
sed -i 's/ColoredConsoleAppender/ConsoleAppender/g' config/logconfig.xml
# Point server to local DB
nano config/serverconfig.xml
# <DBType>MYSQL</DBType> # Change DBType to MYSQL
# <DBConnectionString>server=localhost;port=3306;database=dol;user id=root;password=root;treattinyasboolean=False;minimumPoolSize=10;maximumpoolsize=20;</DBConnectionString>
LANG=en_US.CP1252 mono --debug --gc=sgen --server DOLServer.exe
[22:03:46,225] Registered Keep: Molvik Albion Tower
[22:03:46,226] Registered Keep: Midgard Leirvik Tower
[22:03:46,226] Registered Keep: Molvik Midgard Tower
[22:03:46,226] Registered Keep: Albion Leirvik Tower
[22:03:46,226] Registered Keep: Molvik Hibernian Tower
[22:03:46,226] Registered Keep: Hibernia Leirvik Tower
[22:03:46,329] Failed to load keep door from position! DoorID=710101501. Component SkinID=10. KeepID=101
[22:03:46,419] Failed to load keep door from position! DoorID=713201301. Component SkinID=10. KeepID=132
[22:03:46,426] Failed to load keep door from position! DoorID=713201301. Component SkinID=10. KeepID=132
[22:03:46,567] Failed to load keep door from position! DoorID=710402101. Component SkinID=10. KeepID=104
[22:03:46,570] Failed to load keep door from position! DoorID=710402101. Component SkinID=10. KeepID=104
[22:03:46,918] ExecuteSelectImpl: SQL Select (DEFAULT) took 544ms!
SELECT PathID
, Step
, X
, Y
, Z
, MaxSpeed
, WaitTime
, LastTimeRowUpdated
, PathPoints_ID
FROM PathPoints
WHERE PathID
= @Pathid
[22:03:47,127] Failed to start the server
System.AggregateException: One or more errors occurred. ---> System.ArgumentException: Item has already been added. Key in dictionary: '31' Key being added: '31'
at System.Collections.SortedList.Add (System.Object key, System.Object value) [0x00054] in <2e7c1c96edae44d496118948ca617c11>:0
at DOL.GS.Keeps.PositionMgr.LoadPatrolPath (System.String pathID, DOL.GS.Keeps.GameKeepComponent component) [0x00085] in /root/DOLSharp/GameServer/keeps/Managers/Position Manager.cs:332
at DOL.GS.Keeps.Patrol.InitialiseGuards () [0x0001e] in /root/DOLSharp/GameServer/keeps/Gameobjects/Guards/Patrol.cs:87
at DOL.GS.Keeps.GameKeepComponent.FillPositions () [0x00173] in /root/DOLSharp/GameServer/keeps/GameKeepComponent.cs:458
at DOL.GS.Keeps.GameKeepComponent.LoadFromDatabase (DOL.Database.DBKeepComponent component, DOL.GS.Keeps.AbstractGameKeep keep) [0x001a7] in /root/DOLSharp/GameServer/keeps/GameKeepComponent.cs:376
at DOL.GS.Keeps.DefaultKeepManager.b__11_1 (System.Linq.IGrouping2[TKey,TElement] components) [0x00039] in /root/DOLSharp/GameServer/keeps/KeepManager.cs:166 at System.Linq.Parallel.ForAllOperator
1+ForAllEnumerator1[TInput,TKey].MoveNext (TInput& currentElement, System.Int32& currentKey) [0x00029] in <b0fca80f08474611b248e2d30bb75230>:0 at System.Linq.Parallel.ForAllSpoolingTask
2[TInputOutput,TIgnoreKey].SpoolingWork () [0x00010] in :0
at System.Linq.Parallel.SpoolingTaskBase.Work () [0x0005d] in :0
at System.Linq.Parallel.QueryTask.BaseWork (System.Object unused) [0x00015] in :0
at System.Linq.Parallel.QueryTask+<>c.<.cctor>b__10_0 (System.Object o) [0x00000] in :0
at System.Threading.Tasks.Task.InnerInvoke () [0x00025] in <2e7c1c96edae44d496118948ca617c11>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <2e7c1c96edae44d496118948ca617c11>:0
--- End of inner exception stack trace ---
at System.Linq.Parallel.QueryTaskGroupState.QueryEnd (System.Boolean userInitiatedDispose) [0x00081] in :0
at System.Linq.Parallel.SpoolingTask.SpoolForAll[TInputOutput,TIgnoreKey] (System.Linq.Parallel.QueryTaskGroupState groupState, System.Linq.Parallel.PartitionedStream2[TElement,TKey] partitions, System.Threading.Tasks.TaskScheduler taskScheduler) [0x00045] in <b0fca80f08474611b248e2d30bb75230>:0 at System.Linq.Parallel.DefaultMergeHelper
2[TInputOutput,TIgnoreKey].System.Linq.Parallel.IMergeHelper.Execute () [0x00054] in :0
at System.Linq.Parallel.MergeExecutor1[TInputOutput].Execute () [0x00000] in <b0fca80f08474611b248e2d30bb75230>:0 at System.Linq.Parallel.MergeExecutor
1[TInputOutput].Execute[TKey] (System.Linq.Parallel.PartitionedStream2[TElement,TKey] partitions, System.Boolean ignoreOutput, System.Linq.ParallelMergeOptions options, System.Threading.Tasks.TaskScheduler taskScheduler, System.Boolean isOrdered, System.Linq.Parallel.CancellationState cancellationState, System.Int32 queryId) [0x00082] in <b0fca80f08474611b248e2d30bb75230>:0 at System.Linq.Parallel.PartitionedStreamMerger
1[TOutput].Receive[TKey] (System.Linq.Parallel.PartitionedStream2[TElement,TKey] partitionedStream) [0x00000] in <b0fca80f08474611b248e2d30bb75230>:0 at System.Linq.Parallel.ForAllOperator
1[TInput].WrapPartitionedStream[TKey] (System.Linq.Parallel.PartitionedStream2[TElement,TKey] inputStream, System.Linq.Parallel.IPartitionedStreamRecipient
1[TElement] recipient, System.Boolean preferStriping, System.Linq.Parallel.QuerySettings settings) [0x00045] in :0
at System.Linq.Parallel.UnaryQueryOperator2+UnaryQueryOperatorResults+ChildResultsRecipient[TInput,TOutput].Receive[TKey] (System.Linq.Parallel.PartitionedStream
2[TElement,TKey] inputStream) [0x00000] in :0
at System.Linq.Parallel.ScanQueryOperator1+ScanEnumerableQueryOperatorResults[TElement].GivePartitionedStream (System.Linq.Parallel.IPartitionedStreamRecipient
1[TElement] recipient) [0x00020] in :0
at System.Linq.Parallel.UnaryQueryOperator2+UnaryQueryOperatorResults[TInput,TOutput].GivePartitionedStream (System.Linq.Parallel.IPartitionedStreamRecipient
1[TElement] recipient) [0x000b2] in :0
at System.Linq.Parallel.QueryOperator1[TOutput].GetOpenedEnumerator (System.Nullable
1[T] mergeOptions, System.Boolean suppressOrder, System.Boolean forEffect, System.Linq.Parallel.QuerySettings querySettings) [0x000cb] in :0
at System.Linq.Parallel.ForAllOperator1[TInput].RunSynchronously () [0x00039] in <b0fca80f08474611b248e2d30bb75230>:0 at System.Linq.ParallelEnumerable.ForAll[TSource] (System.Linq.ParallelQuery
1[TSource] source, System.Action1[T] action) [0x00023] in <b0fca80f08474611b248e2d30bb75230>:0 at DOL.GS.Keeps.DefaultKeepManager.Load () [0x002ee] in /root/DOLSharp/GameServer/keeps/KeepManager.cs:151 at DOL.GS.GameServer.StartKeepManager () [0x0029e] in /root/DOLSharp/GameServer/GameServer.cs:1053 at DOL.GS.GameServer.Start () [0x00415] in /root/DOLSharp/GameServer/GameServer.cs:738 ---> (Inner Exception #0) System.ArgumentException: Item has already been added. Key in dictionary: '31' Key being added: '31' at System.Collections.SortedList.Add (System.Object key, System.Object value) [0x00054] in <2e7c1c96edae44d496118948ca617c11>:0 at DOL.GS.Keeps.PositionMgr.LoadPatrolPath (System.String pathID, DOL.GS.Keeps.GameKeepComponent component) [0x00085] in /root/DOLSharp/GameServer/keeps/Managers/Position Manager.cs:332 at DOL.GS.Keeps.Patrol.InitialiseGuards () [0x0001e] in /root/DOLSharp/GameServer/keeps/Gameobjects/Guards/Patrol.cs:87 at DOL.GS.Keeps.GameKeepComponent.FillPositions () [0x00173] in /root/DOLSharp/GameServer/keeps/GameKeepComponent.cs:458 at DOL.GS.Keeps.GameKeepComponent.LoadFromDatabase (DOL.Database.DBKeepComponent component, DOL.GS.Keeps.AbstractGameKeep keep) [0x001a7] in /root/DOLSharp/GameServer/keeps/GameKeepComponent.cs:376 at DOL.GS.Keeps.DefaultKeepManager.<Load>b__11_1 (System.Linq.IGrouping
2[TKey,TElement] components) [0x00039] in /root/DOLSharp/GameServer/keeps/KeepManager.cs:166
at System.Linq.Parallel.ForAllOperator1+ForAllEnumerator
1[TInput,TKey].MoveNext (TInput& currentElement, System.Int32& currentKey) [0x00029] in :0
at System.Linq.Parallel.ForAllSpoolingTask`2[TInputOutput,TIgnoreKey].SpoolingWork () [0x00010] in :0
at System.Linq.Parallel.SpoolingTaskBase.Work () [0x0005d] in :0
at System.Linq.Parallel.QueryTask.BaseWork (System.Object unused) [0x00015] in :0
at System.Linq.Parallel.QueryTask+<>c.<.cctor>b__10_0 (System.Object o) [0x00000] in :0
at System.Threading.Tasks.Task.InnerInvoke () [0x00025] in <2e7c1c96edae44d496118948ca617c11>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <2e7c1c96edae44d496118948ca617c11>:0 <---
---> (Inner Exception #1) System.ArgumentException: Item has already been added. Key in dictionary: '31' Key being added: '31'
at System.Collections.SortedList.Add (System.Object key, System.Object value) [0x00054] in <2e7c1c96edae44d496118948ca617c11>:0
at DOL.GS.Keeps.PositionMgr.LoadPatrolPath (System.String pathID, DOL.GS.Keeps.GameKeepComponent component) [0x00085] in /root/DOLSharp/GameServer/keeps/Managers/Position Manager.cs:332
at DOL.GS.Keeps.Patrol.InitialiseGuards () [0x0001e] in /root/DOLSharp/GameServer/keeps/Gameobjects/Guards/Patrol.cs:87
at DOL.GS.Keeps.GameKeepComponent.FillPositions () [0x00173] in /root/DOLSharp/GameServer/keeps/GameKeepComponent.cs:458
at DOL.GS.Keeps.GameKeepComponent.LoadFromDatabase (DOL.Database.DBKeepComponent component, DOL.GS.Keeps.AbstractGameKeep keep) [0x001a7] in /root/DOLSharp/GameServer/keeps/GameKeepComponent.cs:376
at DOL.GS.Keeps.DefaultKeepManager.b__11_1 (System.Linq.IGrouping2[TKey,TElement] components) [0x00039] in /root/DOLSharp/GameServer/keeps/KeepManager.cs:166 at System.Linq.Parallel.ForAllOperator
1+ForAllEnumerator1[TInput,TKey].MoveNext (TInput& currentElement, System.Int32& currentKey) [0x00029] in <b0fca80f08474611b248e2d30bb75230>:0 at System.Linq.Parallel.ForAllSpoolingTask
2[TInputOutput,TIgnoreKey].SpoolingWork () [0x00010] in :0
at System.Linq.Parallel.SpoolingTaskBase.Work () [0x0005d] in :0
at System.Linq.Parallel.QueryTask.BaseWork (System.Object unused) [0x00015] in :0
at System.Linq.Parallel.QueryTask.RunTaskSynchronously (System.Object o) [0x00000] in :0
at System.Threading.Tasks.Task.InnerInvoke () [0x00025] in <2e7c1c96edae44d496118948ca617c11>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <2e7c1c96edae44d496118948ca617c11>:0 <---