linuxserver / docker-jackett

GNU General Public License v3.0
394 stars 95 forks source link

Indexer configuration is lost if container gets removed #7

Closed agrlh closed 8 years ago

agrlh commented 8 years ago

If the jackett container gets removed/recreated the previous configuration can not be restored. You have to update the password fields for each of the indexer to get jackett working again. See: https://github.com/Jackett/Jackett/issues/361 Works great however with this image: https://github.com/tyler43636/unraid-jackett

Error message from docker logs:

Error Failed loading configuration for RandomIndexer, you must reconfigure this indexer System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
  at System.Security.Cryptography.RijndaelManagedTransform.DecryptData (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, System.Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) <0x7f405e8430c0 + 0x00f88> in <filename unknown>:0
  at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) <0x7f405e841a10 + 0x001d0> in <filename unknown>:0
  at System.Security.Cryptography.CryptoStream.FlushFinalBlock () <0x7f405e837c50 + 0x00044> in <filename unknown>:0
  at System.Security.Cryptography.CryptoStream.Dispose (Boolean disposing) <0x7f405e839720 + 0x00030> in <filename unknown>:0
  at System.IO.Stream.Close () <0x7f405e7c93d0 + 0x00019> in <filename unknown>:0
  at Jackett.Services.ProtectionService.UnProtectDefaultMethod (System.String plainText) <0x4197faf0 + 0x00318> in <filename unknown>:0
  at Jackett.Services.ProtectionService.UnProtect (System.String plainText) <0x4197fa70 + 0x00043> in <filename unknown>:0
  at Jackett.Models.IndexerConfig.ConfigurationData.LoadValuesFromJson (Newtonsoft.Json.Linq.JToken json, IProtectionService ps) <0x4197e000 + 0x002f5> in <filename unknown>:0
  at Jackett.Indexers.BaseIndexer.LoadFromSavedConfiguration (Newtonsoft.Json.Linq.JToken jsonConfig) <0x4196dbd0 + 0x0005f> in <filename unknown>:0
  at Jackett.Services.IndexerManagerService.InitIndexers () <0x4195fcf0 + 0x00216> in <filename unknown>:0
sparklyballs commented 8 years ago

The PR should hopefully resolve this, but any current keypair data will still be lost on the initial update to this revision. going forward though i hope that keypair data is persistent.

agrlh commented 8 years ago

I've tested it and it works perfectly! And I like the switch to alpine, great stuff!

michaelarnauts commented 8 years ago

I haven't tested this alpine version, but I did notice in different projects that musl (what is in use by alpine) can be double as slow compared to libc (what is used by ubuntu/debian/...) This can be important to take in consideration. I agree that alpine is quite a lot smaller, but it also suffers in speed.

CHBMB commented 8 years ago

If you'd care to test and let us know that'd be helpful, of course any measured drop in speed would need to be significant enough to cause issues in real world use for us to reconsider changing the base image back.