Amahi initialization with exception UTF-8 encoded string can't insert into Mysql2

skygunner
Posts: 12
Joined: Mon Mar 08, 2010 4:34 am
Location: Brisbane,Australia

Amahi initialization with exception UTF-8 encoded string can't insert into Mysql2

Postby skygunner » Thu Aug 27, 2015 3:25 am

Hi just installed amahi using the 7 Express CD.

But can't have the platform initialization done:

Code: Select all

The Dashboard has encountered an exception! Woopsie. Sorry about that! It could be due to a bug, or very low memory, or very low disk in the root (/) partition. If your disk or memory are not critical, it's likely a bug. If this persists, please file a bug report with as much detail as you can. You will be redirected to a debug page with more information shortly.
Here's the hda platform log, basically it is saying can't insert the UTF-8 encoded Chinese string 'Apache Web服务器' into the comment column.

Code: Select all

Started POST "/user_sessions/initialize_system" for 192.168.1.103 at 2015-08-26 14:31:54 +1000 Processing by UserSessionsController#initialize_system as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"RU+xphO79CvM/3wjNYVLNt/TTMZdT976/8UD+lBn7nc=", "username"=>"kodi", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "commit"=>"创建"} Mysql2::Error: Incorrect string value: '\xE6\x9C\x8D\xE5\x8A\xA1...' for column 'comment' at row 1: INSERT INTO `servers` (`comment`, `created_at`, `name`, `pidfile`, `updated_at`) VALUES ('Apache Web服务器', '2015-08-26 04:31:54', 'apache', 'httpd/httpd.pid', '2015-08-26 04:31:54') Completed 500 Internal Server Error in 295ms ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xE6\x9C\x8D\xE5\x8A\xA1...' for column 'comment' at row 1: INSERT INTO `servers` (`comment`, `created_at`, `name`, `pidfile`, `updated_at`) VALUES ('Apache Web服务器', '2015-08-26 04:31:54', 'apache', 'httpd/httpd.pid', '2015-08-26 04:31:54')): app/models/server.rb:36:in `create_default_servers' app/controllers/user_sessions_controller.rb:119:in `initialize_default_settings' app/controllers/user_sessions_controller.rb:103:in `initialize_system'
What can I do with this?

Cheers,

skygunner
Posts: 12
Joined: Mon Mar 08, 2010 4:34 am
Location: Brisbane,Australia

Re: Amahi initialization with exception UTF-8 encoded string can't insert into Mysql2

Postby skygunner » Thu Aug 27, 2015 3:37 am

Code: Select all

production: adapter: mysql2 encoding: utf8 pool: 5 database: hda_production username: amahihda password: [password] host: localhost socket: <%= [ '/var/lib/mysql/mysql.sock', # Fedora. '/var/run/mysqld/mysqld.sock', # Ubuntu, Debian. '/tmp/mysqld.sock' # Mac OS X ].select { |f| File.exist? f }.first %>

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Amahi initialization with exception UTF-8 encoded string can't insert into Mysql2

Postby bigfoot65 » Thu Aug 27, 2015 9:57 am

Does your system meet minimum system requirements?

Sounds like your machine may not be compatible with the Express CD. You may need to do the Amahi 7 full DVD install.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

skygunner
Posts: 12
Joined: Mon Mar 08, 2010 4:34 am
Location: Brisbane,Australia

Re: Amahi initialization with exception UTF-8 encoded string can't insert into Mysql2

Postby skygunner » Fri Aug 28, 2015 3:49 am

Does your system meet minimum system requirements?

Sounds like your machine may not be compatible with the Express CD. You may need to do the Amahi 7 full DVD install.

It might be. But incompatible hardware would cause mysql inserting error?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Amahi initialization with exception UTF-8 encoded string can't insert into Mysql2

Postby bigfoot65 » Fri Aug 28, 2015 8:48 am

It could be if Amahi did not install correctly or there is insufficient memory available to execute the functions.

is this an old system? How about the internet connection? Did you do OS updates?

Since this is such an odd error, trying to narrow it down more to help find the root cause and potential solution.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

shinghome
Posts: 1
Joined: Wed Mar 28, 2018 6:12 am

Re: Amahi initialization with exception UTF-8 encoded string can't insert into Mysql2

Postby shinghome » Wed Mar 28, 2018 6:16 am

I have encounter a similar issue.
I look into the production.log file i have found the following error:

Started POST "/user_sessions/initialize_system" for 192.168.0.66 at 2018-03-28 2 0:45:58 +0800
Processing by UserSessionsController#initialize_system as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"CBgCQgYW4CjGb0p/fjfHT5tKpOb1T 8jp67adaT6z81JwUeEhd53ROQPVn24CLL2eVZOpxmiQGdZ4jbXqVO5C5g==", "username"=>"shing home", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "commit" =>"创建"}
Completed 500 Internal Server Error in 109ms (ActiveRecord: 38.7ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xE6\x96 \x87\xE4\xBB\xB6...' for column 'comment' at row 1: INSERT INTO `servers` (`name `, `comment`, `pidfile`, `created_at`, `updated_at`) VALUES ('smb', '文件服务器( Samba)', 'smbd.pid', '2018-03-28 12:45:58', '2018-03-28 12:45:58')):

app/models/server.rb:37:in `create_default_servers'

While the initialization page was displayed partly in Chinese due to my Chrome locale setting;
My work around was to set to use my IE to initialize it; and was able to successfully get pass the initialization error.
I think this maybe any issue where it try to extract unsupported characters from the web browser info and save it to the MYSQL database which does not support the character set.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Amahi initialization with exception UTF-8 encoded string can't insert into Mysql2

Postby bigfoot65 » Wed Mar 28, 2018 5:47 pm

What version of Amahi did you install?

Please provide the URL for:

Code: Select all

apaste --sysinfo
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 22 guests