By: Daniel Steiner user 06 Mar 2023 at 1:03 a.m. CST

7 Responses
Daniel Steiner gravatar
Hi, I have pretty much the same issue during upgrade to 4.5.0 version: ``` ... Updating oxTrustConfApplication Traceback (most recent call last): File "upg4xto450.py", line 1845, in <module> updaterObj.update_persistence_data() File "upg4xto450.py", line 706, in update_persistence_data self.apply_persist_changes(js_conf, self.persist_changes[(config_element, config_dn, object_class)]) File "upg4xto450.py", line 902, in apply_persist_changes js_conf[key][value[0]] = value[1] TypeError: 'NoneType' object does not support item assignment ``` I have downlaoded the latest version of `upg4xto450.py` script. All logs in `install/community_edition_setup_4.5.0/logs` folder do not show any error. This probably the same problem like in [Upgrade to 4.5 ticktet](https://support.gluu.org/upgrade/11118/upgrade-to-45/). I also have posted my message in this ticket, but, it is already closed. Regards

By Mohit Mali staff 06 Mar 2023 at 2:32 a.m. CST

Mohit Mali gravatar
hello Daniel Steiner, let me check the issue at my end and get back to you. Regards Mohit Mali.

By Mohit Mali staff 06 Mar 2023 at 10:23 a.m. CST

Mohit Mali gravatar
hello Daniel Steiner, I tested and checked the upgrade script from 4.4.2 to 4.5 but haven't get any issue. please check you've downloaded the correct script https://raw.githubusercontent.com/GluuFederation/community-edition-package/master/update/4.5.0/upg4xto450.py Regards Mohit Mali

By Daniel Steiner user 06 Mar 2023 at 10:59 p.m. CST

Daniel Steiner gravatar
Hi Mohit, Yes, I have downloaded the correct python upgrade script: ``` wget https://raw.githubusercontent.com/GluuFederation/community-edition-package/master/update/4.5.0/upg4xto450.py -O upg4xto450-1.py diff upg4xto450-1.py upg4xto450.py ``` There is no difference. Regards Daniel

By Mohib Zico Account Admin 06 Mar 2023 at 11:07 p.m. CST

Mohib Zico gravatar
I am going to test by myself. Daniel, Can you please share your 4.4.2 infrastructure again? - What type of OS? Answer: CentOS 8 - How much memory you have? - How much CPU you have? - Is there any customization in your oxTrust?

By Daniel Steiner user 06 Mar 2023 at 11:36 p.m. CST

Daniel Steiner gravatar
Hi, Yes, of course: - We have Almalinux 8.7 - MemTotal: 7847176 kB - 4 Intel(R) Xeon(R) Gold 5118 CPU @ 2.30GHz (VMware) - As far I know, we don't have any customization. But, I'm not sure what customization you asking for. We only changed some parameter in _JSON Configuration_ in the web gui. Regards

By Mohib Zico Account Admin 06 Mar 2023 at 11:46 p.m. CST

Mohib Zico gravatar
Thanks. >> We have Almalinux 8.7 I don't have that version so I'll just go with core CentOS 8. >> But, I'm not sure what customization you asking for. We only changed some parameter in JSON Configuration in the web gui. Yes, what kind of configuration you applied in JSON?

By Daniel Steiner user 07 Mar 2023 at 6:47 a.m. CST

Daniel Steiner gravatar
Hi Mohib, Sorry for the late answer, but, we could fix all problems by ourselves. Next a detailed report how we fixed this two problems: The "`ScimProperties`" were set to "`None`" in "`oxTrustConfApplication`", causing the following error: ```bash Traceback (most recent call last): File "upg4xto450.py", line 1845, in <module> updaterObj.update_persistence_data() File "upg4xto450.py", line 706, in update_persistence_data self.apply_persist_changes(js_conf, self.persist_changes[(config_element, config_dn, object_class)]) File "upg4xto450.py", line 902, in apply_persist_changes js_conf[key][value[0]] = value[1] TypeError: 'NoneType' object does not support item assignment ``` I applied the following patch to define a empty dictionary, if subentries should be added and the parent is "`None`": ```bash --- upg4xto450.py.orig 2023-03-06 05:26:04.606453262 +0000 +++ upg4xto450.py 2023-03-07 11:38:57.623909445 +0000 @@ -899,6 +899,8 @@ if how_change == 'entry': js_conf[key] = value if how_change == 'subentry': + if js_conf[key] == None: + js_conf[key] = {} js_conf[key][value[0]] = value[1] elif change_type == 'remove': if how_change == 'entry': ``` After that, the upgrade script worked. During the start, another error occured in "`/opt/gluu/jetty/idp/logs/2023_03_07.jetty.log`": ```sh org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.gluu.idp.externalauth.openid.conf.IdpConfigurationFactory]: Constructor threw exception; nested exception is org.gluu.persist.exception.MappingException: Failed to convert json value '{"conne ctProtectionList":["None","StartTls","SslTls"],"valid":false,"host":"","port":0,"connect-protection":"SslTls","trust-host":false,"from-name":"","from-email-address":"","requires-authentication":false,"user-name":"","password":"","key-store":"/etc/certs/smtp-keys.pkcs12"," key-store-password":"BASE64VALUE","key-store-alias":"smtp_sig_ec256","signing-algorithm":"SHA256withECDSA"}' to object of type class org.gluu.model.SmtpConfiguration ``` Since we do not need SMTP configuration I just set an empty dictionary "`{}`" into "oxSmtpConfiguration", restarted the Gluu container and it worked. The default values of ```json {"valid":false,"connectProtectionList":["NONE","START_TLS","SSL_TLS"],"host":null,"port":0,"connect-protection":null,"trust-host":false,"from-name":null,"from-email-address":null,"requires-authentication":false,"user-name":null,"password":null,"key-store":null,"key-store-password":null,"key-store-alias":null,"signing-algorithm":null} ``` where inserted into "`oxSmtpConfiguration`" afterwards. It should look like following, if no SMTP server is must be defined or used: ```json { "connect-protection": null, "connectProtectionList": [ "NONE", "START_TLS", "SSL_TLS" ], "from-email-address": null, "from-name": null, "host": null, "key-store": null, "key-store-alias": null, "key-store-password": null, "password": null, "port": 0, "requires-authentication": false, "signing-algorithm": null, "trust-host": false, "user-name": null, "valid": false } ``` I hope, this helps other persons to solve their upgrade problems, Regards, Daniel