Bisa / factorio-init

Factorio init script
MIT License
417 stars 81 forks source link

Factorio.pid #50

Closed abauske closed 8 years ago

abauske commented 8 years ago

I'm sorry that I have to create that new issue but googling didn't lead to a solution, therefor I'm guessing this is a bug. I get this error when trying service factorio start

# systemctl status factorio.service
● factorio.service - (null)
   Loaded: loaded (/etc/init.d/factorio)
   Active: failed (Result: exit-code) since Tue 2016-04-12 18:15:57 CEST; 30s ago
  Process: 8851 ExecStart=/etc/init.d/factorio start (code=exited, status=1/FAILURE)

Apr 12 18:15:57 vmd10967.contabo.host su[8865]: pam_unix(su:session): session closed for user factorio
Apr 12 18:15:57 vmd10967.contabo.host factorio[8851]: Check Permissions. Cannot write to /opt/factorio/Factorio.pid. Correct the permissions and then excute: /etc/init.d/factorio status
Apr 12 18:15:57 vmd10967.contabo.host su[8870]: Successful su for factorio by root
Apr 12 18:15:57 vmd10967.contabo.host su[8870]: + ??? root:factorio
Apr 12 18:15:57 vmd10967.contabo.host su[8870]: pam_unix(su:session): session opened for user factorio by (uid=0)
Apr 12 18:15:57 vmd10967.contabo.host su[8870]: pam_unix(su:session): session closed for user factorio
Apr 12 18:15:57 vmd10967.contabo.host factorio[8851]: Error! Unable to find any saves in /opt/factorio/saves
Apr 12 18:15:57 vmd10967.contabo.host systemd[1]: factorio.service: control process exited, code=exited status=1
Apr 12 18:15:57 vmd10967.contabo.host systemd[1]: Failed to start (null).
Apr 12 18:15:57 vmd10967.contabo.host systemd[1]: Unit factorio.service entered failed state.

in my factorio folder there is no Factorio.pid file! Is this file supposed to be generated? Or am I supposed to copy this file from somewhere else? System info: Debian headless server

Bisa commented 8 years ago

Check the permissions of you /opt/factorio folder (ensure the user has write permissions there) Also have a look further down, the binary does not seem to be able to access any saves in /opt/factorio/saves

abauske commented 8 years ago

I'm sorry it doesn't work for me! Contents of the folders including permissions: /opt/factorio:

# ls -l /opt/factorio
total 116
drwxr-xr-x 3 factorio factorio  4096 Apr 12 16:58 bin

drwxr-xr-x 2 factorio factorio  4096 Apr 12 18:09 config
-rw-r--r-- 1 factorio factorio   998 Jul 13  2015 config-path.cfg
drwxr-xr-x 4 factorio factorio  4096 Mar 23 17:07 data
-rw-r--r-- 1 factorio factorio 17035 Apr 12 19:00 factorio-current.log
-rw-r--r-- 1 factorio factorio 57363 Apr 12 18:09 factorio-previous.log
drwxr-xr-x 2 factorio factorio  4096 Apr 12 18:09 mods
-rw-r--r-- 1 factorio factorio   402 Apr 12 18:09 player-data.json
drwxrwxrwx 2 factorio factorio  4096 Apr 12 18:59 saves
drwxr-xr-x 3 factorio factorio  4096 Apr 12 18:59 temp

/opt/factorio/saves:

# ls -l /opt/factorio/saves/
total 9092
-rw-rw-rw- 1 factorio factorio 2162759 Apr 12 18:09 MP_Chris.zip
-rw-rw-rw- 1 factorio factorio 2395815 Apr 12 18:59 _autosave1.zip
-rw-rw-rw- 1 factorio factorio 2348084 Apr 12 18:55 _autosave2.zip
-rw-rw-rw- 1 factorio factorio 2392350 Apr 12 18:57 _autosave3.zip

factorio in /opt has rwxrwxrwx

Don't you worry I changed the permissions of folders factorio saves and contents of saves to rwxrwxrwx only for testing purposes but it didn't work either! Is there anything else I can try?

abauske commented 8 years ago

I'm so very sorry for wasting your time! I actually overlooked the ownership of /opt, well that was the problem! Thanks a lot for this tool!