Sphereserver / Source

http://spherecommunity.net
Apache License 2.0
107 stars 58 forks source link

Centos7 Pre-release do NOT work - does not seem to read scripts properly? #64

Closed PixelHeroMedia closed 7 years ago

PixelHeroMedia commented 8 years ago

In the pre-release build, on Centos7 I am getting these errors when Sphere starts. All permissions and structure are correct.

The below error happens for every file as it loads. It claims it cannot open 'input dir' but the user running sphere has required access (tested with root + custom user).

Sphere Version 0.56c-Nightly [Linux] by www.spherecommunity.net, compiled at Apr 10 2016 (16:30:41) [build 2807 / GIT hash 0dc0ebf]
WARNING:
This is a nightly build of SphereServer. This build is to be used
for testing and/or bug reporting ONLY. DO NOT run this build on a
live shard unless you know what you are doing!
Nightly builds are automatically made every night from source and
might contain errors, might be unstable or even destroy your
shard as they are mostly untested!
-----------------------------------------------------------------

Signal handlers UNinstalled.
Expansion maps supported: Felucca (0), Trammel (1)
ERROR:Can't open input dir [scripts/spheretables.scp]
ERROR:Can't get stats info for file 'scripts/spheretables.scp'
Allocating map sectors: 0=7168 1=7168
Indexing 35 scripts...
ERROR:Can't open input dir [scripts/sphere_admin.scp]
ERROR:Can't get stats info for file 'scripts/sphere_admin.scp'
Loading scripts/sphere_admin.scp
ERROR:Can't open input dir [scripts/sphere_backward_compatibility.scp]
ERROR:Can't get stats info for file 'scripts/sphere_backward_compatibility.scp'
Loading scripts/sphere_backward_compatibility.scp
...
ERROR:Can't open input dir [scripts/sphere_template.scp]
ERROR:Can't get stats info for file 'scripts/sphere_template.scp'
ERROR:Can't open input dir [scripts/sphere_template_loot.scp]
ERROR:Can't get stats info for file 'scripts/sphere_template_loot.scp'
ERROR:(sphere_template_loot.scp,69)Undefined symbol 'i_bag' ['i_bag']
ERROR:(sphere_template_loot.scp,78)Undefined symbol 'i_bag' ['i_bag']
ERROR:(sphere_template_loot.scp,87)Undefined symbol 'i_bag' ['i_bag']
ERROR:(sphere_template_loot.scp,96)Undefined symbol 'i_bag' ['i_bag']
ERROR:(sphere_template_loot.scp,105)Undefined symbol 'i_bag' ['i_bag']
ERROR:(sphere_template_loot.scp,124)Undefined symbol 'i_basket' ['i_basket 1 i_basket_bushel 1 i_basket_2 1 i_basin 1 i_basket_square 1 i_basket_square_small 1 i_basket_round_small 1 i_basket_round_tall 1 i_basket_square_deep 1 i_basket_square_tall 1 i_basket_round_flat 1 }']
ERROR:(sphere_template_loot.scp,124)Undefined symbol 'i_basket_bushel' ['i_basket_bushel 1 i_basket_2 1 i_basin 1 i_basket_square 1 i_basket_square_small 1 i_basket_round_small 1 i_basket_round_tall 1 i_basket_square_deep 1 i_basket_square_tall 1 i_basket_round_flat 1 }']
...
ERROR:Can't open input dir [scripts/maps/sphere_map_points3.scp]
ERROR:Can't get stats info for file 'scripts/maps/sphere_map_points3.scp'
Loading scripts/maps/sphere_map_points3.scp
ERROR:(sphere_map_points3.scp,15)Unsupported map #3 specified. Auto-fixing that to 0.
ERROR:(sphere_map_points3.scp,16)Unsupported map #3 specified. Auto-fixing that to 0.
ERROR:(sphere_map_points3.scp,19)Unsupported map #3 specified. Auto-fixing that to 0.

As you can see it seems to read the file, but then references seem to not ever exist, so everything fails. After loading sphere continues to pretend its up and running.

ERROR:(sphere_template_loot.scp,4107)Undefined symbol 'i_bag' ['i_bag']
ERROR:Can't open input dir [scripts/sphere_template_vend.scp]
ERROR:Can't get stats info for file 'scripts/sphere_template_vend.scp'
Loading scripts/sphere_template_vend.scp
Done loading scripts (33 of 199 triggers used).

Loaded 141 client encryption keys.
Server started on hostname 'server.bristol.digital'
Monitoring IP 88.150.141.98:2593
Loading save/spheredata...
Loading save/spherestatics...
Loading save/spheremultis...
Loading save/sphereworld...
Loading save/spherechars...
GC: 0 Objects accounted for
Option flags: ScaleDamageByDurability + CommandSysmessages + ItemsAutoName + NoHouseMuteSpeech + Buffs + NoPrefix
Admin=hello@ultima.one, URL=www.ultima.one, Lang=English, TZ=0
Startup complete. items=0, chars=0
12:40:ERROR:Can't open input dir [scripts/sphere_serv_triggers.scp]
12:40:ERROR:Can't get stats info for file 'scripts/sphere_serv_triggers.scp'

I have tried with a clean sphere.ini and custom, it does not change the issue. I have tried with the latest Nightly as well as the Debug version and nothing works any different.

Upon typing 'x' to quit I get the following:

x
12:40:FATAL:Immediate Shutdown initialized!
FATAL:Server terminated: Terminal closed by SIGHUP signal (code 1)
*** Error in `./spheresvr': munmap_chunk(): invalid pointer: 0x0bd1ef30 ***
======= Backtrace: =========
/lib/libc.so.6(+0x7429c)[0xf710029c]
/lib/libc.so.6(+0x17c56)[0xf70a3c56]
/lib/libstdc++.so.6(_ZdlPv+0x1f)[0xf72ee97f]
./spheresvr[0x81915d2]
./spheresvr[0x815c197]
./spheresvr[0x8151d5c]
/lib/libc.so.6(+0x31ad9)[0xf70bdad9]
/lib/libc.so.6(+0x31b3d)[0xf70bdb3d]
/lib/libc.so.6(__libc_start_main+0xfb)[0xf70a594b]
./spheresvr[0x804c873]
======= Memory map: ========
08048000-08384000 r-xp 00000000 08:02 2149465316                         /sphere/spheresvr
08384000-08385000 r--p 0033c000 08:02 2149465316                         /sphere/spheresvr
08385000-083ab000 rw-p 0033d000 08:02 2149465316                         /sphere/spheresvr
083ab000-09f0e000 rw-p 00000000 00:00 0 
0b5b9000-0bda9000 rw-p 00000000 00:00 0                                  [heap]
f6500000-f6521000 rw-p 00000000 00:00 0 
f6521000-f6600000 ---p 00000000 00:00 0 
f661b000-f661c000 ---p 00000000 00:00 0 
f661c000-f6e1c000 rw-p 00000000 00:00 0 
f6e1c000-f6e51000 r--s 00000000 08:02 2149467299                         /var/db/nscd/hosts
f7089000-f708c000 rw-p 00000000 00:00 0 
f708c000-f7243000 r-xp 00000000 08:02 4299942714                         /usr/lib/libc-2.17.so
f7243000-f7245000 r--p 001b7000 08:02 4299942714                         /usr/lib/libc-2.17.so
f7245000-f7246000 rw-p 001b9000 08:02 4299942714                         /usr/lib/libc-2.17.so
f7246000-f7249000 rw-p 00000000 00:00 0 
f7249000-f7262000 r-xp 00000000 08:02 4301779273                         /usr/lib/libgcc_s-4.8.5-20150702.so.1
f7262000-f7263000 r--p 00018000 08:02 4301779273                         /usr/lib/libgcc_s-4.8.5-20150702.so.1
f7263000-f7264000 rw-p 00019000 08:02 4301779273                         /usr/lib/libgcc_s-4.8.5-20150702.so.1
f7264000-f72a4000 r-xp 00000000 08:02 4299867648                         /usr/lib/libm-2.17.so
f72a4000-f72a5000 r--p 00040000 08:02 4299867648                         /usr/lib/libm-2.17.so
f72a5000-f72a6000 rw-p 00041000 08:02 4299867648                         /usr/lib/libm-2.17.so
f72a6000-f7385000 r-xp 00000000 08:02 4301779277                         /usr/lib/libstdc++.so.6.0.19
f7385000-f738a000 r--p 000de000 08:02 4301779277                         /usr/lib/libstdc++.so.6.0.19
f738a000-f738b000 rw-p 000e3000 08:02 4301779277                         /usr/lib/libstdc++.so.6.0.19
f738b000-f7393000 rw-p 00000000 00:00 0 
f7393000-f7396000 r-xp 00000000 08:02 4299420516                         /usr/lib/libdl-2.17.so
f7396000-f7397000 r--p 00002000 08:02 4299420516                         /usr/lib/libdl-2.17.so
f7397000-f7398000 rw-p 00003000 08:02 4299420516                         /usr/lib/libdl-2.17.so
f7398000-f739f000 r-xp 00000000 08:02 4300448205                         /usr/lib/librt-2.17.so
f739f000-f73a0000 r--p 00006000 08:02 4300448205                         /usr/lib/librt-2.17.so
f73a0000-f73a1000 rw-p 00007000 08:02 4300448205                         /usr/lib/librt-2.17.so
f73a1000-f7676000 r-xp 00000000 08:02 4300487956                         /usr/lib/libmysqlclient.so.18
f7676000-f7733000 rw-p 002d4000 08:02 4300487956                         /usr/lib/libmysqlclient.so.18
f7733000-f7736000 rw-p 00000000 00:00 0 
f7736000-f774c000 r-xp 00000000 08:02 4300352030                         /usr/lib/libpthread-2.17.so
f774c000-f774d000 r--p 00015000 08:02 4300352030                         /usr/lib/libpthread-2.17.so
f774d000-f774e000 rw-p 00016000 08:02 4300352030                         /usr/lib/libpthread-2.17.so
f774e000-f7750000 rw-p 00000000 00:00 0 
f7759000-f775c000 rw-p 00000000 00:00 0 
f775c000-f775d000 r-xp 00000000 00:00 0                                  [vdso]
f775d000-f777c000 r-xp 00000000 08:02 4299942707                         /usr/lib/ld-2.17.so
f777c000-f777d000 r--p 0001e000 08:02 4299942707                         /usr/lib/ld-2.17.so
f777d000-f777e000 rw-p 0001f000 08:02 4299942707                         /usr/lib/ld-2.17.so
ffc63000-ffc84000 rw-p 00000000 00:00 0                                  [stack]
Aborted (core dumped)

Resync simply throws all the startup errors again. Whats more confusing is that these 'symbols' do not exist in the mentioned file AT ALL.

ERROR:(sphere_template_loot.scp,583)Undefined symbol 'i_chest_pirate' ['i_chest_pirate 1 i_chest_gothic 1 }']
ERROR:(sphere_template_loot.scp,583)Undefined symbol 'i_chest_gothic' ['i_chest_gothic 1 }']

So where on earth is it getting that from?!

roberpot commented 8 years ago

First we have to resolve the very first problem: sphere can not found spheretables.scp. You really have scripts/spheretables.scp?

PixelHeroMedia commented 8 years ago

It does find it. It is reading the script names in spheretables and trying to load them just after it says it cant open it. All files are 100% there in the right place. It seems to say it cannot open it, but it can. Its outputting all the info from inside these files, just never seems to load them into sphere or something?

Why does it think its a 'dir' and not a file? Thats whats confusing me also.

roberpot commented 8 years ago

Are you running sphere as root?

cbnolok commented 8 years ago

Maybe at line 583 you have a template which has those items? Also, have you tried latest nightly? Have you noticed since which commit this issue occurs?

PixelHeroMedia commented 8 years ago

Those templates do reference them, but not sure what you're getting at as they're basic defs which exist in previously loaded files, and that's just a small example of the 1000s of missing defs.

Nothing custom at all, litrelly downloaded and run as basic as it gets.

Running as root yes. Same errors as with a user.

Can someone else spin up centos7 and try?

I don't know when it started this is the first 56c build I'm trying, latest nightly has same errors.

I can attach the full log if you think it'll help On 26 May 2016 18:43, "cbnolok" notifications@github.com wrote:

Maybe at line 583 you have a template which has those items? Also, have you tried latest nightly? Have you noticed since which commit this issue occurs?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/Sphereserver/Source/issues/64#issuecomment-221942689

PixelHeroMedia commented 8 years ago

sphere2016-05-27.txt

Log attached.

Image of setup:

image

PixelHeroMedia commented 8 years ago

More info:

Looking for the errors its from CFileList calling stat on the script files. I ran this on the server from the same directory as spheresvr and they work fine



  File: ‘scripts/sphere_serv_triggers.scp’

  Size: 5571        Blocks: 16         IO Block: 4096   regular file

Device: 802h/2050d  Inode: 4303576983  Links: 1

Access: (0600/-rw-------)  Uid: (    0/    root)   Gid: (    0/    root)

Context: unconfined_u:object_r:default_t:s0

Access: 2016-05-27 13:10:32.793806202 +0100

Modify: 2016-05-25 12:33:44.159164219 +0100

Change: 2016-05-25 12:34:18.781092621 +0100

 Birth: -```

Maybe something weird with what sphere is thinking the base directory is? I am not that experienced in c++ and can't find anything where sphere is deciding what directory its in, anyone know what logic it uses to determine this?
PixelHeroMedia commented 8 years ago

spheretables.scp uses / for a folder. However linux needs a \

But didnt seem to help

cbnolok commented 8 years ago

Probably using \ would work for both windows and linux, i may give it a look at this next week

lintax commented 8 years ago

Nope, check sphere.ini for there specified base path. Seems you left it empty. And backslash () does not work on Linux as a separator. Only normal slashes (/) are allowed. And there are supported on all OSes.

On Fri, May 27, 2016, 21:10 cbnolok notifications@github.com wrote:

Probably using \ would work for both windows and linux, i may give it a look at this next week

— You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub https://github.com/Sphereserver/Source/issues/64#issuecomment-222216048, or mute the thread https://github.com/notifications/unsubscribe/ALUUB49po2iCTr9HaFito26jSXd6BWI-ks5qFzOmgaJpZM4Indor .

cbnolok commented 8 years ago

I haven't understood if you have solved by changing the slash, and to which one Il 27 mag 2016 17:01, "Richard Edwards" notifications@github.com ha scritto:

OMG, figured it out.

spheretables.scp uses / for a folder. However linux needs a \

Might be worth building a linux one for people to use?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Sphereserver/Source/issues/64#issuecomment-222169936, or mute the thread https://github.com/notifications/unsubscribe/AOWhJOsaPDpNr69t-fu-UgL4dihfn8I_ks5qFwdngaJpZM4Indor .

PixelHeroMedia commented 8 years ago

So where to look next? I don't get why stat is failing On 27 May 2016 22:33, "cbnolok" notifications@github.com wrote:

I haven't understood if you have solved by changing the slash, and to which one Il 27 mag 2016 17:01, "Richard Edwards" notifications@github.com ha scritto:

OMG, figured it out.

spheretables.scp uses / for a folder. However linux needs a \

Might be worth building a linux one for people to use?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/Sphereserver/Source/issues/64#issuecomment-222169936 , or mute the thread < https://github.com/notifications/unsubscribe/AOWhJOsaPDpNr69t-fu-UgL4dihfn8I_ks5qFwdngaJpZM4Indor

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Sphereserver/Source/issues/64#issuecomment-222258008, or mute the thread https://github.com/notifications/unsubscribe/AKMdkCL8sjRAoEFdaf3U3_1cgAmvSDkYks5qF2MggaJpZM4Indor .

lintax commented 8 years ago

I would try to chown -R /sphere youruser && chmod -R u+rw /sphere Then su to that user and try to start sphere by him.

PixelHeroMedia commented 8 years ago

Already done, I have tried the same with root and a user called sphere, same errors On 27 May 2016 22:39, "Vjacheslav Kanivetc" notifications@github.com wrote:

I would try to chown -R /sphere youruser && chmod -R u+rw /sphere Then su to that user and try to start sphere by him.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Sphereserver/Source/issues/64#issuecomment-222259154, or mute the thread https://github.com/notifications/unsubscribe/AKMdkDrlOBt9V_efTfyynzaLOXWco2D6ks5qF2SHgaJpZM4Indor .

PixelHeroMedia commented 8 years ago

Any other ideas? Anyone else been able to test this?

roberpot commented 8 years ago

I tested and worked for me, but not on Centos (i think is not related to the OS). The only way we can test your env is sending us your full sphere i think...

PixelHeroMedia commented 8 years ago

I have nothing but Pre-release 56c for Linux, Pre-release 56c Scripts.

I just got the latest nightly too and same issues.

Here is exactly how I set up:

Nothing more to it.

PixelHeroMedia commented 8 years ago

Oh, all chown as root, and also tried chown as a user, same issues regardless.

DarkLotus commented 8 years ago

Check paths, linux is case sensitive as well. also try with a full path for scripts ie /home/bob/sphere/scripts I vaguely remember hitting similar issues when trying to run on linux.

coruja747 commented 7 years ago

last month I tested an CentOS 7 server and also got these problems when I compiled spheresvr myself. The problem is: the compiler was building sphere in 64bit and this was making sphere return tons of console errors because sphere is not 64bit. To fix it, I just compiled in 32bit where I'm been able to boot the server running perfectly without a single error

I already updated source files to build in 32bit by default and also added some CentOS 7 package instructions here on github page, so if you still having these problems, just update your source files and install these CentOS 7 packages