Welcome to the forum, Guest

TOPIC: YACReaderLibraryServer in Raspberry Pi

YACReaderLibraryServer in Raspberry Pi 6 years 6 months ago #3370

JOCELYN

Offline

Fresh Boarder

Posts: 6

Karma: 0

Ok, thanks.
But it's not blocking. The library is functional at all.
May be some files it doesn't like...
The administrator has disabled public write access.

YACReaderLibraryServer in Raspberry Pi 6 years 6 months ago #3371

selmf

Offline

Developer

Posts: 631

Thank you received: 135

Karma: 18

Did a quick google search and it looks like it's the pdf backend complaining about bad pdf. Not our fault ;)
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

YACReaderLibraryServer in Raspberry Pi 6 years 5 months ago #3409

selmf

Offline

Developer

Posts: 631

Thank you received: 135

Karma: 18

Jocelyn (or anybody else interested): I'm currently working on a systemd service file for YACReaderLibraryServer so users don't have to mess with cronjobs anymore. It's already working on my Archlinux machine but it needs testing by actual users so that I can be sure it works as intended. So, if you could test it and give me some feedback that would be appreciated ;)
[Unit]
Description=YACReaderLibrary headless server
After=network.target

[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/YACReaderLibraryServer start

[Install]
WantedBy=multi-user.target

Instructions:
0. create a file named "yacreaderlibraryserver.service" and copy the text above into it
1. change the path used in ExecStart so it points to the location your headless server binary resides
2. copy the service file to ~/.local/share/systemd/user
3. enable the service file by running:
"systemclt --user enable yacreaderlibraryserver"
4. start the server by running:
"systemctl --user start yacreaderlibraryserver"
5. check the server status by running:
systemctl --user status yacreaderlibraryserver

The server will keep running till you tell systemd to stop it by running "systemctl --user stop yacreaderlibraryserver". In the event of a program crash systemd will reload the server. Feel free to test this by running "killall YACReaderLibraryServer". IMPORTANT!!! Never run YACReaderLibraryServer as root!!!
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
Last Edit: 6 years 5 months ago by selmf.
The administrator has disabled public write access.

YACReaderLibraryServer in Raspberry Pi 6 years 4 months ago #3458

dhernan3

Offline

Fresh Boarder

Posts: 10

Karma: 0

Hi, I'm using a RPi 3 with DietPi v158 (jessie based).

It has not ~/.local/share/systemd/user, so I put your .service in /etc/systemd/system

When launching YACReaderLibrary from cli or from crontab, it's launched from root user, so it uses ~/.local/share/YACReader/YACReaderLibrary/ for log and configuration .ini file

When launching with systemctl, it uses /.local/share/YACReader/YACReaderLibrary/ directly from / (root folder), so no library configured. After I have copied my original .ini to this new location, it works fine and I have again my library accesbible, but using service rather than crontab.
The administrator has disabled public write access.

YACReaderLibraryServer in Raspberry Pi 6 years 4 months ago #3461

selmf

Offline

Developer

Posts: 631

Thank you received: 135

Karma: 18

We strongly suggest *not* to run YACReaderLibraryServer as root. You gain literally nothing by doing so except a potential security risk. If ~/.local/share/systemd/user is missing you just can create it - systemd should be able to detect it.

Otherwise I'm happy to hear that this works for you :)
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

YACReaderLibraryServer in Raspberry Pi 6 years 2 months ago #3643

hmdrmch

Offline

Fresh Boarder

Posts: 4

Karma: 0

*** Nevermind, a reboot fixed the issue ***

When i try to run the command: "hg clone bitbucket.org/luisangelsm/yacreader ." i get the following error.
Any idea as to what could cause this?
I'm using a Raspberry Pi 3 running the latest Stretch.
** unknown exception encountered, please report by visiting
** mercurial-scm.org/wiki/BugTracker
** Python 2.7.13 (default, Nov 24 2017, 17:33:09) [GCC 6.3.0 20170516]
** Mercurial Distributed SCM (version 4.0)
** Extensions loaded:
Traceback (most recent call last):
File "/usr/bin/hg", line 45, in <module>
mercurial.dispatch.run()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 60, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 126, in dispatch
ret = _runcatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 247, in _runcatch
return callcatch(ui, _runcatchfunc)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 256, in callcatch
return func()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 236, in _runcatchfunc
return _dispatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 932, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 681, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 940, in _runcommand
return cmdfunc()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 929, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1039, in check
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 1559, in clone
shareopts=opts.get('shareopts'))
File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 447, in clone
srcpeer = peer(ui, peeropts, source)
File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 175, in peer
return _peerorrepo(rui, path, create).peer()
File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 152, in _peerorrepo
obj = _peerlookup(path).instance(ui, path, create)
File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 292, in instance
inst = httpspeer(ui, path)
File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 282, in __init__
if not url.has_https:
File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 152, in __getattribute__
self._load()
File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 100, in _load
mod = _hgextimport(_import, head, globals, locals, None, level)
File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 53, in _hgextimport
return importfunc(name, globals, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 155, in <module>
class httpconnection(keepalive.HTTPConnection):
File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 152, in __getattribute__
self._load()
File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 100, in _load
mod = _hgextimport(_import, head, globals, locals, None, level)
File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 53, in _hgextimport
return importfunc(name, globals, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/keepalive.py", line 366, in <module>
class HTTPResponse(httplib.HTTPResponse):
File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 152, in __getattribute__
self._load()
File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 100, in _load
mod = _hgextimport(_import, head, globals, locals, None, level)
File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 53, in _hgextimport
return importfunc(name, globals, *args, **kwargs)
ValueError: bad marshal data (unknown type code)
Last Edit: 6 years 2 months ago by hmdrmch.
The administrator has disabled public write access.

YACReaderLibraryServer in Raspberry Pi 6 years 1 month ago #3716

hmdrmch

Offline

Fresh Boarder

Posts: 4

Karma: 0

When i try to install YACReaderLibraryServer on a clean install on Raspberry Pi 3 using latest Stretch i get the following error when I get to the "make" command:

g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DSERVER_RELEASE -DNOMINMAX -DYACREADER_LIBRARY -DQT_NO_DEBUG_OUTPUT -DNO_OPENGL -DLIBDIR=\"/usr/lib\" -DDATADIR=\"/usr/share\" -DBINDIR=\"/usr/bin\" -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../YACReaderLibrary -I../common -I../YACReaderLibrary/server -I../YACReaderLibrary/db -I../YACReaderLibrary/server -I../YACReaderLibrary/server/lib/bfLogging -I../YACReaderLibrary/server/lib/bfHttpServer -I../YACReaderLibrary/server/lib/bfTemplateEngine -I../compressed_archive/unarr -I../QsLog -isystem /usr/include/poppler/qt5 -isystem /usr/include/poppler -isystem /usr/include/arm-linux-gnueabihf/qt5 -isystem /usr/include/arm-linux-gnueabihf/qt5/QtGui -isystem /usr/include/arm-linux-gnueabihf/qt5/QtSql -isystem /usr/include/arm-linux-gnueabihf/qt5/QtNetwork -isystem /usr/include/arm-linux-gnueabihf/qt5/QtCore -I. -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o library_creator.o ../YACReaderLibrary/library_creator.cpp
In file included from ../YACReaderLibrary/library_creator.cpp:15:0:
../compressed_archive/unarr/compressed_archive.h:7:19: fatal error: unarr.h: No such file or directory

^
compilation terminated.
Makefile:916: recipe for target 'library_creator.o' failed
make: *** [library_creator.o] Error 1

Any ideas how to get past this?
The administrator has disabled public write access.

YACReaderLibraryServer in Raspberry Pi 6 years 1 month ago #3719

selmf

Offline

Developer

Posts: 631

Thank you received: 135

Karma: 18

That looks like a problem with the decompression backend. Are you building unarr as embedded source or as a shared library?
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.

YACReaderLibraryServer in Raspberry Pi 6 years 1 month ago #3720

hmdrmch

Offline

Fresh Boarder

Posts: 4

Karma: 0

To be honest, i’m not quite sure.
I am simply following the guide from this site.
The administrator has disabled public write access.

YACReaderLibraryServer in Raspberry Pi 6 years 1 month ago #3722

selmf

Offline

Developer

Posts: 631

Thank you received: 135

Karma: 18

Ok I think I found the problem. The unarr detection for the embedded build is broken.

Open compressed_archive/unarr/unarr-wrapper.pri and replace this:
unix:!macx {
    !contains(QT_CONFIG, no-pkg-config):packagesExist(libunarr) {
      message(Using system provided unarr installation found by pkg-config.)
      CONFIG += link_pkgconfig
      PKGCONFIG += libunarr
      DEFINES += use_unarr
      }
    else:exists(/usr/include/unarr.h) {
      message(Using system provided unarr installation.)
      LIBS += -lunarr
      DEFINES += use_unarr
    }
  }

With this:
unix:!macx:!contains(QT_CONFIG, no-pkg-config):packagesExist(libunarr) {
    message(Using system provided unarr installation found by pkg-config.)
    CONFIG += link_pkgconfig
    PKGCONFIG += libunarr
    DEFINES += use_unarr
  }
else:unix:!macx:exists(/usr/include/unarr.h) {
    message(Using system provided unarr installation.)
    LIBS += -lunarr
    DEFINES += use_unarr
  }

Save it, run "make distclean" to clean the old build files and restart the build at the point where you run qmake. If everything went right qmake should display a message that it found unarr.
My answers are not necessarily official YACReader statements but mostly represent my own opinion in technical matters.
The administrator has disabled public write access.
Powered by Kunena Forum