Redis OSX Exception: invalid DB index, sPort: 0, LastCommand:

Hangfire JobStore runs well on SQLServer 2008 R2 in VMWare Fusion 7 Pro in OSX Mavericks, hosting a Windows 7 Pro Hangfire App. I want to replace SQLServer with Redis running in OSX Mavericks. Regis 2.8.17 is running in IP xx.x.x.xx Port 6379. (MongoDB is also running on IP xx.x.x.xx but Port 4142 and is shared nicely with Windows VMs in the same OSX host. When I change the JobStore to Redis, all works well until I enqueue the job, at which time Hangfire creates the DB Tables if they don’t already exist. However, at DBTable create time, Redis throws the exception: “invalid DB index, sPort: 0, LastCommand:”. I show Redis code snippets below. This works well for SQLServer (Startup.UseRedisAsJobStorageServer = false) but fails for Redis (Startup.UseRedisAsJobStorageServer = true). What am I doing wrong?

            if (Startup.UseRedisAsJobStorageServer)
            {
                JobStorage.Current = new RedisStorage(Startup.RedisIP, Startup.RedisPort);
            }
            else
            {
                JobStorage.Current = new SqlServerStorage(Startup.SQLServerConnectionstring);
            }

           .....

    Startup.app.UseHangfire(config =>
     {
                 config.UseAuthorizationFilters();
                 if (Startup.UseRedisAsJobStorageServer)
                {
                    config.UseRedisStorage(Startup.RedisIP, Startup.RedisPort);
                }
                else
                {
                    config.UseSqlServerStorage(Startup.SQLServerConnectionstring);
                }

            ......

            BackgroundJob.Enqueue(() => KESConsoleRunner.Program.ExecuteBackgroundJob(RunString, Startup.server.Instance.Address.ToString(), Startup.SQLServerConnectionstring));

 }

Some more detail. The HTML Exception is “Job creation process has bee failed. See inner exception for details?” and the inner html exception is: "“invalid DB index, sPort: 0, LastCommand:”

Also, although it makes no difference sine the arguments are PassThru’s, I adjusted the Enqueue code to pass the right HangfireDB address to the backend process:

      BackgroundJob.Enqueue(() => KESConsoleRunner.Program.ExecuteBackgroundJob(
                RunString, 
                Startup.server.Instance.Address.ToString(), //mongodb
                Startup.UseRedisAsJobStorageServer 
                ? Startup.RedisIP + ":" + Startup.RedisPort
                : Startup.SQLServerConnectionstring));

Found it.

Redis Call is wrong

                if (Startup.useSQLServer)
                {
                    JobStorage.Current = new SqlServerStorage(Startup.SQLServerConnectionstring);
                }
                else
                {
                    JobStorage.Current = new RedisStorage(Startup.RedisIP + ":" + Startup.RedisPort, Startup.RedisDB);
                }

Now Redis in OSX is populating with Job Requests

Resolved. Although I had a password on the REDIS instance running on OS X, the Windows access through Hangfire did not see the password. Removing the password in the API call solved the problem. I’ll worry about security later, once I get all the pieces working the way I need them to work.