0

Admin Screen inaccessible on Ubuntu 18.04

BradleyDS2 1 week ago 0

Hi, I'm running Ubooquity Server 2.1.1 on Ubuntu 18.04.


I ran into a couple of issues early on, one was that Ubooquity saves everything where it's executed from, rather than where the jar is located. What I mean by that is that if you have ubooquity.jar in /home/<username>/software/ubooquity then open a terminal and run java -jar /home/<username>/software/ubooquity it'll store all the ubooquity files in the default directory that the terminal was running from.


Normally that wouldn't be an issue, but any attempts to run Ubooquity without sudo privileges caused the application to open, but the web server wouldn't start and clicking any buttons except close caused it to crash without giving a reason as to why (even if run from terminal).


My solution to these two problems was to add "@reboot cd /home/<username>/Software/Ubooquity && /usr/bin/java -jar '/home/<username>/Software/Ubooquity/Ubooquity.jar'" to startup with crontab -e


Not an elegant solution, but a solution nonetheless.




While running Ubooquity as sudo, it successfully prints error messages and doesn't crash when clicking buttons.


Here's what appears when I click the Library button:


20180708 18:17:04 [JavaFX Application Thread] ERROR com.ubooquity.f.g - Could not open URL in browser (http://localhost:2202/)
java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform!
    at java.awt.Desktop.checkActionSupport(Desktop.java:225) ~[na:1.8.0_171]
    at java.awt.Desktop.browse(Desktop.java:381) ~[na:1.8.0_171]
    at com.ubooquity.f.g.a(SourceFile:71) ~[Ubooquity.jar:2.1.1]
    at com.ubooquity.guifx.c.openLibrary(SourceFile:107) [Ubooquity.jar:2.1.1]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) [na:1.8.0_171]
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) [na:1.8.0_171]
    at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1771) [jfxrt.jar:na]
    at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657) [jfxrt.jar:na]
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) [jfxrt.jar:na]
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) [jfxrt.jar:na]
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) [jfxrt.jar:na]
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) [jfxrt.jar:na]
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) [jfxrt.jar:na]
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) [jfxrt.jar:na]
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) [jfxrt.jar:na]
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) [jfxrt.jar:na]
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) [jfxrt.jar:na]
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) [jfxrt.jar:na]
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) [jfxrt.jar:na]
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) [jfxrt.jar:na]
    at javafx.event.Event.fireEvent(Event.java:198) [jfxrt.jar:na]
    at javafx.scene.Node.fireEvent(Node.java:8413) [jfxrt.jar:na]
    at javafx.scene.control.Button.fire(Button.java:185) [jfxrt.jar:na]
    at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182) [jfxrt.jar:na]
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96) [jfxrt.jar:na]
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89) [jfxrt.jar:na]
    at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218) [jfxrt.jar:na]
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) [jfxrt.jar:na]
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) [jfxrt.jar:na]
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) [jfxrt.jar:na]
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) [jfxrt.jar:na]
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) [jfxrt.jar:na]
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) [jfxrt.jar:na]
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) [jfxrt.jar:na]
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) [jfxrt.jar:na]
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) [jfxrt.jar:na]
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) [jfxrt.jar:na]
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) [jfxrt.jar:na]
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) [jfxrt.jar:na]
    at javafx.event.Event.fireEvent(Event.java:198) [jfxrt.jar:na]
    at javafx.scene.Scene$MouseHandler.process(Scene.java:3757) [jfxrt.jar:na]
    at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485) [jfxrt.jar:na]
    at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762) [jfxrt.jar:na]
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494) [jfxrt.jar:na]
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:394) [jfxrt.jar:na]
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295) [jfxrt.jar:na]
    at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_171]
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:432) [jfxrt.jar:na]
    at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389) ~[jfxrt.jar:na]
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:431) [jfxrt.jar:na]
    at com.sun.glass.ui.View.handleMouseEvent(View.java:555) ~[jfxrt.jar:na]
    at com.sun.glass.ui.View.notifyMouse(View.java:937) ~[jfxrt.jar:na]
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) ~[jfxrt.jar:na]
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$48(GtkApplication.java:139) ~[jfxrt.jar:na]
    at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_171]

Unrelated, but I just noticed I can't paste that directly into the code box or nothing pastes, so I had to add it in between the code tag by editing the raw HTML. I'm running Waterfox, not sure if it's a browser specific issue or not or it's due to how much text I was pasting. I also can't click past it and press enter without editing the html directly if the code box is the last thing typed.



Anyway, as you can see, the method for opening the library isn't Ubuntu (or linux?) compatible. Instead of continuing on, you need to run as sudo or this causes it to crash.



Of course, opening localhost:2202 directly works without any issues if you're running Ubooquity as sudo, not as a regular user though but that might be due to me not assigning it a port to use as a regular user or something like that, although automating that process for linux users would be awesome ;)




The main issue though, is that the admin page doesn't open. I've tried opening it with localhost:2203, <myip>:2203 and everything else I can think of, but I get the following:


HTTP ERROR 500
Problem accessing /. Reason:
    Could not find matching provider (wrong URL)
Powered by Jetty:// 9.4.0v20161208 

As you can probably tell, all of the other issues, while annoying can be worked around, but I can't work around the admin page not displaying.




Thank you for such a fantastic program, I've used it on Windows for many months and while the interface would sometimes freeze and the tray icon would turn partially transparent, the program itself always ran flawlessly and would serve up my ebooks without any problems, and even now continues to do so. I had to copy and edit my Windows configuration to get it working in Ubuntu since I can't access the admin page, and it's currently working, but access to the admin page is obviously vital.