Free cookie consent management tool by TermsFeed Policy Generator

Version 12 (modified by ascheibe, 13 years ago) (diff)


How to setup a Hive server

This page gives you instructions about how to setup and run a Hive server.

Certificate and Authentication

  • Follow DevelopersHowtosDevelopServices
  • Notes on using SQL Server 2008 R2:
    • In the connection string the .\SQLEXPRESS should be changed to . . For example in the command to create the ASP.NET authentication database: aspnet_regsql.exe -C "data source=.;Integrated Security=SSPI" -A all -d HeuristicLab.Authentication.
    • If the above mentioned command fails with a timeout, the error could be a compatibility problem between the 2005 and 2008R2 SQL Server versions. SQL Server Management Studio offers the option in the database properties to set the compatibility level to SQL Server 2005 and this should fix the problem.
  • Goto Windows Services > start Distributed Transaction Coordinator service (needed to use transactions over multiple databases)

Setup IIS

  • Open IIS Manager
  • Create an application pool (Hive-3.3, .net 4.x, integrated)
    • Open advanced settings of the application pool and select NetworkService as identity (if you don't have your own identities for IIS AppPools)
    • Set Disable Overlapping Recycle to true. This avoids that multiple AppDomains are created which causes problems in Hive-3.3.
  • Create a new website (or use an existing one)
  • Go to bindings of the website.
    • Add a http-binding with port 80.
  • Create a new application within the website and call it Hive-3.3 and use the already created appPool Hive-3.3
  • Open advanced settings of the application and enter http as enabled protocols
  • Grant the usergroup IIS_IUSRS read-permissions on the application directory
  • Grant the NETWORK SERVICE group read access to the certificate you created in DevelopersHowtosDevelopServices
  • For the charting to work in the Status.aspx page, a folder for caching the images has to be created. The default, as configured in the Web.config, is C:\TempImageFiles\. Note that Network Service must have read and write permissions to this folder.

Add groups and users to the authentication db

  • Open the Hive Visual Studio solution
  • Click on the Hive-3.3 Web project. In the solution explorer the ASP.NET Configuration button shows up. As mentioned in DevelopersHowtosDevelopServices this allows to configure users and groups. On the configuration website, first add the groups:
    • Hive Administrator
    • Hive Slave
    • Hive User
    • Hive IsAllowedPrivileged
  • Users can now be added to the appropriate groups.
  • A special user for hive slaves must be added. This user has to be in the Hive Slave group. The default configuration is
    • User: hiveslave
    • Password: hiveslave

Webservice client setup

  • All clients (slave, administration, experiment manager) have an app.config file which contains a certificate tag under <identity>. To get this value for the local server execute svcutil.exe http://localhost/Hive-3.3/HiveService.svc?wsdl. This generates the client stub for the hive webservice. In the output.config file you will find the certificate tag with the right value. Replace all keys in the hive clients with this key of your machine.

Setup Hive database

  • Open the SQL Server Management Studio and create a new database called HeuristicLab.Hive-3.3
  • Use the SQL Server Management Studio to open and execute the following two scripts in this order:
    • Initialize Hive Database.sql
    • Prepare Hive Database.sql
  • Both scripts can be found in HeuristicLab.Services.Hive.DataAccess\3.3\SQL Scripts\
  • Use the SQL Server Management Studio to create a new login for the NETWORK SERVICE group (in Object Explorer: Security -> Logins -> right click (New Login...)). Next you have to add the login to the two created HeuristicLab databases (HeuristicLab.Hive-3.3, HeuristicLab.Authentication) in the Users section (in Object Explorer: Databases -> HeuristicLab.* -> Security -> Users -> right click (New User...)).

Problems and solutions

  • Exception Could Not Load Type System.ServiceModel.Activation.HttpModule
    • run aspnet_regiis.exe -iru
  • "HTTP-Fehler 500.19 - Internal Server Error: Dieser Konfigurationsabschnitt kann in diesem Pfad nicht verwendet werden. Dies ist der Fall, wenn der Abschnitt auf übergeordneter Ebene gesperrt ist. Die Sperrung erfolgt standardmäßig (overrideModeDefault="Deny") oder wird explizit mit einem location-Tag mit overrideMode="Deny" oder der Legacyeinstellung allowOverride="false" festgelegt."
      139:   <system.webServer>
      140:     <modules runAllManagedModulesForAllRequests="true">
      141:       <add name="HiveServerModule" type="HeuristicLab.Hive.Server.Core.IISModules.HiveServerModule"/>
    • Open Visual Studio command prompt as administrator and go to %windir%\system32\inetsrv\config
    • Enter "notepad applicationHost.config"
    • Search for the line
      <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
    • Change overrideModeDefault to Allow.

How to update Hive server

Updating the server is as simple as copying the new binaries into the "/bin" folder of the website. Of course changes to the database need to be done accordingly. It is no problem if there are slaves calculating during the update if it takes only a few seconds. If the update lasts longer than one minute ("SlaveHeartbeatTimeout") the slaves will be identified to be timed out as the server goes online again and their jobs will be lost.