<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Bug in carbonio-configd - Carbonio General				            </title>
            <link>https://community.zextras.com/forum/carbonio-general-thread/bug-in-carbonio-configd/</link>
            <description>Zextras Community Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Fri, 06 Nov 2026 13:50:02 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Bug in carbonio-configd</title>
                        <link>https://community.zextras.com/forum/carbonio-general-thread/bug-in-carbonio-configd/#post-12688</link>
                        <pubDate>Wed, 30 Sep 2026 17:21:57 +0000</pubDate>
                        <description><![CDATA[The service &quot;carbonio-configd&quot; starts but &quot;systemctl status carbonio-configd&quot; gives the error: UnboundLocalError: local variable &#039;rc&#039; referenced before assignmentThe bug is in the file /opt/...]]></description>
                        <content:encoded><![CDATA[<p>The service "carbonio-configd" starts but "systemctl status carbonio-configd" gives the error: <em>UnboundLocalError: local variable 'rc' referenced before assignment</em><br /><br />The bug is in the file /opt/zextras/common/lib/jylibs/state.py in 2 places, here is the patch:<br /><br /></p>
<pre contenteditable="false">--- old/state.py	2026-09-30 18:19:24.755097970 +0200
+++ new/state.py	2026-09-30 18:43:46.817291049 +0200
@@ -619,7 +619,8 @@
 				try:
 					rc = c.execute("%s='%s'" % (postconf, val))
 				except Exception, e:
-					return rc
+					Log.logMsg(1, "Postconf error (%s) on command %s='%s'" % (e,postconf, val))
+					return 1
 			self.clearPostconf()
 			return rc
 		return 0
@@ -631,7 +632,8 @@
 				try:
 					rc = c.execute("%s" % postconfd)
 				except Exception, e:
-					return rc
+					Log.logMsg(1, "Postconfd error (%s) on command '%s'" % (e, postconfd))
+					return 1
 			self.clearPostconfd()
 			return rc
 		return 0
</pre>
<p><br />But after you fix this, the next error is: <em>Postconf error ('ascii' codec can't decode byte 0xc2 in position 16: ordinal not in range(128))</em></p>
<p>This is caused by the execution of postconf in a UTF-8 environment. The fix is to add the following lines to the file /etc/systemd/system/carbonio-appserver.target.wants/carbonio-configd.service:<br /><br /></p>
<pre contenteditable="false">
...
Environment="LC_ALL=C"
Environment="LANG=C"
...
</pre>]]></content:encoded>
						                            <category domain="https://community.zextras.com/forum/carbonio-general-thread/">Carbonio General</category>                        <dc:creator>cvidal</dc:creator>
                        <guid isPermaLink="true">https://community.zextras.com/forum/carbonio-general-thread/bug-in-carbonio-configd/#post-12688</guid>
                    </item>
							        </channel>
        </rss>
		