# Error on service nginx start: type problem on Linuxmint

**URL:** <https://forum.ansible.com/t/error-on-service-nginx-start-type-problem-on-linuxmint/14953>\
**Category:** Ansible Project\
**Created:** [April 7, 2014, 12:35pm UTC](https://forum.ansible.com/t/error-on-service-nginx-start-type-problem-on-linuxmint/14953 "2014-04-07T12:35:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andre\_Torgal](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@Andre\_Torgal](https://forum.ansible.com/u/Andre_Torgal)\
**Post date:** [April 7, 2014, 12:35pm UTC](https://forum.ansible.com/t/error-on-service-nginx-start-type-problem-on-linuxmint/14953/1 "2014-04-07T12:35:17Z")

</div>

First post here.

In one of my hosts I have a permanent error on nginx service start.

Everything else works just fine, and the same playbook also runs fine on different servers. Starting the server from the console on the faulty server, same user, sudo, also works fine.

Tried both _sudo /etc/init.d/nginx start_ and _sudo service nginx start_ and the status code is 0 regardless of server being previously stopped or running.

This is my odd (I know, I know) server:

> Linux mint 3.11-2-amd64 #1 SMP Debian 3.11.8-1 (2013-11-13) x86\_64 GNU/Linux

And here’s the error:

> TASK: [nginx | nginx - start service] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> failed: [mint] =\> {“failed”: true, “item”: “”, “parsed”: false}  
> invalid output was: SUDO-SUCCESS-txcnkccpngclcijsbpywbprpyxggmdar  
> Traceback (most recent call last):  
> File “/home/andrezero/.ansible/tmp/ansible-tmp-1396873336.34-192134182273642/service”, line 2411, in   
> main()  
> File “/home/andrezero/.ansible/tmp/ansible-tmp-1396873336.34-192134182273642/service”, line 1184, in main  
> service.service\_enable()  
> File “/home/andrezero/.ansible/tmp/ansible-tmp-1396873336.34-192134182273642/service”, line 619, in service\_enable  
> d = self.get\_systemd\_status\_dict()  
> File “/home/andrezero/.ansible/tmp/ansible-tmp-1396873336.34-192134182273642/service”, line 483, in get\_systemd\_stat  
> us\_dict  
> self.module.fail\_json(‘failure %d running systemctl show for %r: %s’ % (self.\_\_systemd\_unit, rc, err))
> 
> TypeError: %d format: a number is required, not str  
> FATAL: all hosts have already failed – aborting

the fault seems to be at _get\_systemd\_status\_dict_ and why would seriously consider looking at the source code, ven with my puny python skills, and search for this “number” not “string” requirement, but … /tmp/ file is deleted after execution.

Help anyone?

Thanks!

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [April 9, 2014, 1:36pm UTC](https://forum.ansible.com/t/error-on-service-nginx-start-type-problem-on-linuxmint/14953/2 "2014-04-09T13:36:19Z")

</div>

Tracebacks are to be considered bugs.

If this is occuring on 1.5.4 or the devel branch, can you please file a ticket at [github.com/ansible/ansible](http://github.com/ansible/ansible)?

Thank you!
