2024-05-30 Later...
Yeah, it's beyond me to figure this out tonight.
The #Transmissions thing is kinda like a made-up language, that only I understand, and have difficulty explaining to me a day later.
But this was the point of me doing the whole #Postcraft thing, so I could organise stuff like this.
Something that worked perfectly, the output dirs were easy to shift around. But the permalinks are still totally broken. Can't remember where the hell that's done. Enough for today.
I just remembered a Kaggle challenge was on my todo list. On finding an Israeli 'talk to the animals' challenge in the Guardian.
Ok, one last easy thing tonight - Fuseki on the server should be satisfying.
The auth will take a load more work, but that's not actually needed right now.
Their docs aren't great. I've done this several times before, it was never difficult before...
Ok, I got apache-jena-fuseki-5.0.0.tar.gz
Oh yeah - it needs a Java runtime.
NOTE TO JENA TEAM : ELI5
an AI tells me:
sudo apt install openjdk-lts
E: Unable to locate package openjdk-lts
dick AI.
A quick google later, best instructions I can find seem to be at https://www.linode.com/docs/guides/how-to-install-openjdk-ubuntu-22-04/
the folks who are hosting this thing, ok!
Not very helpful on which version to choose.
apt-cache search openjdk
Search the Jena site - no useful response.
I guess go for one less than the highest number.
I like the number 21. Has stable 3 and squewiff 7 in there.
I don't think I'll need the full JDK. So:
apt-get install openjdk-21-jre
I know what's coming next. Environment variables. Bound to arrive.
Hang on,
root@hyperdata:/home/services/fuseki/apache-jena-fuseki-5.0.0# ./fuseki start
that looked rather promising.
lynx http://localhost:3030/
We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.
Oh yeah.
It appears to be running as a daemon - haven't a clue how.
ok, proxy nginx to it.
Grrr. Where are those config files. Under /etc/nginx. Ok.
I have a fuseki.conf there, must have planned ahead. Has https://fuseki.hyperdata.it pointing to port 3331.
Ok, I must have decided which ports to use earlier. Where's Fuseki's config?
Ok. I've no idea how that started as a daemon, but in the root dir of the Fuseki install there's a fuseki.service. I'll have you.
cp fuseki.service /etc/systemd/system/
killall java
nano /etc/systemd/system/fuseki.service
Ok, semi-understandable for me.
Place this file under /etc/systemd/system/
Create a system user called "fuseki" and make sure it has permission to access the Fuseki configuration and databases
Adjust the paths and other settings below if necessary
Activate using: sudo systemctl enable fuseki.service
Hmm. Where are the config & databases. This might be one for AI
sudo useradd -m -s /bin/bash fuseki
sudo passwd fuseki
Looks legit. (When did I ever use a shell other than bash? Ok, that once with the fish thing.)
root@hyperdata:/home/services/fuseki/apache-jena-fuseki-5.0.0# ls
bin fuseki fuseki-backup fuseki-server fuseki-server.bat fuseki-server.jar fuseki.service LICENSE log4j2.properties NOTICE README run webapp
root@hyperdata:/home/services/fuseki/apache-jena-fuseki-5.0.0# cd ..
root@hyperdata:/home/services/fuseki# cd ..
root@hyperdata:/home/services# mv fuseki fuseki_
root@hyperdata:/home/services# mv fuseki_/apache-jena-fuseki-5.0.0 ./fuseki
root@hyperdata:/home/services# rmdir fuseki:_
rmdir: failed to remove 'fuseki:_': No such file or directory
root@hyperdata:/home/services# rmdir fuseki_
rmdir: failed to remove 'fuseki_': Directory not empty
root@hyperdata:/home/services# cd fuseki_
root@hyperdata:/home/services/fuseki_# ls
apache-jena-fuseki-5.0.0.tar.gz
root@hyperdata:/home/services/fuseki_# rm apache-jena-fuseki-5.0.0.tar.gz
root@hyperdata:/home/services/fuseki_# cd ..
root@hyperdata:/home/services# rm fuseki_
rm: cannot remove 'fuseki_': Is a directory
IT'S GONE MIDNIGHT, BE QUIET
root@hyperdata:/home/services# rmdir fuseki_
Ok, so these in fuseki.service:
Environment=FUSEKI_HOME=/home/services/fuseki
Environment=FUSEKI_BASE=/home/services/fuseki
# Edit the line below to adjust the amount of memory allocated to Fuseki
Environment=JVM_ARGS=-Xmx1G # I don't think this virtual server has 4 as was. Safe sidery, call it 1.
ExecStart=/home/services/fuseki/fuseki-server
That might be right. But it will still be useless unless I change the port.
Hmm. No idea where that's set. So I'll ask AI (which will probably suggest a --port option, because it'll know that's the way AndyS likes to do things).
By default, Fuseki listens on port 3030. To change the port number, you can modify the fuseki.properties file.
Here are the steps to change the port number:
Locate the fuseki.properties file:
sudo find / -name fuseki.properties
Ok as far as 3030. The rest, in Aussie parlance, you're shittin me. It probably is that flag. I'll try it in the service file.
ExecStart=/home/services/fuseki/fuseki-server --port=3331
root@hyperdata:/home/services/fuseki# systemctl enable fuseki
Created symlink /etc/systemd/system/multi-user.target.wants/fuseki.service → /etc/systemd/system/fuseki.service.
root@hyperdata:/home/services/fuseki# systemctl start fuseki
root@hyperdata:/home/services/fuseki# systemctl status fuseki
...
May 30 22:21:46 hyperdata.it systemd[1]: /etc/systemd/system/fuseki.service:38: Invalid environment assignment, ignoring: #
May 30 22:21:46 hyperdata.it systemd[1]: /etc/systemd/system/fuseki.service:38: Invalid environment assignment, ignoring: Hmm.
Hee hee.
Oh, that I wasn't expecting:
HTTP ERROR 503 Service Unavailable
URI: http://fuseki.hyperdata.it/
STATUS: 503
MESSAGE: Service Unavailable
hang on, it should be on https...
Nope, it still says http, 503. I'm not expecting much, but to see what's going on:
lynx http://localhost:3331/
Same 503. Who's giving me that message, Fuseki or Nginx?
Ah wait, looking up I see :
May 30 22:21:15 hyperdata.it fuseki-server[551211]: 22:21:15 INFO Server :: Started 2024/05/30 22:21:15 UTC on port 3331
Oh bloody hell, it isn't nginx because that's bouncing off 3331.
Logs?
Nah, first, anything in fuseki.service? Get rid of those syntaxy warnings at least.
I've reverted this back to the original:
Environment=JVM_ARGS=-Xmx4G
I can't imagine I changed that last time I installed this thing. Swap should look after, no?
Sod it, call it a day.
Night Fuseki!