Hi All,
In my 4.5 RC-1 (F12) Akonadi is not starting under 'root'. As suggested by Kevin sometimes back (during the days of F10), I have added: user=root in /root/.config/akonadi/mysql-local.conf and /root/.local/share/akonadi/mysql.conf
Akonadi is fine under normal user. Has something changed in 4.5?
Thanks, Anoop
Anoop wrote:
In my 4.5 RC-1 (F12) Akonadi is not starting under 'root'. As suggested by Kevin sometimes back (during the days of F10), I have added: user=root in /root/.config/akonadi/mysql-local.conf and /root/.local/share/akonadi/mysql.conf
Akonadi is fine under normal user. Has something changed in 4.5?
I cannot help if you do not provide specific error logs so we know what's going wrong. The issue might not be related to the user being root at all, but just some user configuration issue.
(I'll also point out that running MySQL as root is not really a supported configuration, that user=root setting is kind of a hack.)
Kevin Kofler
Akonadi is fine under normal user. Has something changed in 4.5?
I cannot help if you do not provide specific error logs so we know what's going wrong. The issue might not be related to the user being root at all, but just some user configuration issue.
(I'll also point out that running MySQL as root is not really a supported configuration, that user=root setting is kind of a hack.)
Kevin Kofler
Hi Kevin,
Here is the log.
Thanks, Anoop
Akonadi Server Self-Test Report ===============================
Test 1: SUCCESS --------
Database driver found. Details: The QtSQL driver 'QMYSQL' is required by your current Akonadi server configuration and was found on your system.
File content of '/root/.config/akonadi/akonadiserverrc': [%General] Driver=QMYSQL SizeThreshold=4096 ExternalPayload=false
[QMYSQL] Name=akonadi Host= User= Password= Options="UNIX_SOCKET=/root/.local/share/akonadi/db_misc/mysql.socket" ServerPath=/usr/libexec/mysqld StartServer=true
[Debug] Tracer=null
Test 2: ERROR --------
Akonadi was started as root Details: Running Internet-facing applications as root/administrator exposes you to many security risks. MySQL, used by this Akonadi installation, will not allow itself to run as root, to protect you from these risks.
Test 3: SUCCESS --------
MySQL server found. Details: You have currently configured Akonadi to use the MySQL server '/usr/libexec/mysqld'. Make sure you have the MySQL server installed, set the correct path and ensure you have the necessary read and execution rights on the server executable. The server executable is typically called 'mysqld'; its location varies depending on the distribution.
Test 4: SUCCESS --------
MySQL server is executable. Details: MySQL server found: /usr/libexec/mysqld Ver 5.1.47 for redhat-linux-gnu on i386 (Source distribution)
Test 5: SUCCESS --------
No current MySQL error log found. Details: The MySQL server did not report any errors during this startup. The log can be found in '/root/.local/share/akonadi/db_data/mysql.err'.
Test 6: SUCCESS --------
MySQL server default configuration found. Details: The default configuration for the MySQL server was found and is readable at <a href='/etc/akonadi/mysql-global.conf'>/etc/akonadi/mysql-global.conf</a>.
File content of '/etc/akonadi/mysql-global.conf': # # Global Akonadi MySQL server settings, # These settings can be adjusted using $HOME/.config/akonadi/mysql-local.conf # # Based on advice by Kris Köhntopp kris@mysql.com # [mysqld] skip_grant_tables skip_networking
# strict query parsing/interpretation # TODO: make Akonadi work with those settings enabled #sql_mode=strict_trans_tables,strict_all_tables,strict_error_for_division_by_zero,no_auto_create_user,no_auto_value_on_zero,no_engine_substitution,no_zero_date,no_zero_in_date,only_full_group_by,pipes_as_concat #sql_mode=strict_trans_tables
# use InnoDB for transactions and better crash recovery default_storage_engine=innodb # case-insensitive table names, avoids trouble on windows lower_case_table_names=1 character_set_server=utf8 collation_server=utf8_general_ci table_cache=200 thread_cache_size=3 log_bin=mysql-bin expire_logs_days=3 #sync_bin_log=0 # error log file name, relative to datadir log_error=mysql.err log_warnings=2 # log all queries, useful for debugging but generates an enormous amount of data #log=mysql.full # log queries slower than n seconds, log file name relative to datadir (for debugging only) #log_slow_queries=mysql.slow #long_query_time=1 # log queries not using indices, debug only, disable for production use #log_queries_not_using_indexes=1 # maximum blob size max_allowed_packet=32M max_connections=256 # makes sense when having the same query multiple times # makes no sense with prepared statements and/or transactions query_cache_type=0 query_cache_size=0
innodb_file_per_table=1 innodb_log_buffer_size=1M innodb_additional_mem_pool_size=1M # messure database size and adjust # SELECT sum(data_length) as bla, sum(index_length) as blub FROM information_schema.tables WHERE table_schema not in ("mysql", "information_schema"); innodb_buffer_pool_size=80M # size of average write burst, keep Innob_log_waits small, keep Innodb_buffer_pool_wait_free small (see show global status like "inno%", show global variables) innodb_log_file_size=8M innodb_flush_log_at_trx_commit=2
# Do not drop the connection to the DB after 8 hours of inactivity wait_timeout=1296000
[client] default-character-set=utf8
Test 7: SUCCESS --------
MySQL server custom configuration found. Details: The custom configuration for the MySQL server was found and is readable at <a href='/root/.config/akonadi/mysql-local.conf'>/root/.config/akonadi/mysql-local.conf</a>
File content of '/root/.config/akonadi/mysql-local.conf': user=root
Test 8: SUCCESS --------
MySQL server configuration is usable. Details: The MySQL server configuration was found at <a href='/root/.local/share/akonadi/mysql.conf'>/root/.local/share/akonadi/mysql.conf</a> and is readable.
File content of '/root/.local/share/akonadi/mysql.conf': # # Global Akonadi MySQL server settings, # These settings can be adjusted using $HOME/.config/akonadi/mysql-local.conf # # Based on advice by Kris Köhntopp kris@mysql.com # [mysqld] skip_grant_tables skip_networking
# strict query parsing/interpretation # TODO: make Akonadi work with those settings enabled #sql_mode=strict_trans_tables,strict_all_tables,strict_error_for_division_by_zero,no_auto_create_user,no_auto_value_on_zero,no_engine_substitution,no_zero_date,no_zero_in_date,only_full_group_by,pipes_as_concat #sql_mode=strict_trans_tables
# use InnoDB for transactions and better crash recovery default_storage_engine=innodb # case-insensitive table names, avoids trouble on windows lower_case_table_names=1 character_set_server=utf8 collation_server=utf8_general_ci table_cache=200 thread_cache_size=3 log_bin=mysql-bin expire_logs_days=3 #sync_bin_log=0 # error log file name, relative to datadir log_error=mysql.err log_warnings=2 # log all queries, useful for debugging but generates an enormous amount of data #log=mysql.full # log queries slower than n seconds, log file name relative to datadir (for debugging only) #log_slow_queries=mysql.slow #long_query_time=1 # log queries not using indices, debug only, disable for production use #log_queries_not_using_indexes=1 # maximum blob size max_allowed_packet=32M max_connections=256 # makes sense when having the same query multiple times # makes no sense with prepared statements and/or transactions query_cache_type=0 query_cache_size=0
innodb_file_per_table=1 innodb_log_buffer_size=1M innodb_additional_mem_pool_size=1M # messure database size and adjust # SELECT sum(data_length) as bla, sum(index_length) as blub FROM information_schema.tables WHERE table_schema not in ("mysql", "information_schema"); innodb_buffer_pool_size=80M # size of average write burst, keep Innob_log_waits small, keep Innodb_buffer_pool_wait_free small (see show global status like "inno%", show global variables) innodb_log_file_size=8M innodb_flush_log_at_trx_commit=2
# Do not drop the connection to the DB after 8 hours of inactivity wait_timeout=1296000
[client] default-character-set=utf8 user=root
Test 9: SUCCESS --------
akonadictl found and usable Details: The program '/usr/bin/akonadictl' to control the Akonadi server was found and could be executed successfully. Result: Akonadi 1.3.85
Test 10: ERROR --------
Akonadi control process not registered at D-Bus. Details: The Akonadi control process is not registered at D-Bus which typically means it was not started or encountered a fatal error during startup.
Test 11: ERROR --------
Akonadi server process not registered at D-Bus. Details: The Akonadi server process is not registered at D-Bus which typically means it was not started or encountered a fatal error during startup.
Test 12: SUCCESS --------
Nepomuk search service registered at D-Bus. Details: The Nepomuk search service is registered at D-Bus which typically indicates it is operational.
Test 13: SUCCESS --------
Nepomuk search service uses an appropriate backend. Details: The Nepomuk search service uses one of the recommended backends.
Test 14: SKIP --------
Protocol version check not possible. Details: Without a connection to the server it is not possible to check if the protocol version meets the requirements.
Test 15: ERROR --------
No resource agents found. Details: No resource agents have been found, Akonadi is not usable without at least one. This usually means that no resource agents are installed or that there is a setup problem. The following paths have been searched: '/usr/share/akonadi/agents'. The XDG_DATA_DIRS environment variable is set to '/usr/share/kde-settings/kde-profile/default/share:/usr/local/share:/usr/share'; make sure this includes all paths where Akonadi agents are installed.
Directory listing of '/usr/share/akonadi/agents': birthdaysresource.desktop contactsresource.desktop icalresource.desktop imapresource.desktop kabcresource.desktop kcalresource.desktop knutresource.desktop kolabproxyresource.desktop localbookmarksresource.desktop maildirresource.desktop maildispatcheragent.desktop mboxresource.desktop microblog.desktop mtdummyresource.desktop nepomukcalendarfeeder.desktop nepomukcontactfeeder.desktop nepomuktagresource.desktop nntpresource.desktop notesresource.desktop pop3resource.desktop vcarddirresource.desktop vcardresource.desktop
Environment variable XDG_DATA_DIRS is set to '/usr/share/kde-settings/kde-profile/default/share:/usr/local/share:/usr/share'
Test 16: ERROR --------
Current Akonadi server error log found. Details: The Akonadi server reported errors during its current startup. The log can be found in <a href='/root/.local/share/akonadi/akonadiserver.error'>/root/.local/share/akonadi/akonadiserver.error</a>.
File content of '/root/.local/share/akonadi/akonadiserver.error': Database process exited unexpectedly during initial connection! executable: "/usr/libexec/mysqld" arguments: ("--defaults-file=/root/.local/share/akonadi//mysql.conf", "--datadir", "/root/.local/share/akonadi/db_data/", "--socket=/root/.local/share/akonadi/db_misc/mysql.socket") stdout: "" stderr: "100702 9:35:12 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
100702 9:35:12 [ERROR] Aborting
100702 9:35:12 [Note] /usr/libexec/mysqld: Shutdown complete
" exit code: 1 process error: "Unknown error" "[ 0: akonadiserver(_Z11akBacktracev+0x36) [0x8051906] 1: akonadiserver() [0x8051ddb] 2: [0x4c3400] 3: [0x4c3424] 4: /lib/libc.so.6(gsignal+0x51) [0x896a81] 5: /lib/libc.so.6(abort+0x17a) [0x89834a] 6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x8c) [0xb069cc] 7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xc6) [0x8052e36] 8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x8f) [0xb9a8cf] 9: /usr/lib/libQtCore.so.4(+0xfa6f5) [0xbaa6f5] 10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3e) [0xbabace] 11: akonadiserver(_ZN6QDebugD1Ev+0x44) [0x804d954] 12: /usr/lib/libakonadiprivate.so.1(_ZN13DbConfigMysql19startInternalServerEv+0x1b98) [0x2c40d8] 13: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0x107) [0x22c287] 14: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0xe9) [0x22e059] 15: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x58) [0x22fc08] 16: akonadiserver(main+0x328) [0x804cdb8] 17: /lib/libc.so.6(__libc_start_main+0xe6) [0x882bb6] 18: akonadiserver() [0x804c9c1] ] "
Test 17: ERROR --------
Previous Akonadi server error log found. Details: The Akonadi server reported errors during its previous startup. The log can be found in <a href='/root/.local/share/akonadi/akonadiserver.error.old'>/root/.local/share/akonadi/akonadiserver.error.old</a>.
File content of '/root/.local/share/akonadi/akonadiserver.error.old': Database process exited unexpectedly during initial connection! executable: "/usr/libexec/mysqld" arguments: ("--defaults-file=/root/.local/share/akonadi//mysql.conf", "--datadir", "/root/.local/share/akonadi/db_data/", "--socket=/root/.local/share/akonadi/db_misc/mysql.socket") stdout: "" stderr: "100702 9:35:12 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
100702 9:35:12 [ERROR] Aborting
100702 9:35:12 [Note] /usr/libexec/mysqld: Shutdown complete
" exit code: 1 process error: "Unknown error" "[ 0: akonadiserver(_Z11akBacktracev+0x36) [0x8051906] 1: akonadiserver() [0x8051ddb] 2: [0x504400] 3: [0x504424] 4: /lib/libc.so.6(gsignal+0x51) [0xc16a81] 5: /lib/libc.so.6(abort+0x17a) [0xc1834a] 6: /usr/lib/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x8c) [0x1669cc] 7: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xc6) [0x8052e36] 8: /usr/lib/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x8f) [0x1fa8cf] 9: /usr/lib/libQtCore.so.4(+0xfa6f5) [0x20a6f5] 10: /usr/lib/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x3e) [0x20bace] 11: akonadiserver(_ZN6QDebugD1Ev+0x44) [0x804d954] 12: /usr/lib/libakonadiprivate.so.1(_ZN13DbConfigMysql19startInternalServerEv+0x1b98) [0x9bf0d8] 13: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer20startDatabaseProcessEv+0x107) [0x927287] 14: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0xe9) [0x929059] 15: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x58) [0x92ac08] 16: akonadiserver(main+0x328) [0x804cdb8] 17: /lib/libc.so.6(__libc_start_main+0xe6) [0xc02bb6] 18: akonadiserver() [0x804c9c1] ] "
Test 18: SUCCESS --------
No current Akonadi control error log found. Details: The Akonadi control process did not report any errors during its current startup.
Test 19: SUCCESS --------
No previous Akonadi control error log found. Details: The Akonadi control process did not report any errors during its previous startup.
Anoop wrote:
Test 2: ERROR
Akonadi was started as root Details: Running Internet-facing applications as root/administrator exposes you to many security risks. MySQL, used by this Akonadi installation, will not allow itself to run as root, to protect you from these risks.
This check is new: http://websvn.kde.org/?revision=1106949&view=revision , however I don't think this is the error which is aborting Akonadi, but this:
Test 16: ERROR
Current Akonadi server error log found. Details: The Akonadi server reported errors during its current startup. The log can be found in <a
href='/root/.local/share/akonadi/akonadiserver.error'>/root/.local/share/akonadi/akonadiserver.error</a>.
File content of '/root/.local/share/akonadi/akonadiserver.error': Database process exited unexpectedly during initial connection! executable: "/usr/libexec/mysqld" arguments: ("--defaults-file=/root/.local/share/akonadi//mysql.conf", "--datadir", "/root/.local/share/akonadi/db_data/", "--socket=/root/.local/share/akonadi/db_misc/mysql.socket") stdout: "" stderr: "100702 9:35:12 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
is.
The problem is that the end of mysql-global.conf now starts a [client] section, so the user=root in your mysql-local.conf ends up in the wrong section. Try using: [mysqld] user=root in mysql-local.conf.
That said, unfortunately, I think the additional check in the self test is also going to make things not work properly unless you patch the package, since kdepim apps tend to quit if they see any errors in the self-test, even if Akonadi is actually working.
Kevin Kofler
Anoop wrote:
Test 2: ERROR
Akonadi was started as root Details: Running Internet-facing applications as root/administrator exposes you to many security risks. MySQL, used by this Akonadi installation, will not allow itself to run as root, to protect you from these risks.
BTW, I think this check is completely bogus and I think we should patch Akonadi to just work as root.
The justification given is completely bullshit since MySQL does NOT listen on a TCP/IP port (only on a local Unix socket accessible only to root) when configured the way Akonadi configures it. So you're NOT running an Internet- facing application as root. And it's easy for Akonadi to make it just work, just put user=root into the config file if run as root.
Kevin Kofler
On Fri, Jul 2, 2010 at 11:38 PM, Kevin Kofler kevin.kofler@chello.atwrote:
Anoop wrote:
Test 2: ERROR
Akonadi was started as root Details: Running Internet-facing applications as root/administrator exposes you to many security risks. MySQL, used by this Akonadi installation, will not allow itself to run as root, to protect you from these risks.
BTW, I think this check is completely bogus and I think we should patch Akonadi to just work as root.
The justification given is completely bullshit since MySQL does NOT listen on a TCP/IP port (only on a local Unix socket accessible only to root) when configured the way Akonadi configures it. So you're NOT running an Internet- facing application as root. And it's easy for Akonadi to make it just work, just put user=root into the config file if run as root.
Kevin Kofler
Hi Kevin,
Thanks a lot!!!. But during all this time, I reverted back to SC-4.4.4. I will try ot this, once Fedora gets SC-4.5.
Regards, Anoop