aws <command> help command fails without less installed
I ran into a case where the awscli help commands failed without groff & less installed. The error message for not having groff is pretty straight forward. But the error message about less being missing just says [Errno 2] No such file or directory.
awscli version:
root@redacted:~# aws --version
aws-cli/1.10.25 Python/2.7.9 Linux/4.4.5-15.26.amzn1.x86_64 botocore/1.4.16
Running help for the first time:
root@redacted:~# aws help
Could not find executable named "groff"
So I installed groff:
root@redacted:~# apt-get install -y -qq groff
Then ran help again:
root@redacted:~# aws help
[Errno 2] No such file or directory
root@redacted:~# echo $?
255
On another machine I found the --debug flag so I ran aws help with that and found saw that it was trying to call less at the end of the output.
root@redacted:~# aws --debug help
2016-05-05 16:32:19,477 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.10.25 Python/2.7.9 Linux/4.4.5-15.26.amzn1.x86_64 botocore/1.4.16
2016-05-05 16:32:19,477 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['--debug', 'help']
2016-05-05 16:32:19,478 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_scalar_parsers at 0x7f9faee85e60>
2016-05-05 16:32:19,478 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7f9faee681b8>
2016-05-05 16:32:19,478 - MainThread - botocore.credentials - DEBUG - Skipping environment variable credential check because profile name was explicitly set.
2016-05-05 16:32:19,479 - MainThread - botocore.hooks - DEBUG - Event doc-breadcrumbs.aws: calling handler <bound method ProviderDocumentEventHandler.doc_breadcrumbs of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,479 - MainThread - botocore.hooks - DEBUG - Event doc-title.aws: calling handler <bound method ProviderDocumentEventHandler.doc_title of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,479 - MainThread - botocore.hooks - DEBUG - Event doc-description.aws: calling handler <bound method ProviderDocumentEventHandler.doc_description of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,479 - MainThread - botocore.hooks - DEBUG - Event doc-description.aws: calling handler <function add_paging_description at 0x7f9faf01a5f0>
2016-05-05 16:32:19,480 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-start.aws: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_start of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,480 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.debug: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,480 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.endpoint-url: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,480 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.no-verify-ssl: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,480 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.no-paginate: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,481 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.output: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,481 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.query: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,481 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.profile: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,481 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.region: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,481 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.version: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,482 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.color: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,482 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.no-sign-request: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,482 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.ca-bundle: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,482 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.cli-read-timeout: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,482 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-option.aws.cli-connect-timeout: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,483 - MainThread - botocore.hooks - DEBUG - Event doc-synopsis-end.aws: calling handler <bound method ProviderDocumentEventHandler.doc_synopsis_end of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,483 - MainThread - botocore.hooks - DEBUG - Event doc-options-start.aws: calling handler <bound method ProviderDocumentEventHandler.doc_options_start of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,483 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.debug: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,483 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.endpoint-url: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,484 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.no-verify-ssl: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,484 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.no-paginate: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,484 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.output: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,485 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.query: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,485 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.profile: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,485 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.region: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,486 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.version: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,486 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.color: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,486 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.no-sign-request: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,487 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.ca-bundle: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,487 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.cli-read-timeout: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,487 - MainThread - botocore.hooks - DEBUG - Event doc-option.aws.cli-connect-timeout: calling handler <bound method ProviderDocumentEventHandler.doc_option of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,488 - MainThread - botocore.hooks - DEBUG - Event doc-subitems-start.aws: calling handler <bound method ProviderDocumentEventHandler.doc_subitems_start of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,488 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.acm: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,488 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.apigateway: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,488 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.autoscaling: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,489 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.cloudformation: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,489 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.cloudfront: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,489 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.cloudhsm: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,489 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.cloudsearch: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,489 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.cloudsearchdomain: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,490 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.cloudtrail: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,490 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.cloudwatch: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,490 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.codecommit: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,490 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.codepipeline: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,490 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.cognito-identity: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,491 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.cognito-idp: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,491 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.cognito-sync: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,491 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.configservice: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,491 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.configure: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,491 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.datapipeline: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,491 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.deploy: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,492 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.devicefarm: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,492 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.directconnect: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,492 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.dms: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,492 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.ds: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,493 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.dynamodb: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,493 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.dynamodbstreams: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,493 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.ec2: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,493 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.ecr: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,493 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.ecs: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,494 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.efs: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,494 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.elasticache: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,494 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.elasticbeanstalk: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,494 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.elastictranscoder: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,494 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.elb: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,495 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.emr: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,495 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.es: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,495 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.events: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,495 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.firehose: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,495 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.gamelift: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,496 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.glacier: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,496 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.help: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,496 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.iam: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,496 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.importexport: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,496 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.inspector: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,497 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.iot: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,497 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.iot-data: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,497 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.kinesis: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,497 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.kms: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,497 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.lambda: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,497 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.logs: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,498 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.machinelearning: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,498 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.marketplacecommerceanalytics: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,498 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.meteringmarketplace: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,498 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.opsworks: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,499 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.rds: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,499 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.redshift: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,499 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.route53: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,499 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.route53domains: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,499 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.s3: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,500 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.s3api: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,500 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.sdb: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,500 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.ses: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,500 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.sns: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,500 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.sqs: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,501 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.ssm: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,501 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.storagegateway: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,501 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.sts: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,501 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.support: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,501 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.swf: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,502 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.waf: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,502 - MainThread - botocore.hooks - DEBUG - Event doc-subitem.aws.workspaces: calling handler <bound method ProviderDocumentEventHandler.doc_subitem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,503 - MainThread - botocore.hooks - DEBUG - Event doc-relateditems-start.aws: calling handler <bound method ProviderDocumentEventHandler.doc_relateditems_start of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,503 - MainThread - botocore.hooks - DEBUG - Event doc-relateditem.aws.aws help topics: calling handler <bound method ProviderDocumentEventHandler.doc_relateditem of <awscli.clidocs.ProviderDocumentEventHandler object at 0x7f9fae9519d0>>
2016-05-05 16:32:19,566 - MainThread - awscli.help - DEBUG - Running command: ['groff', '-m', 'man', '-T', 'ascii']
2016-05-05 16:32:19,582 - MainThread - awscli.help - DEBUG - Running command: ['less', '-R']
2016-05-05 16:32:19,584 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 186, in main
return command_table[parsed_args.command](remaining, parsed_args)
File "/usr/local/lib/python2.7/dist-packages/awscli/help.py", line 264, in __call__
self.renderer.render(self.doc.getvalue())
File "/usr/local/lib/python2.7/dist-packages/awscli/help.py", line 82, in render
self._send_output_to_pager(converted_content)
File "/usr/local/lib/python2.7/dist-packages/awscli/help.py", line 130, in _send_output_to_pager
p = self._popen(cmdline, stdin=PIPE)
File "/usr/local/lib/python2.7/dist-packages/awscli/help.py", line 91, in _popen
return Popen(*args, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
2016-05-05 16:32:19,587 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255
[Errno 2] No such file or directory
So I installed less:
root@redacted:~# apt-get install -y -qq less
Ran help again and it worked:
root@redacted:~# aws help
root@redacted:~# echo $?
0
(yes, I know that not having less installed is pretty rare but I thought I should report the bug anyway)
Interesting. I think for this case we can either have a better error message or fall back to or just print it all out without a pager.
Hi, this is still reproducible even though the issue has been closed.
To reproduce:
docker pull python:2.7
# ...
docker run -ti python:2.7 /bin/bash
root@some_container_id # pip install awscli
# ...
aws help
By the looks of it, it seems groff is a hard dependency needed by aws.
Which leads me to a question: shouldn't the tool take care of this?
More info:
aws-cli/1.11.8 Python/2.7.12 Linux/4.4.24-boot2docker botocore/1.4.65
why is it trying to run a pager? surely the unix was is to pip the output to a pager (a pager of our choice) if we want one. Or even to look at $PAGER and use that?
I just installed awscli and got the groff error so this issue isn't fixed:
root@27615407f778:/app# aws help
Could not find executable named "groff"
note that installing groff brings a ton more packages that I can't see why awscli would need:
The following extra packages will be installed:
dbus fonts-droid ghostscript groff-base gsfonts libavahi-client3 libavahi-common-data libavahi-common3 libcap-ng0 libcups2 libcupsfilters1 libcupsimage2 libdbus-1-3 libgs9
libgs9-common libijs-0.35 libjbig2dec0 libnetpbm10 libpaper-utils libpaper1 libxaw7 libxmu6 netpbm poppler-data psutils
A headless server now installs printing libraries when it will never connect to a printer? Also ghostscript? why?
I also have the same problem installing the aws-cli in an amazonlinux container using these commands:
docker pull amazonlinux
docker run -it amazonlinux:latest /bin/bash
yum -y install unzip
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Then as I run aws I see the same error related to groff
bash-4.2# aws --version
aws-cli/1.11.35 Python/2.7.12 Linux/4.8.15-moby botocore/1.4.92
bash-4.2# aws help
Could not find executable named "groff"
Having this problem as well while running on dockerized debian arm linux on a headless raspberry pi (ssh console).
Installed groff (less was already present) and gave aws help another try... and got a less screen of emptyness. So something is still broken. Hmm...
Ok, since man was missing but also uses less, I installed it and found that man grep for instance also results in a blank field of text. I suspect something isn't working with nroff/groff in my environment.
root@raspberrypi-bbe731b:/# nroff -man -Tascii /usr/share/man/man1/grep.1.gz
groff: can't find `DESC' file
groff:fatal error: invalid device `ascii'
After reviewing the archaeological records of ancient unix mailing lists indexed by google, I discovered what groff was trying to tell me - it couldn't find the needed output "device" files (ascii and utf8 in this case) nor their descriptions (DESC files). These should be available, logically enough, at /usr/share/groff/current/font/...
root@raspberrypi-bbe731b:/# ls -la /usr/share/groff/
total 0
drwxr-xr-x 1 root root 0 Jan 6 18:16 .
drwxr-xr-x 1 root root 230 Jan 6 18:16 ..
Why did apt-get leave this directory empty? Because the extra-slim base image of raspian I'm using asks dpkg to skip installing any of groff's shared files.
After commenting-out the line path-exclude /usr/share/groff/*from /etc/dpkg/dpkg.cfg.d/01_nodoc
root@raspberrypi-bbe731b:/usr/share/groff# apt-get install --reinstall groff-base
Reading package lists... Done
...
Setting up groff-base (1.22.2-8) ...
root@raspberrypi-bbe731b:/usr/share/groff# ls current/font/
devascii devlatin1 devps devutf8
root@raspberrypi-bbe731b:/app# man cat
CAT(1) User Commands CAT(1)
NAME
cat - concatenate files and print on the standard output
------
root@raspberrypi-bbe731b:/app# aws help
AWS() AWS()
NAME
aws -
DESCRIPTION
The AWS Command Line Interface is a unified tool to manage your AWS
services.
YAY.
In conclusion, aws help initially didn't work for two reasons:
- groff wasn't installed (would be nice if
pip install awshad complained) - groff shared libs weren't installed with groff for arcane reasons relating to my distro.
Could not find executable named "groff"
The end of 2018 - AWS CLI still doesn't work out of box...
For alpine linux run apk add groff less.
My working Dockerfile - any further suggestions?
FROM python:3.6.7-jessie
RUN apt-get update -y
RUN apt-get install groff -y
RUN pip install awscli
The dependency on groff adds CRAZY large amount of storage requirements :(
We also base on a python Docker (slim) version, and when we install groff it adds nearly 160MB!
(app) root@7548cfaf4acd:/app# apt install groff less
(snip)
Need to get 47.8 MB of archives.
After this operation, 158 MB of additional disk space will be used.
Do you want to continue? [Y/n]
And a bunch of lbirary deps are missing from debian archives
Unable to fetch some archives, maybe run apt-get
libgs9-common, libglib2.0-0, libgs9, ghostscript, libdbus-1-3, dbus, libcups2, libcupsimage2, libglib2.0-data, xdg-user-dirs, ...
All these packages seem highly unlikely to actually be required.
So far I don't see any formal requirement to add groff as a dependency (which is good if it will take 160MB+). Maybe awscli needs to move away from that dependency instead.
I have this issue on cli v2:
root@8cb4555a5708:~# aws2 lambda update-function-code --function-name FarmFoods2_InboundEvent_NewOrder --s3-bucket farmfoods2 --s3-key build-pipeline/lambda_function.zip --region us-east-1
[Errno 2] No such file or directory: 'less': 'less'
Version:
root@8cb4555a5708:~# aws2 --version
aws-cli/2.0.0dev3 Python/3.7.3 Linux/4.14.154-boot2docker botocore/2.0.0dev2
Installing less (apt-get install less) fixes the issue.
Error message is a bit cryptic, should be fixed imo.
aws help commands appear broken completely in python:3.8-slim, even with groff, groff-base, and less packages installed. Symptoms are similar to @100ideas comment here
Reproduced with the following Dockerfile:
FROM python:3.8-slim
ENV AWSCLI_VERSION >=1.11,<1.12
ENV AWS_DEFAULT_REGION us-east-1
# Install groff + less so `help` works
RUN apt-get update && apt-get install -y groff groff-base less && apt-get install -y wget && apt-get clean
# Install awscli
RUN pip install "awscli${AWSCLI_VERSION}"
Solution
Add the following to the Dockerfile, before installing groff, groff-base, and less:
RUN sed -i'' -e '/^path-exclude \/usr\/share\/groff\/\*/d' /etc/dpkg/dpkg.cfg.d/docker
Just in case someone else runs into this. I also see this with the new SDK (on Ubuntu 16.04 docker image).
:/# aws help
Could not find executable named "groff"
:/# aws --version
aws-cli/2.0.46 Python/3.7.3 Linux/4.14.186-146.268.amzn2.x86_64 exe/x86_64.ubuntu.16
Install groff fixes it.
apt install groff.
I also saw this just now when running aws help in a debian:buster Docker build image. I don't need to run the help command in the container, so it's not a big deal for me, unless other commands also depend on it (I hope not).
For the people installing groff: You should probably use --no-install-recommends to avoid installing all the ghostscript, imagemagick, fonts, and printer related stuff that isn't needed at all.
Without recommended packages (only groff, groff-base, and libuchardet0 would be installed in this case):
root@405a8ff32f21:/opt/atlassian/bitbucketci/agent/build# apt-get --no-install-recommends --dry-run install groff
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
groff-base libuchardet0
Recommended packages:
ghostscript imagemagick libpaper1 netpbm psutils
The following NEW packages will be installed:
groff groff-base libuchardet0
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
...
Versus with recommendations, that's where the 160 MB are coming from:
root@405a8ff32f21:/opt/atlassian/bitbucketci/agent/build# apt-get --dry-run install groff
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
fonts-droid-fallback fonts-noto-mono ghostscript groff-base gsfonts imagemagick imagemagick-6-common imagemagick-6.q16 libcupsfilters1
libcupsimage2 libde265-0 libdjvulibre-text libdjvulibre21 libfftw3-double3 libgs9 libgs9-common libheif1 libijs-0.35 libilmbase23 libjbig2dec0
libjxr-tools libjxr0 liblqr-1-0 libltdl7 libmagickcore-6.q16-6 libmagickcore-6.q16-6-extra libmagickwand-6.q16-6 libnetpbm10 libnuma1
libopenexr23 libopenjp2-7 libpaper-utils libpaper1 libuchardet0 libwebpmux3 libwmf0.2-7 libx265-165 netpbm poppler-data psutils
Suggested packages:
fonts-noto ghostscript-x imagemagick-doc autotrace cups-bsd | lpr | lprng enscript ffmpeg gimp gnuplot grads graphviz hp2xx html2ps libwmf-bin
mplayer povray radiance sane-utils texlive-base-bin transfig ufraw-batch xdg-utils libfftw3-bin libfftw3-dev inkscape libwmf0.2-7-gtk
poppler-utils fonts-japanese-mincho | fonts-ipafont-mincho fonts-japanese-gothic | fonts-ipafont-gothic fonts-arphic-ukai fonts-arphic-uming
fonts-nanum
The following NEW packages will be installed:
fonts-droid-fallback fonts-noto-mono ghostscript groff groff-base gsfonts imagemagick imagemagick-6-common imagemagick-6.q16 libcupsfilters1
libcupsimage2 libde265-0 libdjvulibre-text libdjvulibre21 libfftw3-double3 libgs9 libgs9-common libheif1 libijs-0.35 libilmbase23 libjbig2dec0
libjxr-tools libjxr0 liblqr-1-0 libltdl7 libmagickcore-6.q16-6 libmagickcore-6.q16-6-extra libmagickwand-6.q16-6 libnetpbm10 libnuma1
libopenexr23 libopenjp2-7 libpaper-utils libpaper1 libuchardet0 libwebpmux3 libwmf0.2-7 libx265-165 netpbm poppler-data psutils
0 upgraded, 41 newly installed, 0 to remove and 0 not upgraded.
...
Fixed this by upgrading the CLI version
On Mac, upgrading cli with pip install awscli --upgrade wasn't enough.
Also had to install the dependency explicitly with brew install groff
aws-cli/2.8.8 Python/3.10.8 Darwin/22.1.0 source/x86_64 prompt/off still getting Could not find executable named "groff"
On Mac, upgrading cli with
pip install awscli --upgradewasn't enough. Also had to install the dependency explicitly withbrew install groff
sadly that this works, you have to install groff and its dependencies
I ran below commands and it worked for me.
sudo apt-get update -y
sudo apt-get install groff -y