After 1.8.3 upgrade, database messages in catalina.out and Plugin Settings doesn't load

214 views
Skip to first unread message

Martin Boswell

unread,
Nov 1, 2021, 5:01:43 PM11/1/21
to xnat_discussion
XNAT community,   

I've just upgraded my XNAT installation from 1.7.6 to 1.8.3 build 5 (including Tomcat 9.0.54, Postgres 12.8 and pipeline engine 1.8.3), and with the following exceptions everything appears to have gone well.  I can login, browse data, run pipelines, etc.  But there are two issues (which may be related?):  

1. The page Administer > Plugin Settings loads, and shows "Template Names" and "Template Types" fields, but doesn't show any plugins, just "Loading..."
2. There are several database messages in the catalina.out log that are concerning.  

The catalina.out log always ends like this:  

...removed...
SOURCE: /pool/xnatprod/xnat/data/catalina/webapps/ROOT/
===========================
Database out of date... updating
SELECT dependencies_save_and_drop('xnat_imagescandata');
SELECT dependencies_restore('xnat_imagescandata');
===========================
01-Nov-2021 07:43:32.027 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/pool/xnatprod/xnat/data/catalina/webapps/ROOT.war] has finished in [46,046] ms
01-Nov-2021 07:43:32.030 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
01-Nov-2021 07:43:32.041 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [46204] milliseconds

In a recent group archive thread for a problem with some similarities, Rick suggested checking for changes in the database definition for "xnat_imagescandata", so I compared the definition while running (tomcat9), after shutting down, and after starting back up again, and the definition does not change (it's pasted below).  

There is a set of lines in the xdat.log file after every Tomcat9 start, and that's also pasted below.  The xnat_imagescandata dependencies were also of interest in the other thread, so I've pasted them below as well, in case they're helpful.

Does anyone have suggestions on how I can fix the Plugin Settings page?  

Do I need to be concerned about these database messages in catalina.out?  

Thanks for any advice.  

- Martin

-----------------------------------------------------------
xdat.log entries:  
2021-11-01 13:02:21,980 [main] ERROR org.nrg.xdat.servlet.XDATServlet - Preparing create SQL and got 17 optional SQL statements. Please review this optional SQL and consider executing it if required:

Optional SQL:


--Database column xnat_imagescandata.note type mis-match ('TEXT'!='varchar').

----Unable to resolve type mis-match for the following reason(s).

----Please review these factors before uncommenting this code.

----1 row(s) contain values.

----Fix xnat_imagescandata_history table.

--ALTER TABLE xnat_imagescandata_history ADD COLUMN note_cp varchar;

--UPDATE xnat_imagescandata_history SET note_cp=note;

--ALTER TABLE xnat_imagescandata_history DROP COLUMN note;

--ALTER TABLE xnat_imagescandata_history ADD COLUMN note TEXT;

--UPDATE xnat_imagescandata_history SET note=CAST(note_cp AS TEXT);

--CREATE OR REPLACE FUNCTION after_update_xnat_imagescandata()  RETURNS TRIGGER AS '    begin        RETURN NULL;     end; '   LANGUAGE 'plpgsql' VOLATILE;

----Fix xnat_imagescandata table.

--ALTER TABLE xnat_imagescandata ADD COLUMN note_cp varchar;

--UPDATE xnat_imagescandata SET note_cp=note;

--ALTER TABLE xnat_imagescandata DROP COLUMN note;

--ALTER TABLE xnat_imagescandata ADD COLUMN note TEXT;

--UPDATE xnat_imagescandata SET note=CAST(note_cp AS TEXT);


-----------------------------------------------------------
xnat_imagescandata definition
[postgres@xnp ~]$ psql xnat
psql (12.8)
Type "help" for help.

xnat=# \d xnat_imagescandata
                                                           Table "public.xnat_imagescandata"
              Column               |          Type          | Collation | Nullable |                              Default                              
-----------------------------------+------------------------+-----------+----------+-------------------------------------------------------------------
 image_session_id                  | character varying(255) |           |          | 
 note                              | character varying(255) |           |          | 
 quality                           | character varying(255) |           |          | 
 condition                         | character varying(255) |           |          | 
 series_description                | character varying(255) |           |          | 
 series_class                      | character varying(255) |           |          | 
 documentation                     | text                   |           |          | 
 scanner                           | character varying(255) |           |          | 
 scanner_manufacturer              | character varying(255) |           |          | 
 scanner_model                     | character varying(255) |           |          | 
 scanner_softwareversion           | character varying(255) |           |          | 
 modality                          | character varying(255) |           |          | 
 frames                            | integer                |           |          | 
 operator                          | character varying(255) |           |          | 
 validation_xnat_validationdata_id | integer                |           |          | 
 starttime                         | time without time zone |           |          | 
 start_date                        | date                   |           |          | 
 id                                | character varying(255) |           | not null | ''::character varying
 type                              | character varying(255) |           |          | 
 uid                               | character varying(255) |           |          | 
 project                           | character varying(255) |           |          | 
 extension                         | integer                |           |          | 
 imagescandata_info                | integer                |           |          | 
 xnat_imagescandata_id             | integer                |           | not null | nextval('xnat_imagescandata_xnat_imagescandata_id_seq'::regclass)
 requestedproceduredescription     | character varying(255) |           |          | 
 protocolname                      | character varying(255) |           |          | 
 bodypartexamined                  | character varying(255) |           |          | 
Indexes:
    "xnat_imagescandata_pkey" PRIMARY KEY, btree (xnat_imagescandata_id)
    "xnat_imagescandata_u_mr_id_fk" UNIQUE CONSTRAINT, btree (image_session_id, id)
    "xnat_imagescandata_extension1" btree (extension)
    "xnat_imagescandata_extension1_hash" hash (extension)
    "xnat_imagescandata_imagescandata_info1" btree (imagescandata_info)
    "xnat_imagescandata_imagescandata_info1_hash" hash (imagescandata_info)
    "xnat_imagescandata_validation_xnat_validationdata_id1" btree (validation_xnat_validationdata_id)
    "xnat_imagescandata_validation_xnat_validationdata_id1_hash" hash (validation_xnat_validationdata_id)
    "xnat_imagescandata_xnat_imagescandata_id1_hash" hash (xnat_imagescandata_id)
Foreign-key constraints:
    "xnat_imagescandata_extension_fkey" FOREIGN KEY (extension) REFERENCES xdat_meta_element(xdat_meta_element_id) ON UPDATE CASCADE ON DELETE SET NULL
    "xnat_imagescandata_image_session_id_fkey" FOREIGN KEY (image_session_id) REFERENCES xnat_imagesessiondata(id) ON UPDATE CASCADE ON DELETE SET NULL
    "xnat_imagescandata_imagescandata_info_fkey" FOREIGN KEY (imagescandata_info) REFERENCES xnat_imagescandata_meta_data(meta_data_id) ON UPDATE CASCADE ON DELETE SET NULL
    "xnat_imagescandata_validation_xnat_validationdata_id_fkey" FOREIGN KEY (validation_xnat_validationdata_id) REFERENCES xnat_validationdata(xnat_validationdata_id) ON UPDATE CASCADE ON DE
LETE SET NULL
Referenced by:
    TABLE "xnat_abstractresource" CONSTRAINT "xnat_abstractresource_xnat_imagescandata_xnat_imagescandat_fkey" FOREIGN KEY (xnat_imagescandata_xnat_imagescandata_id) REFERENCES xnat_imagesca
ndata(xnat_imagescandata_id) ON UPDATE CASCADE ON DELETE CASCADE
    TABLE "xnat_crscandata" CONSTRAINT "xnat_crscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_ctscandata" CONSTRAINT "xnat_ctscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_dx3dcraniofacialscandata" CONSTRAINT "xnat_dx3dcraniofacialscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagesc
andata_id) ON UPDATE CASCADE ON DELETE CASCADE
    TABLE "xnat_dxscandata" CONSTRAINT "xnat_dxscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_ecgscandata" CONSTRAINT "xnat_ecgscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
    TABLE "xnat_eegscandata" CONSTRAINT "xnat_eegscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
    TABLE "xnat_epsscandata" CONSTRAINT "xnat_epsscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
    TABLE "xnat_esscandata" CONSTRAINT "xnat_esscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_esvscandata" CONSTRAINT "xnat_esvscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
    TABLE "xnat_gmscandata" CONSTRAINT "xnat_gmscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_gmvscandata" CONSTRAINT "xnat_gmvscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
    TABLE "xnat_hdscandata" CONSTRAINT "xnat_hdscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_imagescandata_share" CONSTRAINT "xnat_imagescandata_share_sharing_share_xnat_imagescandat_x_fkey" FOREIGN KEY (sharing_share_xnat_imagescandat_xnat_imagescandata_id) REFERENC
ES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE ON DELETE CASCADE
    TABLE "xnat_ioscandata" CONSTRAINT "xnat_ioscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_megscandata" CONSTRAINT "xnat_megscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
    TABLE "xnat_mgscandata" CONSTRAINT "xnat_mgscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_mrscandata" CONSTRAINT "xnat_mrscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_mrsscandata" CONSTRAINT "xnat_mrsscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
    TABLE "xnat_nmscandata" CONSTRAINT "xnat_nmscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_opscandata" CONSTRAINT "xnat_opscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_optscandata" CONSTRAINT "xnat_optscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
    TABLE "xnat_otherdicomscandata" CONSTRAINT "xnat_otherdicomscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) O
N UPDATE CASCADE ON DELETE CASCADE
    TABLE "xnat_petscandata" CONSTRAINT "xnat_petscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
    TABLE "xnat_rfscandata" CONSTRAINT "xnat_rfscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_rtimagescandata" CONSTRAINT "xnat_rtimagescandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDA
TE CASCADE ON DELETE CASCADE
    TABLE "xnat_scscandata" CONSTRAINT "xnat_scscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_segscandata" CONSTRAINT "xnat_segscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
    TABLE "xnat_smscandata" CONSTRAINT "xnat_smscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_srscandata" CONSTRAINT "xnat_srscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_usscandata" CONSTRAINT "xnat_usscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_voiceaudioscandata" CONSTRAINT "xnat_voiceaudioscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) O
N UPDATE CASCADE ON DELETE CASCADE
    TABLE "xnat_xa3dscandata" CONSTRAINT "xnat_xa3dscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CAS
CADE ON DELETE CASCADE
    TABLE "xnat_xascandata" CONSTRAINT "xnat_xascandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_xcscandata" CONSTRAINT "xnat_xcscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCADE
 ON DELETE CASCADE
    TABLE "xnat_xcvscandata" CONSTRAINT "xnat_xcvscandata_xnat_imagescandata_id_fkey" FOREIGN KEY (xnat_imagescandata_id) REFERENCES xnat_imagescandata(xnat_imagescandata_id) ON UPDATE CASCA
DE ON DELETE CASCADE
Triggers:
    a_u_xnat_imagescandata AFTER DELETE OR UPDATE ON xnat_imagescandata FOR EACH ROW EXECUTE FUNCTION after_update_xnat_imagescandata()

-----------------------------------------------------------
xnat_imagescandata dependencies

xnat=# SELECT dependencies_identify('xnat_imagescandata');
                 dependencies_identify                  
--------------------------------------------------------
 (public,displayfields_xnat_ctsessiondata,v)
 (public,displayfields_xnat_dxsessiondata,v)
 (public,displayfields_xnat_mrsessiondata,v)
 (public,displayfields_xnat_petsessiondata,v)
 (public,displayfields_xnat_dxscandata,v)
 (public,displayfields_xnat_ecgscandata,v)
 (public,displayfields_xnat_eegscandata,v)
 (public,displayfields_xnat_epsscandata,v)
 (public,displayfields_xnat_esscandata,v)
 (public,displayfields_xnat_esvscandata,v)
 (public,displayfields_xnat_gmscandata,v)
 (public,displayfields_xnat_gmvscandata,v)
 (public,displayfields_xnat_hdscandata,v)
 (public,displayfields_xnat_ioscandata,v)
 (public,displayfields_xnat_megscandata,v)
 (public,displayfields_xnat_mgscandata,v)
 (public,displayfields_xnat_mrscandata,v)
 (public,displayfields_xnat_mrsscandata,v)
 (public,displayfields_xnat_nmscandata,v)
 (public,displayfields_xnat_opscandata,v)
 (public,displayfields_xnat_optscandata,v)
 (public,displayfields_xnat_otherdicomscandata,v)
 (public,displayfields_xnat_petscandata,v)
 (public,displayfields_xnat_rfscandata,v)
 (public,displayfields_xnat_rtimagescandata,v)
 (public,displayfields_xnat_scscandata,v)
 (public,displayfields_xnat_segscandata,v)
 (public,displayfields_xnat_smscandata,v)
 (public,displayfields_xnat_srscandata,v)
 (public,displayfields_xnat_usscandata,v)
 (public,displayfields_xnat_voiceaudioscandata,v)
 (public,displayfields_xnat_xa3dscandata,v)
 (public,displayfields_xnat_xascandata,v)
 (public,displayfields_xnat_xcscandata,v)
 (public,displayfields_xnat_xcvscandata,v)
 (public,dti_count,v)
 (public,dx_scan_count_agg,v)
 (public,mr_scan_count_agg,v)
 (public,ct_scan_count_agg,v)
 (public,pet_scan_count_agg,v)
 (public,displayfields_xnat_crscandata,v)
 (public,displayfields_xnat_ctscandata,v)
 (public,displayfields_xnat_dx3dcraniofacialscandata,v)
(43 rows)


Martin Boswell

unread,
Nov 8, 2021, 4:04:37 AM11/8/21
to xnat_discussion
Another confusing (and troubling) aspect of this upgrade is that my previous Site ID string had been used as the prefix for all IDs for Subjects, Experiments, etc. these objects are now using the Site ID with a "01" appended to it, and the counters for subject, experiment, etc. are set back to 1.  For instance, if my Site ID was "XnatSite", and previous Subjects were IDed as "XnatSite_S00541", new subjects have IDs such as ""XnatSite01_S00001".  Note that in my Administer > Site Setup > Site Information, the Site ID is still showing as the original string (without the 01).  

Unfortunately, this breaks a number of mechanisms that I have which relies on the original pattern.  Is this expected behavior?  Is there any way to change it back to the previous Site ID and pattern?  

I'd really appreciate any input that I could get on these upgrade issues.  Thanks.

- Martin

Herrick, Rick

unread,
Nov 8, 2021, 7:29:12 PM11/8/21
to xnat_di...@googlegroups.com

I’m not sure why your database schema isn’t been migrated automatically. I just reset the type of the note column in both to VARCHAR(256) and restarted XNAT and the column was converted to TEXT automatically. That said, something is blocking that migration, so you can fix it by hand pretty easily. Shut down Tomcat then run this SQL:

 

SELECT dependencies_save_and_drop('xnat_imagescandata');
ALTER TABLE xnat_imagescandata ALTER COLUMN note TYPE TEXT;
ALTER TABLE xnat_imagescandata_history ALTER COLUMN note TYPE TEXT;
SELECT dependencies_restore('xnat_imagescandata');

 

This should get rid of the start-up messages about this issue.

 

The issue with “01” being appended to the site ID when generating subject and experiment IDs is an unfortunate side effect of fixes made to support multi-node XNAT configurations. It’s almost impossible to avoid collisions when generating IDs on multiple nodes (at least, it’s almost impossible the way XNAT currently does that and changing how IDs are generated and referenced is extremely difficult), so we had to start appending the node or host number to the site ID. Initially the node or host number was omitted if there was only a single node, but there are enough corner cases where this doesn’t work that the node/host number is included all the time. Then there’s a bug where XNAT should check the node list and omit the node/host number if there are no configured nodes, but that’s not working properly so it operates as if there’s a single node but more might be added, i.e. it adds the node/host number.

 

The only way to change back is to modify the IDGenerator code and deploy that as a patch or wait for a release with this as an update. I don’t know if we have an issue in our bug tracker for this but I’ll make sure we get one.

 

Lastly re the plugin settings page, I can’t really say what’s going on there. I don’t think it’s related at all to the database messages you’re seeing, though. Try going to the Plugin Settings page with the developer tools window open to the Network tab. Try filtering by Fetch/XHR and you should see something like this:

 

 

In fact, everything should be almost exactly the same up until the page load that’s highlighted, content.jsp?view=admin/plugins. That’s the page that actually loads the various plugin settings configurations. After that, you should see a number of other calls depending on what plugins you have installed. Almost everything after that in the screen shot above is driven by the DICOM Q/R plugin, specifically the siteSettings.yaml configuration. It’s conceivable something is failing to load properly and that’s breaking the page display overall, so if that’s happening something should show up in the network traffic or the console below.

 

The only thing I can think of outside of things that would manifest during the settings page load is that something changed in the page layout and/or JavaScript between your old version and the upgraded version. The fix for that would be (hopefully) just clearing your browser cache for the XNAT site.

 

-- 

Rick Herrick

XNAT Architect/Developer

Computational Imaging Laboratory

Washington University School of Medicine

 

 

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Martin Boswell <msbo...@lbl.gov>
Date: Monday, November 8, 2021 at 3:04 AM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] Re: After 1.8.3 upgrade, database messages in catalina.out and Plugin Settings doesn't load

* External Email - Caution *

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/e381e205-d110-4903-a9e5-da40b59851efn%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Martin Boswell

unread,
Nov 10, 2021, 10:07:03 AM11/10/21
to xnat_discussion
Rick,

Thanks very much for the response.  The sql that you provided got rid of the database messages in the catalina log on startup.  

And thanks for the explanation about the Site ID.  As long as it's not an indication of a problem, it's ok with me.  

So, for the plugins page...  I checked the dev tools during page load as you recommended, and there are a few jquery errors, but they don't seem to be related (as far as I can tell).  I only have three files in my plugins folder:  

[xnat@xnp msb]$ ls -lF /data/xnat/home/plugins/
total 473
-rw-r--r--. 1 xnat xnat  15268 Jul 12  2020 nrg_plugin_freesurfer53-plugin-1.0.1.jar
-rw-r--r--. 1 xnat xnat 359862 Jul 12  2020 nrg_plugin_freesurfercommon-plugin-1.0.1.jar
-rw-rw-r--  1 xnat xnat  87642 May 24 06:32 pet_analysis_plugin-plugin-1.0.0.jar

The PET analysis plugin is one that I wrote myself to provide a PET session assessor, and I'm wondering whether I've done something wrong that's causing the page load problem.  I've been using the plugin for about 6 months with several thousand instances of the assessor.  But I honestly can't remember the last time that I looked at the Plugin Settings page, and I started wondering whether I could have done something in this plugin to cause the page loading problem.

So, I spun up a clean new vagrant instance with XNAT 1.8.3, and added the two freesurfer plugins, and they showed up correctly in Site Administration > Installed Plugins, but no Plugin Settings item in the menu yet.  So, I added by plugin, and it also showed up correctly in Installed Plugins list, and the Plugin Settings menu item appears, but when I select it, I got the same problem ("Loading...").  

So, it appears that my plugin is causing this problem, and I don't remember looking at the Plugin Settings after I initially installed it, so this may not be related to the 1.8.3 upgrade at all.  I originally built it by starting from the template (https://bitbucket.org/xnatx/xnat-template-plugin.git, at the 1.7.6 tag).  

Do you have any pointers to where I could look in my plugin code for something that might be causing this kind of behavior?  

 - Martin

Herrick, Rick

unread,
Nov 10, 2021, 12:10:36 PM11/10/21
to xnat_di...@googlegroups.com

My guess would be something hinky in the yaml file for your plugin’s site/project settings. The site-wide plugin settings page locates and loads all Spawner elements with IDs that contain siteSettings. I currently have this:

 

# http --session=admin --pretty=format --body --verify=no https://xnatdev.xnat.org/xapi/spawner/namespaces

[

    "dqr:projectSettings",

    "dqr:siteSettings",

    "siteAdmin"

]

 

This means that the only site settings I’ll see on that page are for DQR. You should something similar but for the plugins you have installed. You could try removing the site settings from your plugin and verifying that the site-wide plugin settings page loads properly, then try restoring your site settings bit by bit.

 

A useful thing you can try is just completely nuking the site settings for your plugin by deleting that Spawner namespace. For example, to delete the DQR site settings plugin settings, I can just do:

 

# http --session=admin --pretty=format --body --verify=no https://xnatdev.xnat.org/xapi/spawner/namespaces

[

    "dqr:projectSettings",

    "dqr:siteSettings",

    "siteAdmin"

]

 

# http --session=admin --pretty=format --verify=no DELETE https://xnatdev.xnat.org/xapi/spawner/elements/dqr:siteSettings

HTTP/1.1 200

Connection: keep-alive

Content-Length: 0

Content-Security-Policy: frame-ancestors 'self'

Date: Wed, 10 Nov 2021 17:05:27 GMT

Server: nginx/1.18.0 (Ubuntu)

Set-Cookie: SESSION_EXPIRATION_TIME="1636563927164,3600000"; Version=1; Path=/; Secure

 

# http --session=admin --pretty=format --body --verify=no https://xnatdev.xnat.org/xapi/spawner/namespaces

[

    "dqr:projectSettings",

    "siteAdmin"

]

 

You can restore the system settings as loaded on start-up easily as well:

 

# echo true | http --session=admin --pretty=format --body --verify=no POST https://xnatdev.xnat.org/xapi/spawner/initialize

HTTP/1.1 200

Connection: keep-alive

Content-Length: 0

Content-Security-Policy: frame-ancestors 'self'

Date: Wed, 10 Nov 2021 17:07:36 GMT

Server: nginx/1.18.0 (Ubuntu)

Set-Cookie: SESSION_EXPIRATION_TIME="1636564055976,3600000"; Version=1; Path=/; Secure

 

# http --session=admin --pretty=format --body --verify=no https://xnatdev.xnat.org/xapi/spawner/namespaces

[

    "dqr:projectSettings",

    "dqr:siteSettings",

    "siteAdmin"

]

 

There are also a bunch of calls under the Spawner REST API where you can delete or modify specific elements, which may help you delete and restore elements in your plugin’s site settings without having to modify YAML, rebuild the plugin, and restart XNAT for each iteration. The easiest way to get at that REST API is through the Swagger page, which you can find at http://server/xapi/swagger-ui.html.

Reply all
Reply to author
Forward
0 new messages