ruby - AWS Codedeploy failed during Install: UnknownError "\xCC" from ASCII-8BIT to UTF-8 -


i have tried troubleshoot unknownerror returned codedeploy agent on amazon linux ec2 instance. push files local git repo on mac s3 bucket, , deploy there ec2 instance.

i have edited /etc/codedeploy-agent/conf/codedeployagent.yml , set :verbose: true on ec2 instance. tried deploy again , open codedeploy-agent.log @ /var/log/aws/codedeploy-agent.

the last lines in log before failing shows agent installs elb scripts provided aws.

2015-06-19 08:09:13 debug [codedeploy-agent(7637)]: instanceagent::plugins::codedeployplugin::commandbuilder: copying /opt/codedeploy-agent/deployment-root/c6b25857-8911-4f61-8b30-b39f0c34c395/d-6uz0vfid9/deployment-archive/scripts/stop_server.sh /var/www/html/scripts/stop_server.sh     2015-06-19 08:09:13 debug [codedeploy-agent(7637)]: instanceagent::plugins::codedeployplugin::commandbuilder: copying /opt/codedeploy-agent/deployment-root/c6b25857-8911-4f61-8b30-b39f0c34c395/d-6uz0vfid9/deployment-archive/scripts/register_with_elb.sh /var/www/html/scripts/register_with_elb.sh     2015-06-19 08:09:13 debug [codedeploy-agent(7637)]: instanceagent::plugins::codedeployplugin::commandpoller: calling puthostcommandcomplete: "code error"      2015-06-19 08:09:13 info  [codedeploy-agent(7637)]: [aws::codedeploycommand::client 200 0.084236 0 retries] put_host_command_complete(command_status:"failed",diagnostics:{format:"json",payload:"{\"error_code\":5,\"script_name\":\"\",\"message\":\"\\\"\\\\xcc\\\" ascii-8bit utf-8\",\"log\":\"\"}"},host_command_identifier:"wyjjb20uyw1hem9ulmfwb2xsby5kzxbsb3ljb250cm9slmrvbwfpbi5ib3n0q29tbwfuzelkzw50awzpzxiilhsizgvwbg95bwvudelkijoiq29kzurlcgxves9lds13zxn0ltevuhjvzc9hcm46yxdzonnkczplds13zxn0lte6nzmznte3mzy5mdayomrlcgxvew1lbnqvzc02vvowvkzjrdkilcjob3n0swqioijhcm46yxdzomvjmjplds13zxn0lte6nzmznte3mzy5mdayomluc3rhbmnll2ktzwrjytkzndcilcjjb21tyw5ktmftzsi6ikluc3rhbgwilcjjb21tyw5kug9zaxrpb24iojqsimnvbw1hbmrbdhrlbxb0ijoxfv0=") 

the last files installed not related. since have tried remove scripts mention above. error seems upstream , ruby related.

2015-06-19 08:09:13 error [codedeploy-agent(7637)]: instanceagent::plugins::codedeployplugin::commandpoller: error during perform: encoding::undefinedconversionerror - "\xcc" ascii-8bit utf-8 - /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/install_instruction.rb:165:in `encode' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/install_instruction.rb:165:in `to_json' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/install_instruction.rb:165:in `to_json' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/installer.rb:38:in `block in install' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/installer.rb:37:in `open' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/installer.rb:37:in `install' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:103:in `block in <class:commandexecutor>' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:51:in `execute_command' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:123:in `process_command' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:56:in `perform' /opt/codedeploy-agent/lib/instance_agent/agent/base.rb:28:in `run' /opt/codedeploy-agent/lib/instance_agent/runner/child.rb:38:in `block in run' /opt/codedeploy-agent/lib/instance_agent/runner/child.rb:55:in `with_error_handling' /opt/codedeploy-agent/lib/instance_agent/runner/child.rb:37:in `run' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:70:in `block in run_with_error_handling' /opt/codedeploy-agent/lib/instance_agent/runner/child.rb:55:in `with_error_handling' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:69:in `run_with_error_handling' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:33:in `block in start' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:22:in `loop' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:22:in `start' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:198:in `block in spawn_child' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:196:in `fork' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:196:in `spawn_child' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:188:in `block in spawn_children' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:187:in `times' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:187:in `spawn_children' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:133:in `start' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:36:in `block in start' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:35:in `fork' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:35:in `start' /opt/codedeploy-agent/bin/codedeploy-agent:37:in `block (2 levels) in <main>' /opt/codedeploy-agent/vendor/gems/gli-2.5.6/lib/gli/command_support.rb:130:in `call' /opt/codedeploy-agent/vendor/gems/gli-2.5.6/lib/gli/command_support.rb:130:in `execute' /opt/codedeploy-agent/vendor/gems/gli-2.5.6/lib/gli/app_support.rb:262:in `block in call_command' /opt/codedeploy-agent/vendor/gems/gli-2.5.6/lib/gli/app_support.rb:275:in `call' /opt/codedeploy-agent/vendor/gems/gli-2.5.6/lib/gli/app_support.rb:275:in `call_command' /opt/codedeploy-agent/vendor/gems/gli-2.5.6/lib/gli/app_support.rb:69:in `run' /opt/codedeploy-agent/bin/codedeploy-agent:84:in `<main>' 

i have tried $ grep --color -in -r '\xcc' /my/folder/ returns like

binary file /my/folder/a.png matches

but returned /my/folder/wp-content/plugins/wordpress-seo/admin/class-metabox.php:348:'Ì'

so removed plugin , tried convert filenames ascii utf-8 convmv (it didn't convert anything). without success.

i have updated several gems according couple of stackoverflow threads.

how mitigate error? find error message amazon codedeploy vaugue , hard troubleshoot , i've run out of ideas.

issue looks lang env has not been set when installing / starting codedeploy.

i found if restart codedeploy via cli app deploy without issue.

you can check lang env of codedploy process running

ps auxe |grep codede 

we deploy codedeploy via puppet , have set (environment => 'lang=en_us.utf-8') when running install script.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -