Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Fix FITS web service logging. #8

Merged
merged 5 commits into from
Nov 9, 2020

Conversation

ruebot
Copy link
Contributor

@ruebot ruebot commented Nov 4, 2020

GitHub Issue: Islandora/documentation#460

  • Other Relevant Links (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

What does this Pull Request do?

How should this be tested?

  • Add fork and branch to Playbook build
  • Verify /var/log/tomcat8/fits-service.log exists, and there is no longer there error described here

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora-Devops/committers

- Add log4j.properties.j2
- Add task to move template into place
- Set default variable
- Fix comment
- Resolves Islandora/documentation#460
- Resolves yorkulibraries/yudl-playbook#13
@seth-shaw-unlv
Copy link

This worked perfectly on ubuntu. However, centos/7 doesn't built correctly.

There is no /var/log/tomcat8/ directory. The fits-service.log shows up in /opt/tomcat/logs/ and has a few messages:

[vagrant@islandora8 ~]$ sudo tail -f /opt/tomcat/logs/fits-service.log
2020-11-05 05:00:00 -  INFO - FitsServlet:92 - fits.home: null
2020-11-05 05:00:00 - FATAL - FitsServlet:95 - fits.home system property HAS NOT BEEN SET!!! This web application will not properly run.

No more messages appear in this file as I ran some files through the fits service although we do get a message in /var/log/islandora/fits.log that the FITS microservice returned successfully and, indeed, the fits media does appear as it should.

So.... 🤷‍♂️. Perhaps we just need some Debian/Centos variables set?

@ruebot
Copy link
Contributor Author

ruebot commented Nov 5, 2020

Ah, right. I forgot about that. I'll get an update in.

defaults/main.yml Outdated Show resolved Hide resolved
@seth-shaw-unlv
Copy link

I'll spin these up again and see how it goes. I will probably get one tested this afternoon but the second will probably be tonight.

@ruebot
Copy link
Contributor Author

ruebot commented Nov 5, 2020

Cool. Thanks @seth-shaw-unlv!

@seth-shaw-unlv
Copy link

seth-shaw-unlv commented Nov 6, 2020

@ruebot , huh... it looks like we aren't actually using those var files....

Add these lines to your main task config:

# Include OS specific variables
- name: include OS specific variables
  include_vars: "vars/{{ ansible_os_family }}.yml"

@seth-shaw-unlv
Copy link

Looks good. Testing now.

@seth-shaw-unlv
Copy link

CentOS checks out, although it looks like we could adjust some more settings (a future ticket):

2020-11-06 18:21:52 -  WARN - FileSystemFontProvider:481 - New fonts found, font cache will be re-built
2020-11-06 18:21:52 -  WARN - FileSystemFontProvider:233 - Building on-disk font cache, this may take a while
2020-11-06 18:21:53 -  WARN - FileSystemFontProvider:359 - Could not write to font cache
java.io.FileNotFoundException: /home/tomcat8/.pdfbox.cache (No such file or directory)

I'll destroy and try ubuntu now.

@seth-shaw-unlv
Copy link

seth-shaw-unlv commented Nov 6, 2020

Ubuntu is no longer happy. I had to remove these two lines to get the build to finish. Edit: I needed to remove the lines indicated AND vagrant destroy before doing my vagrant up to make it work; the failed build mucked things up so I needed to start fresh.

@ruebot
Copy link
Contributor Author

ruebot commented Nov 7, 2020

Oh, I changed those in other branch because I was having problems. I'll push those changes over here, and it should resolve it.

@ruebot
Copy link
Contributor Author

ruebot commented Nov 7, 2020

should be good to go now.

root@islandora8:/var/log/tomcat8# tail -f fits-service.log 
2020-11-07 15:39:43 -  INFO - FitsServlet:162 - Created upload base directory: /var/lib/tomcat8/webapps/fits/upload
2020-11-07 15:40:03 -  INFO - arjuna:138 - ARJUNA012170: TransactionStatusManager started on port 46753 and host 127.0.0.1 with service com.arjuna.ats.arjuna.recovery.ActionStatusService
2020-11-07 15:40:46 -  INFO - BigdataRDFServletContextListener:155 - 
2020-11-07 15:40:46 -  WARN - Banner:264 - Defaulting log level to WARN: com.bigdata
2020-11-07 15:40:46 -  INFO - SystemUtil:90 - architecture: amd64
2020-11-07 15:40:46 -  INFO - SystemUtil:91 - operating system: Linux
2020-11-07 15:40:46 -  INFO - SystemUtil:92 - operation system version: 4.15.0-122-generic
2020-11-07 15:40:46 -  INFO - SystemUtil:93 - #processors: 1
2020-11-07 15:40:46 -  INFO - SystemUtil:94 - cpu info: Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz Family 6 Model 166 Stepping 0, GenuineIntel
2020-11-07 15:40:47 -  WARN - ServiceProviderHook:171 - Running.
2020-11-07 15:51:55 -  INFO - FitsWrapper:36 - FITS HOME: /opt/fits
2020-11-07 15:51:55 -  INFO - Fits:193 - Logging initialized with: file:/var/lib/tomcat8/webapps/fits/WEB-INF/classes/log4j.properties
2020-11-07 15:52:05 -  INFO - SLF4JLogger:60 - NLNZ Logging -- 531661324538.jpg is not a bitmap file
2020-11-07 15:52:05 -  INFO - SLF4JLogger:60 - NLNZ Logging -- 531661324538.jpg is not a FLAC file
2020-11-07 15:52:05 -  INFO - SLF4JLogger:60 - NLNZ Logging -- Adapter nz.govt.natlib.adapter.jpg.JpgAdapter has been chosen to adapt 531661324538.jpg

Screenshot_2020-11-07 Media Islandora 8

@seth-shaw-unlv
Copy link

I'll spin this up now.

@seth-shaw-unlv seth-shaw-unlv merged commit ed0e88b into islandora-deprecated:main Nov 9, 2020
@ruebot ruebot deleted the issue-460 branch November 9, 2020 17:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fits service log written to incorrect location
2 participants