Jump to content

How do I restore Functionality after hard disk mishap


wiz722
Go to solution Solved by wiz722,

Recommended Posts

Long story short, I had a drive which was part of the media library go offline last night, and I managed to get the RAID array functional again, but Emby no longer fully loads in the web interface or the apps. The system service is running successfully, but the web interface just starts to load then stays forever on the spinning loading circle.

 

An FSCK of the filesystem passes, but suddenly breaking a disk connection can obviously wreak havoc. While the filesystem itself is OK, the files that were open during the event might not necessarily be.

 

What should I do? My live TV recordings look accessible directly on the filesystem, so as long as I don't lose those, I can go as far as reinstalling the whole program.

Link to comment
Share on other sites

Here's a GIF of what I get to. Literally, it gets to the spinning circle, and never proceeds, even if I try to go to the dashboard or a different sub page. Before the hard drive lost power (long story), it worked beautifully.

* EDIT * The server dashboard works. Just the main UI doesn't.

* EDIT 2 * While I was waiting, I double-checked all the necessary file permissions for the folders used by Emby.

 

5c0c60fcb3103_LoadingEmby.gif

Edited by wiz722
Link to comment
Share on other sites

I notice you're using your remote https url. Why not start simple and use your local in-network http url for now?

Link to comment
Share on other sites

The only warning it gives is when I reload the page, it breaks the current WebSockets session, which is expected. From loading the home page to logging in, though, there are no errors or warnings in the console.

Link to comment
Share on other sites


Begin ConnectionManager constructor connectionmanager.js:1:14080
loading ApiClient singleton site.js:1:8176
creating ApiClient singleton site.js:1:8284
ApiClient serverAddress: https://emby.adamharbach.com:8920 apiclient.js:1:2113
ApiClient appName: Emby Mobile apiclient.js:1:2168
ApiClient appVersion: 3.5.3.0 apiclient.js:1:2211
ApiClient deviceName: Firefox apiclient.js:1:2260
ApiClient deviceId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx apiclient.js:1:2309
credentials initialized with: {"Servers":[{"DateLastAccessed":1544386149764,"LastConnectionMode":2,"ManualAddress":"https://emby.adamharbach.com:8920","manualAddressOnly":true,"Name":"adam-server","Id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","LocalAddress":"http://x.x.x.x:8096","RemoteAddress":"https://emby.adamharbach.com:8920","UserId":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","AccessToken":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","ExchangeToken":null}],"ConnectAccessToken":null,"ConnectUserId":null} credentials.js:1:179
loaded ApiClient singleton site.js:1:8657
initAfterDependencies promises resolved site.js:1:16769
Using default fonts site.js:1:18437
Loading installed plugins site.js:1:29599
Loading plugin: bower_components/emby-webcomponents/playback/playbackvalidation pluginmanager.js:1:571
Loading plugin: bower_components/emby-webcomponents/playback/playaccessvalidation pluginmanager.js:1:571
Loading plugin: bower_components/emby-webcomponents/playback/experimentalwarnings pluginmanager.js:1:571
Loading plugin: bower_components/emby-webcomponents/htmlaudioplayer/plugin pluginmanager.js:1:571
Loading plugin: bower_components/emby-webcomponents/htmlvideoplayer/plugin pluginmanager.js:1:571
Loading plugin: bower_components/emby-webcomponents/photoplayer/plugin pluginmanager.js:1:571
Loading plugin: bower_components/emby-webcomponents/sessionplayer pluginmanager.js:1:571
Loading plugin: bower_components/emby-webcomponents/youtubeplayer/plugin pluginmanager.js:1:571
Setting page base to /web router.js:1:13877
returning instance from getOrAddApiClient connectionmanager.js:1:16723
Begin onAppReady site.js:1:31482
onAppReady - loading dependencies site.js:1:31912
Loaded dependencies in onAppReady site.js:2:47
Defining core routes site.js:1:18933
Defining route: /addplugin.html site.js:1:18767
Defining route: /appservices.html site.js:1:18767
Defining route: /autoorganizelog.html site.js:1:18767
Defining route: /channelsettings.html site.js:1:18767
Defining route: /connectlogin.html site.js:1:18767
Defining route: /dashboard.html site.js:1:18767
Defining route: /dashboardgeneral.html site.js:1:18767
Defining route: /dashboardhosting.html site.js:1:18767
Defining route: /devices/devices.html site.js:1:18767
Defining route: /devices/device.html site.js:1:18767
Defining route: /devicesupload.html site.js:1:18767
Defining route: /dlnaprofile.html site.js:1:18767
Defining route: /dlnaprofiles.html site.js:1:18767
Defining route: /dlnaserversettings.html site.js:1:18767
Defining route: /dlnasettings.html site.js:1:18767
Defining route: /edititemmetadata.html site.js:1:18767
Defining route: /encodingsettings.html site.js:1:18767
Defining route: /forgotpassword.html site.js:1:18767
Defining route: /forgotpasswordpin.html site.js:1:18767
Defining route: /home.html site.js:1:18767
Defining route: /list/list.html site.js:1:18767
Defining route: /index.html site.js:1:18767
Defining route: /itemdetails.html site.js:1:18767
Defining route: /library.html site.js:1:18767
Defining route: /librarydisplay.html site.js:1:18767
Defining route: /librarysettings.html site.js:1:18767
Defining route: /livetv.html site.js:1:18767
Defining route: /livetvguideprovider.html site.js:1:18767
Defining route: /livetvseriestimer.html site.js:1:18767
Defining route: /livetvsettings.html site.js:1:18767
Defining route: /livetvstatus.html site.js:1:18767
Defining route: /livetvtuner.html site.js:1:18767
Defining route: /log.html site.js:1:18767
Defining route: /login.html site.js:1:18767
Defining route: /metadataadvanced.html site.js:1:18767
Defining route: /metadataimages.html site.js:1:18767
Defining route: /metadatanfo.html site.js:1:18767
Defining route: /movies.html site.js:1:18767
Defining route: /music.html site.js:1:18767
Defining route: /mypreferencesdisplay.html site.js:1:18767
Defining route: /mypreferenceshome.html site.js:1:18767
Defining route: /mypreferencessubtitles.html site.js:1:18767
Defining route: /mypreferenceslanguages.html site.js:1:18767
Defining route: /mypreferencesmenu.html site.js:1:18767
Defining route: /myprofile.html site.js:1:18767
Defining route: /offline/offline.html site.js:1:18767
Defining route: /managedownloads.html site.js:1:18767
Defining route: /mysync.html site.js:1:18767
Defining route: /camerauploadsettings.html site.js:1:18767
Defining route: /mysyncjob.html site.js:1:18767
Defining route: /mysyncsettings.html site.js:1:18767
Defining route: /notificationsetting.html site.js:1:18767
Defining route: /notificationsettings.html site.js:1:18767
Defining route: /nowplaying.html site.js:1:18767
Defining route: /playbackconfiguration.html site.js:1:18767
Defining route: /plugincatalog.html site.js:1:18767
Defining route: /plugins.html site.js:1:18767
Defining route: /scheduledtask.html site.js:1:18767
Defining route: /scheduledtasks.html site.js:1:18767
Defining route: /search.html site.js:1:18767
Defining route: /selectserver.html site.js:1:18767
Defining route: /serveractivity.html site.js:1:18767
Defining route: /serversecurity.html site.js:1:18767
Defining route: /streamingsettings.html site.js:1:18767
Defining route: /support.html site.js:1:18767
Defining route: /supporterkey.html site.js:1:18767
Defining route: /syncactivity.html site.js:1:18767
Defining route: /syncsettings.html site.js:1:18767
Defining route: /tv.html site.js:1:18767
Defining route: /useredit.html site.js:1:18767
Defining route: /userlibraryaccess.html site.js:1:18767
Defining route: /usernew.html site.js:1:18767
Defining route: /userparentalcontrol.html site.js:1:18767
Defining route: /userpassword.html site.js:1:18767
Defining route: /userprofiles.html site.js:1:18767
Defining route: /wizardagreement.html site.js:1:18767
Defining route: /wizardremoteaccess.html site.js:1:18767
Defining route: /wizardfinish.html site.js:1:18767
Defining route: /wizardlibrary.html site.js:1:18767
Defining route: /wizardsettings.html site.js:1:18767
Defining route: /wizardstart.html site.js:1:18767
Defining route: /wizarduser.html site.js:1:18767
Defining route: /videoosd.html site.js:1:18767
Defining route: /configurationpage site.js:1:18767
Defining route: / site.js:1:18767
returning instance from getOrAddApiClient connectionmanager.js:1:16723
Begin connect connectionmanager.js:1:28343
Begin getAvailableServers connectionmanager.js:1:18957
Begin getConnectServers connectionmanager.js:1:7877
Begin connectToServers, with 1 servers connectionmanager.js:1:19611
begin connectToServer connectionmanager.js:1:20160
tryReconnect: https://emby.adamharbach.com:8920 connectionmanager.js:1:10956
getTryConnectPromise https://emby.adamharbach.com:8920 connectionmanager.js:1:9713
ConnectionManager requesting url: https://emby.adamharbach.com:8920/emby/system/info/public connectionmanager.js:1:2483
fetchWithTimeout: timeoutMs: 20000, url: https://emby.adamharbach.com:8920/emby/system/info/public connectionmanager.js:1:1893
fetchWithTimeout: succeeded connecting to url: https://emby.adamharbach.com:8920/emby/system/info/public connectionmanager.js:1:2159
ConnectionManager response status: 200, url: https://emby.adamharbach.com:8920/emby/system/info/public connectionmanager.js:1:2601
Reconnect succeeded to https://emby.adamharbach.com:8920 connectionmanager.js:1:9916
ConnectionManager requesting url: https://emby.adamharbach.com:8920/emby/System/Info connectionmanager.js:1:2483
ConnectionManager response status: 200, url: https://emby.adamharbach.com:8920/emby/System/Info connectionmanager.js:1:2601
returning instance from getOrAddApiClient connectionmanager.js:1:16723
Setting server address to https://emby.adamharbach.com:8920 apiclient.js:1:18027
Requesting url without automatic networking: https://emby.adamharbach.com:8920/Sessions/Capabilities/Full apiclient.js:1:12682
calling apiClient.ensureWebSocket connectionmanager.js:1:5051
opening web socket with url: wss://emby.adamharbach.com:8920/socket?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&deviceId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx apiclient.js:1:16402
Requesting url without automatic networking: https://emby.adamharbach.com:8920/Users/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx apiclient.js:1:12682
returning instance from getOrAddApiClient connectionmanager.js:1:16723
Requesting url without automatic networking: https://emby.adamharbach.com:8920/DisplayPreferences/usersettings?userId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&client=emby apiclient.js:1:12682
resolving connectToServers with result.State: SignedIn connectionmanager.js:1:19881
appRouter - processing path request /web/index.html router.js:1:6188
appRouter - user is authenticated router.js:1:6709
appRouter - loading skin home page router.js:1:6897
appRouter - processing path request /web#!/home.html router.js:1:6188
appRouter - user is authenticated router.js:1:6709
appRouter - proceeding to /web#!/home.html router.js:1:7096
web socket connection opened apiclient.js:1:5247
Requesting url without automatic networking: https://emby.adamharbach.com:8920/Users/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Views apiclient.js:1:12682
Requesting url without automatic networking: https://emby.adamharbach.com:8920/Users/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Views apiclient.js:1:12682
validateFeature: livetv registrationservices.js:1:4939
Requesting url without automatic networking: https://emby.adamharbach.com:8920/LiveTv/Programs/Recommended?userId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&IsAiring=true&limit=1&ImageTypeLimit=1&EnableImageTypes=Primary%2CThumb%2CBackdrop&EnableTotalRecordCount=false&Fields=ChannelInfo%2CPrimaryImageAspectRatio apiclient.js:1:12682
Requesting url without automatic networking: https://emby.adamharbach.com:8920/System/Endpoint
Link to comment
Share on other sites

I just noticed something else. Remember I said I could still get in the Admin Dashboard? I tried removing and re-adding my TV Tuner, and that did nothing. Then I noticed the two tasks "Scan Media Library" and "Chapter Image Extraction" failed to run, and continue to fail when I try running them manually.

Link to comment
Share on other sites

I think my SQLite DB is corrupt. Almost every task in the log has this error:

Program data path: /var/lib/emby
	Application directory: /opt/emby-server/system
	Corrupt: database disk image is malformed
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.

Which would make sense after a hard drive issue. I'll look up sqlite commands. But if you know an easy fix, feel free to let me know.

Link to comment
Share on other sites

  • Solution

OK, so here goes.

 

Open up a command prompt, and run the following command to stop Emby, rename the working database as a  backup (which you probably won't need because it's probably corrupted, but for now just make a copy), and restart Emby. The backup will be named library.db.backuup_DATEHERE where DATEHERE is a date and time string (prevents overwriting of previous backups).

 

You will need an admin password to run this, as it uses sudo.

echo "service emby-server stop;mv /var/lib/emby/data/library.db{,.backup_$(date +"%m-%d-%Y_%H%M%S")};service emby-server start;" | sudo /bin/bash

Next, in the web interface, you'll need to rescan the entire library. Go to the server management dashboard, and go to Libraries. Click "Scan All Libraries".

 

I don't know if Live TV guide data is in the DB or not, but I refreshed that, too, for the heck of it. This isn't applicable if you have no tuners set up. Go to Live TV on the left menu and click "Refresh Guide Data".

 

After everything is running, you can delete the database backup that was created, as Emby is not using that copy anymore.

 

 

 

 

 

Now I'm going to make a script to make a periodic backup of that database. That way, if it corrupts again, I can restore the backup and only have to add media that was added since the backup. Also, would it make sense for Emby to do this on its own? Then, if it's corrupt, upon loading, ask if you want to restore the last offline copy of the database.

Edited by wiz722
Link to comment
Share on other sites

moradielle

Long story short, I had a drive which was part of the media library go offline last night, and I managed to get the RAID array functional again, but Emby no longer fully loads in the web interface or the apps. The system service is running successfully, but the web interface just starts to load then stays forever on the spinning loading circle. Xvideos Youporn Xhamster

 

An FSCK of the filesystem passes, but suddenly breaking a disk connection can obviously wreak havoc. While the filesystem itself is OK, the files that were open during the event might not necessarily be.

 

What should I do? My live TV recordings look accessible directly on the filesystem, so as long as I don't lose those, I can go as far as reinstalling the whole program.

Now I'm going to make a script to make a periodic backup of that database. That way, if it corrupts again, I can restore the backup and only have to add media that was added since the backup. Also, would it make sense for Emby to do this on its own? Then, if it's corrupt, upon loading, ask if you want to restore the last offline copy of the database.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...