• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Can't open PID file (yet?) after start: Operation not permitted

Scheduled Pinned Locked Moved Unsolved Technical Support
3 Posts 3 Posters 5.5k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • navjotjsinghN Offline
    navjotjsinghN Offline
    navjotjsingh
    wrote on last edited by
    #1

    I am trying to set the service using the following file

    [Unit]
    Description=NodeBB
    Documentation=https://docs.nodebb.org
    After=system.slice multi-user.target postgresql.service
    
    [Service]
    Type=forking
    User=nodebb
    
    StandardOutput=syslog
    StandardError=syslog
    SyslogIdentifier=nodebb
    
    Environment=NODE_ENV=production
    WorkingDirectory=/var/www/html/nodebb
    PIDFile=/var/www/html/nodebb/pidfile
    ExecStart=/usr/bin/env node loader.js
    Restart=always
    
    [Install]
    WantedBy=multi-user.target
    

    Nodebb starts alright but I keep seeing this error in the service status.

    nodebb.service: Can't open PID file /var/www/html/nodebb/pidfile (yet?) after start: Operation not permitted
    

    The permissions of the pidfile are as follows.

    -rw-r--r-- 1 nodebb nodebb 5 Sep 11 13:12 /var/www/html/nodebb/pidfile
    

    I am trying to run on Ubuntu 22.04 server. Can you guide me on how to go about fixing this?

    phenomlabP julianJ 2 Replies Last reply
    0
  • phenomlabP Online
    phenomlabP Online
    phenomlab
    replied to navjotjsingh on last edited by
    #2

    @navjotjsingh does the account you are running the service under have permissions to access the PID file location?

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    replied to navjotjsingh on last edited by
    #3

    @navjotjsingh Are you able to successfully start and stop NodeBB via systemctl?

    If so, then you can safely ignore that error. It usually means systemd didn't wait long enough before checking if the pidfile was created. Systemd usually checks again in a short while (but won't report it as it's not an error once it finds the file)

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development