+2
Answered

Books and comics not showing up when activating security login

Fredrik Gillinger 3 years ago • updated by AsaTyr 1 year ago 38

I have my ubooquity server up and running on a Qnap and it works like a charm until i try to aktivate security login. As soon as i do that and login to the server the comics and books doesnt show anymore . anyone know what i need to do?

Under review

Did you create a user and explicitly allowed this user to access the directories you shared ?

Yes , i created a user in security with name and password. then i ticked the box "Protect shared content with user accounts" after that the server is locked nad i have to login wich is great but the it wont list any of my books or comics. if i disable the security it all comes back.

In the comics and books configuration section, for each directory you share, you have to specify which user is authorized to access it.


If I understand correctly what you did, you created the user but did not authorize any directory for him to see. Hence the empty page.

Any error or warning in the logs ?


There is a "log" directory in your Ubooquity working directory.

You can also use the "view logs" links in the General settings section (although you will only see the latest lines).

Ok what kind off error do i look after?


Theese are the ones showing up:

20160222 14:55:01 [Scanner thread] ERROR com.ubooquity.Ubooquity - Uncaught exception on thread: Scanner thread
java.lang.OutOfMemoryError: Java heap space


WARN com.ubooquity.data.database.a - Could not find id of root path /share/book (ignore this warning if you just added a new root directory)



0160224 12:15:53 [pool-1-thread-13] INFO com.ubooquity.c - User successfuly logged in. [login:Gillinger][ip:212.247.164.206]

The OutOfMemory error is a serious problem as it might affect almost any part of the application.

However I don't know if this is the cause of your problem.


To address it, you can try to allocate more memory to Ubooquity:

http://vaemendis.net/ubooquity/doc/faq.html#i-have-java-lang-outofmemoryerror-java-heap-space-messages-in-the-logs


The warning is expected when Ubooquity discovers a new directory.



My instance is also failing to show content with security features enabled. I create a user with a password, enable protection, then add the user to the ebook/comics module. When logging in, no books or comics show up. When I disable security everything returns to normal.


There's nothing interesting in the logs but here is what is printing after I adjust the settings. First I turn off security to view my full library, then I turn on security and view my empty library:



20160307 14:19:28 [pool-1-thread-12] INFO com.ubooquity.provider.webadmin.j - Admin successfuly logged in
20160307 14:24:31 [pool-1-thread-12] INFO com.ubooquity.provider.webadmin.j - Applying preferences modifications and restarting server (from webadmin)
20160307 14:24:31 [pool-1-thread-12] INFO com.ubooquity.c - Stopping internal server...
20160307 14:24:31 [pool-1-thread-12] INFO com.ubooquity.data.feeder.a - Aborting content scan...
20160307 14:24:31 [pool-1-thread-12] INFO com.ubooquity.data.feeder.a - Waiting for scanner thread to stop
20160307 14:24:31 [pool-1-thread-12] INFO com.ubooquity.data.feeder.a - Scanner thread stopped
20160307 14:24:31 [pool-1-thread-12] INFO com.ubooquity.c - Internal server stopped
20160307 14:24:31 [pool-1-thread-12] INFO com.ubooquity.Ubooquity - Saving preferences
20160307 14:24:31 [pool-1-thread-12] INFO com.ubooquity.c - Starting internal server...
20160307 14:24:31 [Scanner thread] INFO com.ubooquity.data.feeder.a - Scanning books directories
20160307 14:24:31 [pool-1-thread-12] INFO com.ubooquity.c - Reverse proxy prefix is not activated
20160307 14:24:31 [Scanner thread] WARN com.ubooquity.data.database.a - Could not find id of root path /Drobo/ebooks (ignore this warning if you just added a new root directory)
20160307 14:24:31 [Scanner thread] WARN com.ubooquity.data.database.a - Could not find id of root path /Drobo/ebooks (ignore this warning if you just added a new root directory)
20160307 14:24:31 [Scanner thread] INFO com.ubooquity.data.feeder.a - Finished scanning books directories, populating folders content cache
20160307 14:24:31 [pool-1-thread-12] INFO com.ubooquity.c - Internal server started. Listening on port 2202
20160307 14:24:31 [Scanner thread] INFO com.ubooquity.data.feeder.a - Books folder content cache populated
20160307 14:24:31 [Scanner thread] INFO com.ubooquity.data.feeder.a - Scanning comics directories
20160307 14:24:31 [Scanner thread] WARN com.ubooquity.data.database.b - Could not find id of root path /Drobo/comics (ignore this warning if you just added a new root directory)
20160307 14:24:31 [Scanner thread] WARN com.ubooquity.data.database.b - Could not find id of root path /Drobo/comics (ignore this warning if you just added a new root directory)
20160307 14:24:31 [Scanner thread] INFO com.ubooquity.data.feeder.a - Finished scanning comics directories, populating folders content cache
20160307 14:24:32 [Scanner thread] INFO com.ubooquity.data.feeder.a - Comics folder content cache populated
20160307 14:24:32 [Scanner thread] INFO com.ubooquity.data.feeder.a - Comics statistics: [total: 676, added or updated: 0, removed: 0]
20160307 14:24:32 [Scanner thread] INFO com.ubooquity.data.feeder.a - Books statistics: [total: 8, added or updated: 0, removed: 0]
20160307 14:25:10 [pool-1-thread-9] INFO com.ubooquity.provider.webadmin.j - Applying preferences modifications and restarting server (from webadmin)
20160307 14:25:10 [pool-1-thread-9] INFO com.ubooquity.c - Stopping internal server...
20160307 14:25:10 [pool-1-thread-9] INFO com.ubooquity.data.feeder.a - Aborting content scan...
20160307 14:25:10 [pool-1-thread-9] INFO com.ubooquity.data.feeder.a - Waiting for scanner thread to stop
20160307 14:25:10 [pool-1-thread-9] INFO com.ubooquity.data.feeder.a - Scanner thread stopped
20160307 14:25:10 [pool-1-thread-9] INFO com.ubooquity.c - Internal server stopped
20160307 14:25:10 [pool-1-thread-9] INFO com.ubooquity.Ubooquity - Saving preferences
20160307 14:25:10 [pool-1-thread-9] INFO com.ubooquity.c - Starting internal server...
20160307 14:25:10 [Scanner thread] INFO com.ubooquity.data.feeder.a - Scanning books directories
20160307 14:25:10 [Scanner thread] WARN com.ubooquity.data.database.a - Could not find id of root path /Drobo/ebooks (ignore this warning if you just added a new root directory)
20160307 14:25:10 [pool-1-thread-9] INFO com.ubooquity.c - Reverse proxy prefix is not activated
20160307 14:25:10 [pool-1-thread-9] INFO com.ubooquity.c - Internal server started. Listening on port 2202
20160307 14:25:10 [Scanner thread] WARN com.ubooquity.data.database.a - Could not find id of root path /Drobo/ebooks (ignore this warning if you just added a new root directory)
20160307 14:25:10 [Scanner thread] INFO com.ubooquity.data.feeder.a - Finished scanning books directories, populating folders content cache
20160307 14:25:11 [Scanner thread] INFO com.ubooquity.data.feeder.a - Books folder content cache populated
20160307 14:25:11 [Scanner thread] INFO com.ubooquity.data.feeder.a - Scanning comics directories
20160307 14:25:11 [Scanner thread] WARN com.ubooquity.data.database.b - Could not find id of root path /Drobo/comics (ignore this warning if you just added a new root directory)
20160307 14:25:11 [Scanner thread] WARN com.ubooquity.data.database.b - Could not find id of root path /Drobo/comics (ignore this warning if you just added a new root directory)
20160307 14:25:11 [Scanner thread] INFO com.ubooquity.data.feeder.a - Finished scanning comics directories, populating folders content cache
20160307 14:25:12 [Scanner thread] INFO com.ubooquity.data.feeder.a - Comics folder content cache populated
20160307 14:25:12 [Scanner thread] INFO com.ubooquity.data.feeder.a - Comics statistics: [total: 676, added or updated: 0, removed: 0]
20160307 14:25:12 [Scanner thread] INFO com.ubooquity.data.feeder.a - Books statistics: [total: 8, added or updated: 0, removed: 0]


Yes, logs are quite normal.

I'll try to build a special version with extra debugging info to track the problem.


Before I do that, could you confirm that you are using version 1.9.1 ?

yep, Version 1.9.1 built on 2016-02-21 at 10:09

I thought a bit more about it and found it hard to add meaningful debugging information as the security mechanism involves database queries and thus might depend on what is inside your database.


Would it possible for you to send me:

  • your database file (ubooquity-4.h2.db in your working directory)
  • your settings file (preferences.xml in your working directory)
  • the password of a user for which you have the problem

Ideally on a small collection, so that the database is small enough to be sent by email.

And with a dummy password.


My address: tom at vaemendis dot net.

(putting everything in a zip file stored somewhere on the web will do too)

Running into this same issue, found the thread via google. Same version.


Loving the app aside from that, nice to see development is responsive/active.

I really want to fix this problem but I have not been able to reproduce it on my side and I have still no idea of the cause.That's why I need database and preferences files from an installation that has the issue. (see my answer to Adam, just above your message)


If you can send me these two files (the password is not necessary), I'll be happy to investigate and hopefully fix it in the next release.

I had the same issue on an instance installed on QNAP NAS. Found the solution while googling on this issue: you have to specify the real path to the directory, not the one that has symlinks.

e.g. instead of specifying /share/eBooks you'll have to specify /share/MD0_DATA/eBooks (this is system specific, so adjust it as needed). Restart the ubooquity server process and you're done.


BTW, thanks for the great app.

Thanks for your feedback !

This means a lot of people are probably using symlinks without being aware of it.

It would explain all the problems mentioned in this thread.


I was looking in the wrong direction, now I "just" have to add symlink support.

Thanks again !



Attilla where can i find that path in my Qnap nas?

Version 1.10.0 did not solve the problem in your case ?

I dont know how to install the update on the Qnap nas :) when trying to manually install the Jar container i get an error :(

I'm still using 1.9.1, did not try the 1.10.0.

If you log in to the QNAP NAS as admin (e.g. via ssh) you may check the path by entering to the directory where your eBooks are and do a 'df -k .'. The last column will show you where it's mounted, something like:


[/share/Multimedia/eBooks] # df -k .

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/md0 1921316624 1315122544 605669792 68% /share/MD0_DATA
[/share/Multimedia/eBooks] #

Traversing this path to your eBook directory will give you the path to be used in ubooquity, in my case:

/share/MD0_DATA/Multimedia/eBooks


Hope this helped.

Symbolic links problem fixed. See release notes.

Do you know how to install the update on a QNap nas?

I'd replace the jar file only. I'm invoking it with 'nohup java -jar Ubooquity.jar -port 2202 -webadmin &' from a shell script ran by cron


I'd advise the same procedure.

But I don't know a thing about how QNAP Nas work.


Do you have some siort of tutorial? i suck at this lol. The "appstore" in Qnap doesnt manage to install it so im guessing its a Script thingy?

You have to download it from http://vaemendis.net/ubooquity/static2/download and also have to have Java 8 and nohup available. If running on QNAP you may also use the Linux script provided on the same page (you might need to adapt it a little bit).

Latest version 1.10.1, symlink still not fixed. If i put the full path it works

Well that's disappointing. I'll do some test again on my side, but not in a near future as there is workaround.


Just to be sure: did you test by re-entering the symlink in the configuration screen ? They are converted when you save them, so just replacing the Ubooquity jar with the new version won't work, you have to reconfigure the paths.

I had the same issue and I tried from scratch by removing all the folders.


I can see the folders but i got an error message "directory not found or user has no right" (smthing like that) when i try to access them. and when i go to the "last comics" section I can see the comics but i can't open them i got in infinite spinner when i try to open the popup. I checked all permissions and it's allright from my side.

+1

Perhaps a side effect of my attempt to manage symbolic links.

Since there is an easy workaround, perhaps I should remove the "feature" altogether.

good day. i checked my logs and got this:

20170906 16:48:58 [Scanner thread] WARN  com.ubooquity.data.database.c - Could not find id of root path /share/comic/comic (ignore this warning if you just added a new root directory)
20170906 16:48:58 [Scanner thread] WARN  com.ubooquity.data.database.c - Could not find id of root path /share/comic/NormalComics (ignore this warning if you just added a new root directory)
20170906 16:48:59 [Scanner thread] WARN  com.ubooquity.data.database.c - Could not find id of root path /share/comic/comic (ignore this warning if you just added a new root directory)
20170906 16:48:59 [Scanner thread] WARN  com.ubooquity.data.database.c - Could not find id of root path /share/comic/NormalComics (ignore this warning if you just added a new root directory)
20170906 16:49:01 [qtp1526970878-966] ERROR com.ubooquity.provider.comic.b - Comic entry not found or user not authorized


got the latest version

Hi AsaTyr,


typically the (QNAP-) symbolic link bug 

(with resolution found under : http://ubooquity.userecho.com/topics/567-version-21-on-qnap-not-reachable/ ) : 


The wrong and correct/working Path to your collections : 

wrong                   /share/comic(it's a symlink generated by qnap itself)

correct/working    /share/CACHEDEV_XX/comic or 

                             /share/MD0_DATA/comic 
                            this is the "absolute" path on my system, yours may differ, and the above path is the symlink target


I'vo got the same "problem/bug" on my TS453mini as you, but after changing the path settings to absolute paths & 

rescan the entire database (incl deleting the "old/wrong" informations before the new scan!) all works fine  ..


in my humble opinion the java runtime cannot use or do a bad job on symlinks, but most time using absolute paths is functional much safer than symlinks ..


best regards from munich !


TierparkToni


Hey Anton,

i tried your solution. but its not working. once i edited the files with the correct "absolute" link and restarted the server it reverted to the symlink.


any ideas?

Hey AsaTyr,


"Fall back" settings are absolut not usually for Ubooquity - if the settings correct and accessible (for the Java Runtime). 

So here my in my mind only meaningful question : you edit the files >directly< or just via the ubooquity admin console ? 

Direct editing often go directly wrong or supplies just more trouble -> i'm always use the regular admin console  "http://YOURQNAP-IP:2203/admin".


If you use the admin console, perhaps the config files are meantime write-protected because of become insufficient 

user rights happening by direct editing as user admin/root (java has a significant less rights compare to root) ?

You can start over with an complete empty ubooquity directory exept the Ubooquity.jar file to be sure not loosing any access rights on your config/database files ... 


i'm testet it here with my installation and write protected config files and/or write protected database, and my system "operate" like your problem with serious unexpectable trouble .


hope that helps ! 


TierparkToni 

(not being @ Oktoberfest here in Munich tonight because of too cloudy/rainy weather ...)

hey there, got the solution.

i stopped the server and then directly edited the files. this keept them maintained.

after i restarted it its launched a clean search for my books. and evolá it works ^^


thanks a lot for the help! =)