headless server problem

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
ZiggyStardust
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Oct 17, 2016 2:34 am
Contact:

headless server problem

Post by ZiggyStardust »

I'm pretty new to factorio, trying to setup a headless server for first time.

My server is running Ubuntu 16.04.1 LTS.

I downloaded the 0.13.20 from https://www.factorio.com/download-headless/stable.

after unzipping it i cd into the factorio/bin/x64 dir and try running factorio. I get an error as if the file doesn't exist:

Code: Select all

~/factorio/bin/x64$ ls -al
total 74056
drwxrwxr-x 2 facto facto     4096 Oct 17 02:21 .
drwxrwxr-x 3 facto facto     4096 Oct 17 02:21 ..
-rwxr-xr-x 1 facto facto 75740024 Oct 14 17:08 factorio

Code: Select all

~/factorio/bin/x64$ ./factorio
-bash: ./factorio: No such file or directory
any ideas?
Thanks!
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: headless server problem

Post by daniel34 »

The headless binary only runs on 64-bit linux, check the output of uname -m to see if you are running the correct architecture.
quick links: log file | graphical issues | wiki
ZiggyStardust
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Oct 17, 2016 2:34 am
Contact:

Re: headless server problem

Post by ZiggyStardust »

I'm pretty sure it's 64bit.. it's hosted by linode using some form of virtualization so I'm not positive.. this is my output:

Code: Select all

$ uname -m
x86_64

Code: Select all

$ uname -r
4.7.0-x86_64-linode72
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: headless server problem

Post by prg »

Does ldd factorio show what's actually missing?
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
ZiggyStardust
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Oct 17, 2016 2:34 am
Contact:

Re: headless server problem

Post by ZiggyStardust »

could the unzip have corrupted it?

anyway this is what shows up:

Code: Select all

# ldd factorio
	not a dynamic executable
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: headless server problem

Post by prg »

Compare the output of file factorio to e.g. file $(which bash).
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
ZiggyStardust
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Oct 17, 2016 2:34 am
Contact:

Re: headless server problem

Post by ZiggyStardust »

ah, that clears it up... I think i'm running 32 bit on 64 bit... Now that this brings it to my attention I think I remember linode telling me that I could upgrade this..

The output:

Code: Select all

# file factorio
factorio: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=6ef0b5c77a70a40aeb6c9ea3131a4298953339ef, not stripped
for bash:

Code: Select all

# file $(which bash)
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=1894fe5be87977e6a283ef5eadfb88f7e08b2d01, stripped
Thanks for helping me track this down!
inick
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Jun 16, 2016 7:36 pm
Contact:

Re: headless server problem

Post by inick »

Reviving this old thread from search results simply because it matches my problem, and I found a solution. Kinda. I know the problem and will be seeking Devs to feedback the issue.

I have a pure 64-bit live Linux system that I am using Factorio on. I think the headless Factorio download (even for 0.15.31 as of this writing) is created on a dual-architecture Linux system (or, cross compiled).

On fresh bootup of my system, the root filesystem has a /lib that contains files necessary to run Linux programs. The system 'ldd' finds many of the libraries it needs to run, but the most important one, the one that actually makes binaries run on Linux is not being found.

Code: Select all

$ ls -l /
total 8
drwxr-xr-x    2 root     root          1460 Apr  8 10:53 bin/
drwxrwxr-x   15 root     staff         4400 Jul 22 20:44 dev/
drwxr-xr-x    8 root     root           720 Jul 26 21:56 etc/
drwxr-xr-x    3 root     root          4096 Jul 22 20:44 home/
-rwxr-xr-x    1 root     root           496 Apr  8 14:36 init
drwxr-xr-x    4 root     root           840 Mar  5 17:26 lib/
lrwxrwxrwx    1 root     root            11 Apr  8 10:53 linuxrc -> bin/busybox
drwxrwxr-x    4 root     staff           80 Jul 22 20:44 mnt/
drwxrwsr-x    2 root     staff          160 Apr  8 10:53 opt/
dr-xr-xr-x  115 root     root             0 Jul 22 20:44 proc/
drwxrwxr-x    2 root     staff           80 Apr  8 10:53 root/
drwxrwxr-x    4 root     staff           80 Jul 22 20:44 run/
drwxr-xr-x    2 root     root          1180 Apr  8 10:53 sbin/
dr-xr-xr-x   13 root     root             0 Jul 22 20:44 sys/
drwxrwxrwt    4 root     staff          160 Jul 26 21:53 tmp/
drwxr-xr-x    7 root     root           140 Apr 12  2016 usr/
drwxrwxr-x    8 root     staff          180 Apr  8 10:53 var/

Code: Select all

$ ldd factorio/bin/x64/factorio
        linux-vdso.so.1 (0x00007ffc81cde000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f8526059000)
        librt.so.1 => /lib/librt.so.1 (0x00007f8525e52000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007f8525c4f000)
        libm.so.6 => /lib/libm.so.6 (0x00007f852595c000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f852574a000)
        libc.so.6 => /lib/libc.so.6 (0x00007f85253e2000)
        /lib64/ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x0000557f6f43f000)
Since the bottom entry, ld-linux-x86-64.so.2 does exist,

Code: Select all

$ find / -name "ld-linux-x86-64*"
/lib/ld-linux-x86-64.so.2
But Factorio will not execute.

Code: Select all

$ bin/x64/factorio --help
-sh: bin/x64/factorio: not found

but either 'ldd' or the Factorio binary is expecting it in /lib64
Proof (Option 1 of 2):

Code: Select all

$ sudo ln -s /lib /lib64
$ ls -l /
total 8
drwxr-xr-x    2 root     root          1460 Apr  8 10:53 bin/
drwxrwxr-x   15 root     staff         4400 Jul 22 20:44 dev/
drwxr-xr-x    8 root     root           720 Jul 26 21:56 etc/
drwxr-xr-x    3 root     root          4096 Jul 22 20:44 home/
-rwxr-xr-x    1 root     root           496 Apr  8 14:36 init
drwxr-xr-x    4 root     root           840 Mar  5 17:26 lib/
lrwxrwxrwx    1 root     root             4 Jul 30 00:44 lib64 -> /lib/
lrwxrwxrwx    1 root     root            11 Apr  8 10:53 linuxrc -> bin/busybox
drwxrwxr-x    4 root     staff           80 Jul 22 20:44 mnt/
drwxrwsr-x    2 root     staff          160 Apr  8 10:53 opt/
dr-xr-xr-x  114 root     root             0 Jul 22 20:44 proc/
drwxrwxr-x    2 root     staff           80 Apr  8 10:53 root/
drwxrwxr-x    4 root     staff           80 Jul 22 20:44 run/
drwxr-xr-x    2 root     root          1180 Apr  8 10:53 sbin/
dr-xr-xr-x   13 root     root             0 Jul 22 20:44 sys/
drwxrwxrwt    4 root     staff          160 Jul 26 21:53 tmp/
drwxr-xr-x    7 root     root           140 Apr 12  2016 usr/
drwxrwxr-x    8 root     staff          180 Apr  8 10:53 var/
Proof (Option 2 of 2):

Code: Select all

$ /lib/ld-linux-x86-64.so.2 bin/x64/factorio --help

General options:
  -h [ --help ]                         display help
  <<SNIP>>

'ldd' won't show any different. But now Factorio executes.

Code: Select all

$ bin/x64/factorio --help

General options:
  -h [ --help ]                         display help
<<SNIP>>

Need feedback from the devs, why is Factorio binary specifically naming /lib64/ld-linux-x86-64.so.2? Linux filesystem hierarchy standards suggests /lib64 is only there when on a mixed 32-bit/64-bit system.


TL:DR Bottom line,
You may be able to fix your problem by symlinking /lib64 to point to /lib:

Code: Select all

# ln -s /lib /lib64
[/b]
Post Reply

Return to “Technical Help”