Problem with user services (creating a service for mpdas)

Hi, I'm using mpd and using a user service to start it.
However, I'm trying to create a service for mpdas (a mpd client for last.fm) and getting some errors:
currently, my mpdas.service is as following:
[Unit]
Description=AudoScrobbler client for MPD
After=mpd.service
[Service]
ExecStart=/usr/bin/mpdas
[Install]
WantedBy=default.target
Which giving me the following errors:
(14:49:55) [ERROR] You are not root. Not changing user ..
(14:49:55) [INFO] Connected to MPD.
(14:49:56) [INFO] Last.fm handshake successful. SessionID: ...
terminate called after throwing an instance of 'std::ios_base::failure'
  what():  basic_filebuf::underflow error reading the file
Aborted
Which are the same errors I get if I run just "mpdas" instead of running it with sudo.
If I use it as a root service (instead of a user service) it fails on startup, but works fine when I restart the server.
So, I'm assuming:
1) mpdas needs root permission
2) if used as a root service, it fails at startup cause the mpd service (enabled as a user service) hasn't started yet
3) if used as a user service, it fails cause it needs root permission
What's the 'correct' way to solve this? (I believe mpdas should be a user service, cause it runs with a config that is just for my user).
Is there a way to make a user service run with root privileges?
I couldn't figure out the best way to configure it.
Last edited by alv-r- (2014-11-29 18:37:56)

TheSaint wrote:Why should it fails with sudo?
It works only with sudo. It was failing as a system service because it needs mpd, which I configured as an user service. Then when systemd starts the system services (when booting) there's not mpd instance running and it fails.
TheSaint wrote:Doesn't it works with fakeroot ?
As a noob, I don't know exactly how fakeroot works, I'll take a better look at it, but running it with fakeroot takes rid of the errors I was getting when not running as sudo.
The problem I have now is that it still fails on startup, but there isn't any helpful (or unhelpful) message. It just shows the PID and says it failed.
If I run
systemctl --user start mpdas
it works well though. Any ideas of why this happens?
My current unit file looks like this:
[Unit]
Description=AudoScrobbler client for MPD
After=mpd.service
Requires=mpd.service
[Service]
ExecStart=/usr/bin/fakeroot /usr/bin/mpdas
[Install]
WantedBy=default.target
Raynman wrote:Why does it need root privileges? Maybe you just need to configure it properly to run under your normal user?
Seeing the options in the man page and the config options for the config file, I don't see any that could do the trick.
I'll send a message to the developer with the error I'm getting (when not running as sudo).
Last edited by alv-r- (2014-11-29 18:36:59)

Similar Messages

  • Problem with users disabling ARD client service

    I've got a problem and i'm not quite sure of the work around. I'm a PC guy by nature and can't quite figure this out.
    I'm having a problem with users disabling the ARD service from the sharing menu. Unfortunately users need to have admin privleges to do their work so I can't simply give them a standard account.
    I've hidden the ARD user account i created from the login window through Netinfo, but I need to find a way to stop users from shutting the ard service down.
    They don't seem to understand that the company requires that it be on the computer. Now, I'm the one who is set as the admin for ARD in the building, however we really just use it to rollout drivers, install packages, and its a lifesaver for remotely fixing problems with programs. The company didn't really buy it to spy on the employee's.
    Is there any way to hide the service from an admin level account? Or keep them from shutting it down?
    BTW, this would have to be done on multiple machines running both panther and tiger.
    Any help would be appreciated as I'm not quite sure where to start.

    First, as a matter of policy, let them know this service is active, and needs to remain active. If they disobey this instruction and turn it off, you have a human resources issue, not a technical issue.
    Second, there are very few enterprise users that need admin access to their machines. Oh, they ALL think they do, and there will be howling when non-admin status is first imposed, but we have 350 users in a publishing environment with less that 20 setup as admins. Those users are almost all superusers who assist others in a technical role.
    We have far fewer software problems like this and with ARD, IT can install/ authorize installation of software remotely should a user need that. It simply does not dramatically impact our users to have non-admin access. On the other hand, we recognize that a FEW users will need more access, and grant that on a case-by-case basis.

  • Problem with BAPI_PO_Create1 to create a Service PO

    Hi,
    I use a piece of test to create a service's po with data:POHEADER,POHEADERX,POITEM,POITEMX,POSCHEDULE,POSCHEDULEX,POACCOUNT,POACCOUNTX and POSERVICES.
    In POSERVICES, I enter the data like this:
    LINE_NO                        0000000010
    OUTL_IND                      X
    QUANTITY                    100.000
    BASE_UOM                   EA
    GR_PRICE                     1,000.0000
    SHORT_TEXT               SERVICE1
    but when i excute it, the return with message:
    T ID                   NUM MESSAGE
    E BAPI                001 No instance of object type PurchaseOrder has been created. External reference:
    E MEPO              000 Purchase order still contains faulty items
    E SE                   029 Please maintain services or limits
    according to the third msg, I have maintain the value for it, why it said 'Please maintain services' ?
    Best Regards
    Steven

    Hello Steve
    The long text of message SE 029 says that
    "You cannot enter data until the PO item has been maintained correctly."
    Because the input for the item is still faulty you get this addtional error message.
    My recommendation is (because I am not a MM expert): Try to create a minimal service PO using the dialog transaction. All values you have to enter in dialog are needed for the BAPI, too. Perhaps then you spot the missing piece of information.
    Regards
      Uwe

  • I have the problem with the eFax Create Account button being grayed out for my newly purchased 6525.

    I have the problem with the eFax Create Account button being grayed out for my newly purchased 6525.
    Can you help?

    Hi Marv13, disregard my last post. The 6520 does have eFax capabilities and the support document I provided a link to needs updating. If you contact HP Cloud Services phone support they will be able to resolve this issue for you. The number and available times are posted below:
    HP Cloud Services
    1-855-785-2777
    Hours of Operation
    Monday-Friday 8am-11pm ET
    Saturday 10am-6:30pm ET
    Best.
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

  • HT5262 I update to IOS 6.1.3 in my Iphone 4S and don't saved SHSH an APtickets, after it I experiment a problems with my Idevice, it show service provider but don't show signal in any place,I want to know if its posible repair my device

    I update to IOS 6.1.3 in my Iphone 4S and don't saved SHSH an APtickets, after it I experiment a problems with my Idevice, it show service provider but don't show signal in any place,I want to know if its posible repair my device

    anduran wrote:
    I update to IOS 6.1.3 in my Iphone 4S and don't saved SHSH an APtickets, after it I experiment a problems with my Idevice, it show service provider but don't show signal in any place,I want to know if its posible repair my device
    Basic  troubleshooting
    Reset
    Restore with back up and if required as new

  • Problem with your Xperia Z1 and Service Centre NOT Helpful

    Hi, 
    If you are from India and If you are an Xperia Z1 owner, and facing problems with your phone and the service centre and customer care totally unhelpful, Contact me. We are starting a self help forum very soon. 
    If you feel you have been cheated by Sony, Contact me. Let us sort it out.

    thereis already a self-help forum
    two, actually
    the one is this one
    the other is xda-developers, who probably will tell you to install cyanogenmod, go into recovery and delete dalvik cache three times

  • Since i have upgraded my i phone5 to 7.0.3 it has problem with 3g it display the service message every time, it reduce the battery life also.

    since i have upgraded my i phone5 to 7.0.3 it has problem with 3g it display the service message every time, it reduce the battery life also.

    Try using Settings > General > Reset > Reset All Settings.

  • 502 - Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream cont

    I am getting error while accessing url of lyncweb.domain.com, dialin.domain.com and meet.domain.com pointing to RP server.
    502 - Web server received an invalid response while acting as a gateway or proxy server.
    There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.
    Regards, Ganesh, MCTS, MCP, ITILV2 This posting is provided with no warranties and confers no rights. Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread.

    When i try with https://lyncfrontend.domain.local:4443 and https://lyncfrontend.domain.com:4443 both opens but when i open the external domain name i get certificate .
    ARR version installed is 3.0
    To throw more light on the configuration:
    Lync 2013 implemented, internal domain name is : domain.local and external domain name is : domain.com
    All servers in VMs are with 4 core processor, 24gb ram, 1TB drive.
    Frontend : Windows 2012r2 with Lync 2012 Standard Edition - 1 No (192.168.10.100)
    Edge : Windows 2012 with Lync 2012 Std - 1 No 
    (192.168.11.101 DMZ) in workgroup
    ISS ARR Reverse Proxy 3.0 : Windows 2012 with ARR and IIS configured. (192.168.11.102)
    Certificate : Internal Domain root CA for internal and External (Digicert).
    Internal Network : 192.168.10.x /24
    External Network (DMZ) : 192.168.11.x /24
    Public Firewall NAT to DMZ ip for firewall and RP server. So having two public IP facing external network.
    Edge has : sip.domain.com, webconf.domain.com, av.domain.com
    IIS ARR RP server has : lyncdiscover.domain.com, lyncweb.domain.com, meet.domain.com, dialin.domain.com
    Have created SRV record in public : _sip.tls.domain.com >5061>sip.domain.com, _sipfederationtls._tcp.domain.com>5061>sip.domain.com, _xmpp-server._tcp.domain.com>5269>sip.domain.com
    Installed frontend server using MS Lync server 2013 step by step for anyone by Matt Landis, Lync MVP.
    Internal AD Integrated DNS pointing Front-end
    Type of Record FQDN
    IP Description 
    A sip.domain.com
    192.168.10.100 Address internal Front End  or Director for internal network clients 
    A admin.domain.com
    192.168.10.100 URL Administration pool
    A DialIn.domain.com
    192.168.10.100 URL Access to Dial In 
    A meet.domain.com
    192.168.10.100 URL of Web services meeting
    A lyncdiscoverinternal.domain.com
    192.168.10.100 Register for Lync AutoDiscover service to internal users
    A lyncdiscover.domain.com
    192.168.10.100 Register for Lync AutoDiscover service to external users  
    SRV Service: _sipinternaltls Protocol: _tcp Port: 5061
    sip.domain.com Record pointer services to internal customer connections using TLS 
    External DNS pointing Edge & Proxy
    Type of Record FQDN
    IP Endpoint
    A sip.domain.com
    x.x.x.100 Edge
    A webconf.domain.com
    x.x.x.100 Edge
    A av.domain.com
    x.x.x.100 Edge
    SRV _sip._tls.domain.com
    sip.domain.com: 443 Edge
    SRV _sipfederationtls._tcp.domain.com
    sip.domain.com:5061 Edge
    A Meet.domain.com
    x.x.x.110 Reverse Proxy
    A Dialin.domain.com
    x.x.x.110 Reverse Proxy
    A lyncdiscover.domain.com
    x.x.x.110 Reverse Proxy
    A lyncweb.domain.com
    x.x.x.110 Reverse Proxy
    In IIS ARR proxy server following server farms are added and configured as per link ttp://y0av.me/2013/07/22/lync2013_iisarr/
    In proxy server had setup only following server farm : While running remote connectivity web service test : meet, dialin, lyncdiscover and lyncweb.
    The client inside works fine internally and through vpn. Login with external client also working fine. But we are getting error in MRCA as follows.
    a) While testing remote connectivity for lync getting error : The certificate couldn't be validated because SSL negotiation wasn't successful. This could have occurred as a result of a network error or because of a problem with the certificate installation.
    Certificate was installed properly.
    b) For remote web test under Lync throws error : A Web exception occurred because an HTTP 502 - BadGateway response was received from IIS7.
    HTTP Response Headers:
    Content-Length: 1477
    Content-Type: text/html
    Date: Wed, 14 May 2014 10:03:40 GMT
    Server: Microsoft-IIS/8.0
    Elapsed Time: 1300 ms.
    Regards, Ganesh, MCTS, MCP, ITILV2 This posting is provided with no warranties and confers no rights. Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread.

  • Hi, I have a problem with getting my apple Id working for me. It's been 2 months since it happened and Apple failed to act. I can tell my story proerly, but am not sure, you guys can help, so I just copy my message to them today, I am trying to get it acr

    Hi, I have a problem with getting my apple Id working for me. It's been 2 months since it happened and Apple failed to act. I can tell my story proerly, but am not sure, you guys can help, so I just copy my message to them today, I am trying to get it across all the places around to pay their attention. This is a desperate move, so if you are not the right people to help me to get my message accross, may be you can advise where can I go.
    Thank you, and sorry for the language.
    Vitas Dijokas
    I am sorry to say that, but your security makes my life miserable – it’s been 2 months since my Apple ID account got stuck, and since then I cannot update 37 applications (to date), i.e. most of my applications. Half of them I bought. I also paid for iCloud, and it is not working. I paid money and I am stuck with old applications and no iCloud. Your security *****. Your service ***** too. It took your service 1 month to finally understand why this happened to me, and it took me tens of emails to you and 3 hours of telephone conversation to find out the reason for my problem. And the problem is still not fixed. NOT FIXED. You just leave your customer – the one who paid you money and spent so much time with you trying to help you help me – and nothing. You tell me:  “Vitas, Stick your stinky iphone in your *** and enjoy life, we do not care!” *************.
    It is ******* outrageous, and you should know that,  guys. Get into the ******* database and correct the bug. Get someone in the partners-telephone carriers company (it is Orange as carreer and Cellcom as seller of the phone)  authorized to Identify me in personal encounter in one of the branches in Israel (where I live) and make sure it is really me, and get the ******* system accept my password and let me use my phone.
    Otherwise **** off. None of my friends will get my advise to buy an iphone or any of apple products. And I think you should be very attentive to cases like this, guys. Do your work for the money we pay, or disappear. There are many others eager to take your place, and if the problem is not fixed I will eventually go to the others. My patience is lost, and as soon as I can afford another phone I will change it. AND I WILL TRY TO GIVE BAAAAAD PUBLICITY TO APPLE – I am threatening here, so ACT NOW.
    Vitas Dijokas

    Well, it seems waiting is not my strong suit..! I renamed a javascript file called recovery to sessionstore. This file was in the folder sessionstore-backups I had copied from mozilla 3 days ago, when my tabs were still in place. I replaced the sessionstore in mozilla's default folder with the renamed file and then started mozilla. And the tabs reappeared as they were 3 days ago!
    So there goes the tab problem. But again when I started mozilla the window saying "a script has stopped responding" appeared, this time the script being: chrome//browser/contenttabbrowser.xml2542
    If someone knows how to fix this and make firefox launch normally, please reply! Thank you

  • SCOM - -500 Internal Server Error - There is a problem with the resource you are looking for, and it cannot be displayed

    Hi There,
    Need your assistance on the issue that we are facing in prod environment.
    We are able to open web console from remote machine and able to view monitoring pane as well as my workplace folders from console . Able to view and access alerts and other folder in the monitoring pane. We are able to view and access My Workplace folder
    and able to view the reports in Favorite Reports folder. But when I click on run Report we  are getting the below error  "500 Internal Server Error - There is a problem with the resource you are looking for, and it cannot be displayed."
    In our environment we have 3 servers one is SQL server and two are SCOM servers. Please advise how to fix this issue. Do we have to do any thing from SQL End?
    Errors: Event ID 21029: Performance data from the OpsMgr connector could not be collected since opening the shared data failed with error "5L".
     Event ID 6002 : Performance data from the Health Service could not be collected since opening the shared data failed with error 5L (Access is denied.).
    Regards,
    Sanjeev Kumar

    Duplicate thread:
    http://social.technet.microsoft.com/Forums/en-US/7675113e-49f0-4b3a-932b-4aceb3cfa981/scom-500-internal-server-error-there-is-a-problem-with-the-resource-you-are-looking-for-and-it?forum=operationsmanagerreporting
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Trial version problem with the wrie Create with the trial version

    help me
    trial version problem with the write Create with the trial version
    i wanna delete the Create with the trail version

    Publication on businCata I am sorry I do not understand your inquiry.  Can you please restate your question?  What Adobe software or service is your inquiry in relation too?

  • Problem with user mapping

    Hello,
    We got a problem with user-mapping to a SAP system.
    We create a SAp system, and an alias to this system.
    We add a user mapping for the administrator (user, not group). Check for connector is OK.
    Now, we make the same user-mapping for a group.
    if the user also belongs to the group "administrator" this mapping works, otherwise this fail with a message <b>"com.sapportals.portal.ivs.cg.SystemNotFoundException: Got null system object for alias R3HR".
    </b>After checking, there is no user-mapping for the "administrator" group, nor for the roles that belong to that group, nor for the user.
    So, it seem that the alias is only visible for an admin.
    does any one got an idea ? we are on SP14, Linux.
    regards
    Guillaume PATRY

    HI Guillaume,
    The user mapping is available for both Admin as well as end users.
    Open your system from System Administration>System Configuration>System Landscape.
    In the property editor,in dropdown for property category,
    select the logon method as UID?password and User Mapping type to admin/user.
    Then you can create a Group,map the system alias for this group and add users to this group.
    Also,in the property editor for the system,from dropdown for display,select permissions , and add the group to asssigned permissions as READ ONLY and select the checkbox for ENDUSER.
    Hope,this resolves your problem.
    Regards,
    Siddhartha

  • Really having problems with organising documents in pages. For example, deleting pages deletes the whole section and I cannot insert a section break as its greyed out & sending an object to background deletes several pages - what the **** is going on???

    Really having problems with organising documents in pages. For example, deleting pages deletes the whole section and I cannot insert a section break as its greyed out & sending an object to background deletes several pages and trying to insert a text box autmatically creates new pages- what the **** is going on??? Is this programme really this badly thought out? I thought everything apple was supposed to be intuitive!?!?!? Help.

    You can not insert a section break into a textbox.
    You appear to have a lot of objects with wrap set, that once you take them out of the flow of text (by sending them to the background) causes the text to reflow and contract into fewer pages. Pages is almost unique in the way it forms up pages in Word Processing mode only so long as there is text on them.
    I suspect you probably have hammered away at returns, spaces and tabs as well to position things, which only works to add to the mess.
    Download the Pages09_UserGuide.pdf available under the Help menu and swot up a bit on how it works.
    You may find this a usueful resource as well:
    http://www.freeforum101.com/iworktipsntrick/
    Peter
    PS There is quite a lot of programming in OSX that is far from "intuitive". Pages is easy at one level, when using the templates, otherwise it can be quite frustrating.

  • Problem with user number

    Goodmorning, I have a problem with user number of my smartphone Blackberry Curve 8900: when I call a numer of my adress book, on the right,  appears a user number, that I don't know. Why dont'appears mine? I don't have buy this smartphone personally, but I had it (used) through the smartphone's owner...I think that the user number that appears on my display is his. How I can do to remove it?
    Waiting for an answer, thank you.

    Hello scricciolina90
    Welcome To Support Forums
    On or Curve 8900 from the Home screen > click Options > Click Advanced Settings > SIM Card > Highlight the phone number > Press the Menu key and click Edit SIM Phone Number > Check that field or Enter you Mobile number in that field .
    Good luck.
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • We have version 10.5.8 photoshop CS3 for Mac. How do we fix a problem with photoshop not resizing dpi? For example we resized a 72 dpi image to 200 dpi, when we do a pdf analysis it read as 344 dpi.

    We have version 10.5.8 photoshop CS3 for Mac. How do we fix a problem with photoshop not resizing dpi? For example we resized a 72 dpi image to 200 dpi, when we do a pdf analysis it read as 344 dpi.

    Sounds like it's a problem with the Acrobat settings. Did you set them to the same resolution?

  • Problem with user-defined functions in XQuery String

    hello
    i've a problem with user-defined functions in XQuery String
    details are here (the code is not Human-readable via forum's embedded editor ?? strange)
    http://docs.google.com/Doc?id=ddqwddsr_21c96d9x
    thanks !!

    See
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        return {$inputtype}
                     local:test_function("1","2")' returning content) o from dual
    Error at line 5
    ORA-19114: error during parsing the XQuery expression:
    LPX-00801: XQuery syntax error at '{'
    3                       return {$inputtype}
    -                              ^
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        $inputtype
                     local:test_function("1","2")' returning content) o from dual
    O   
    2   
    1 row selected.

Maybe you are looking for

  • Oracle 11g RAC on RHEL 4.0, error on 1 Node while running ./root.sh for CRS

    Hi, I am trying to install Oracle 11g RAC on RHEL 4.0 on Vmware and at the end of CRS installation when installer asks to run the two scripts (orainstRoot.sh and root.sh) on one node (on the node where runInstaller is started) throws following error

  • Version 8.5 and Version 11.5 on same machine

    Post Author: ashleyp CA Forum: Older Products I've heard that loading version 8.5 and version 11.5 on the same pc can be done, but the loading needs to be done in a particular order.  Does anyone have experience with this? Thanks, Ashley

  • Saveable form: I can save it, others can't

    I asked about this in an earlier topic but I haven't received an answer, so I hope that starting a fresh topic will help. I'm using Acrobat XI Pro. I created a form, then created a copy with File > Save as Other > Reader Extended PDF > Enable More To

  • Howto increase log recovery speed?

    We created a copy of our production MaxDB (2,8 TB) to have a shadow database. When I apply the logs (via script) I find out, that the shadow database is not able to "keep up" with the number of logs produced in the production. I figured out so far th

  • Create a WM managed storage location

    I have created a new Storage location which I would like to use to transfer materials to a warehouse storage bin. How do I make it so that a storage location is connected to my warehouse?  This is so that I can use MIG to transfer materials from a no