Flex error when compiling server on opensuse 12.1 (64bit)

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
SaultDon
Newly Registered User
Posts: 6
Joined: 20 Apr 2012, 05:13

Flex error when compiling server on opensuse 12.1 (64bit)

Post by SaultDon » 20 Apr 2012, 05:19

I have been getting farther when compiling the local server from this guide: http://wiki.themanaworld.org/index.php/How_to_Develop

I keep getting an error from flex:

Code: Select all

cd eathena/
make
...
...
...a bunch of compiling messages...
...
...
[color=#FF0000]lex -o src/map/magic-interpreter-lexer.c src/map/magic-interpreter-lexer.l
flex: Can't use --reentrant or --bison-bridge with -l option
make: *** [src/map/magic-interpreter-lexer.c] Error 1[/color]
I have bison and flex installed (both 32 and 64bit libraries). Lex is also already in my $PATH. Any one have any suggestions?
User avatar
o11c
Knight
Knight
Posts: 2262
Joined: 20 Feb 2011, 22:09
Location: ^ ^

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by o11c » 21 Apr 2012, 00:15

hm, -l is because it's called by the name 'lex' ... try adding LEX=flex to the make command or whatever.

Code: Select all

make LEX=flex
What version of flex are you using?
Former programmer for the TMWA server.
SaultDon
Newly Registered User
Posts: 6
Joined: 20 Apr 2012, 05:13

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by SaultDon » 21 Apr 2012, 19:32

Here is the output from $(zypper info flex)

Code: Select all

Repository: openSUSE-12.1-Oss
Name: flex
Version: 2.5.35-59.1.4
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 709.0 KiB
Summary: Fast Lexical Analyzer Generator
Description: 
FLEX is a tool for generating scanners: programs that recognize lexical
patterns in text.
I also ran $(make LEX=flex) as per your instruction and it all compiled successfully! Thank you very much.
User avatar
o11c
Knight
Knight
Posts: 2262
Joined: 20 Feb 2011, 22:09
Location: ^ ^

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by o11c » 21 Apr 2012, 20:38

I've updated the repository (this will also help Cygwin people, but I don't care about them)
Former programmer for the TMWA server.
SaultDon
Newly Registered User
Posts: 6
Joined: 20 Apr 2012, 05:13

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by SaultDon » 22 Apr 2012, 09:01

Thanks for the help o11c.

I've got the server up and running and the plan is to use it just for my local area network. There is no planned public access.

I have a laptop ("laptop 1") running the server from user account 'athena'.

Other PCs connected via wired or wireless to the router can connect to the server and play the game using "laptop 1s" local IP address: 192.168.0.105:6901

When I get back on "laptop 1" and use my 'default' user account to launch ManaWorld (remember, this is the laptop that has a separate user account called 'athena' running the server already), I get to the point where it says: "Connecting to character server..." with a progress bar that repeats over and over again.

Nothing happens... But everyone else gets on fine and quick too.

I've tried connecting using either 'localhost' or the direct IP 192.168.0.105 but neither work for me (the laptop running the server...).

I've never done this before (set up a local gaming server) so am green.
I had to create a new user in my linux box (openSUSE 12.1) to run the server because ./eathena.sh start kept telling me that my user couldn't run it because of the 'ulimit -u 10' option in the script.

I run the server by switching to user athena, and running the command:

Code: Select all

./login-server& ./char-server& ./map-server&
So I guess essentially, I would like to connect with 'localhost' and everyone else uses '192.168.0.105'

Is this possible?
I've configured everything according to this walkthrough: http://wiki.themanaworld.org/index.php/ ... a_on_Linux
SaultDon
Newly Registered User
Posts: 6
Joined: 20 Apr 2012, 05:13

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by SaultDon » 22 Apr 2012, 09:28

Code: Select all

From login-server: receiving of 1 GM accounts information.
Map-Server 0 connected: 75 maps, from IP 192.168.0.105 port 5122.
Map-server 0 loading complete.
Connection of the GM (level:99) account 'SaultDon' accepted.
LAN test (result): LAN source.
Account Logged On; Account ID: 0 (GM level 99).
That's what the terminal outputs when I connect, but the screen just stays at the "Connecting to character server..." where nothing happens until I close the program.
Frost
TMW Adviser
TMW Adviser
Posts: 851
Joined: 09 Sep 2010, 07:20
Location: California, USA

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by Frost » 22 Apr 2012, 15:47

SaultDon wrote: I get to the point where it says: "Connecting to character server..." with a progress bar that repeats over and over again.

Nothing happens... But everyone else gets on fine and quick too.

I've tried connecting using either 'localhost' or the direct IP 192.168.0.105 but neither work for me (the laptop running the server...).
[...]
So I guess essentially, I would like to connect with 'localhost' and everyone else uses '192.168.0.105'

Is this possible?
Others can log on when they connect to 192.168.0.105, but you get stuck at "connecting to character server?"
If all three servers are running (the fact that you started them doesn't mean they successfully loaded and connected to each other properly), then try verifying the connection (maybe there's a firewall rule?) manually:
"telnet 192.168.0.105 5122" and
"telnet 192.168.0.105 6122"
Those will either connect, get refused, or eventually time out. Connection indicates the server is running and reachable, and we need to look at configs. Refused means the server is not running and is probably not fully configured. Time out means there's something blocking your connection, presumably an iptables firewall rule.

Only with great hackery could you accept connections on two different interfaces (127.0.0.1 is on 'lo0' and 192.168.0.105 is on 'eth0') to the same server, and I strongly suggest you don't pursue that option. Fortunately, there should be no need to.
You earn respect by how you live, not by what you demand.
-unknown
SaultDon
Newly Registered User
Posts: 6
Joined: 20 Apr 2012, 05:13

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by SaultDon » 22 Apr 2012, 19:55

Frost wrote:Others can log on when they connect to 192.168.0.105, but you get stuck at "connecting to character server?"
That's correct. They get in the game, can register accounts, create a character and start leveling up, while I get to watch...
I get stuck using both 'localhost' and '192.168.0.105'.
Here is a paste of the output from starting the server: http://paste.opensuse.org/f94b7ae3
Frost wrote:If all three servers are running (the fact that you started them doesn't mean they successfully loaded and connected to each other properly), then try verifying the connection (maybe there's a firewall rule?) manually:
"telnet 192.168.0.105 5122" and
"telnet 192.168.0.105 6122"
Those will either connect, get refused, or eventually time out. Connection indicates the server is running and reachable, and we need to look at configs. Refused means the server is not running and is probably not fully configured. Time out means there's something blocking your connection, presumably an iptables firewall rule.
I ran these and here is the output... Looks like a timeout! I get the same timeout when changing the ip to 'localhost'.

Code: Select all

saultdon@indigenis:~/Development/git/mana> telnet 192.168.0.105 5122
Trying 192.168.0.105...
Connected to 192.168.0.105.
Escape character is '^]'.
Connection closed by foreign host.
saultdon@indigenis:~/Development/git/mana> telnet 192.168.0.105 6122
Trying 192.168.0.105...
Connected to 192.168.0.105.
Escape character is '^]'.
Connection closed by foreign host.
saultdon@indigenis:~/Development/git/mana> telnet 192.168.0.105 6901
Trying 192.168.0.105...
Connected to 192.168.0.105.
Escape character is '^]'.
Connection closed by foreign host.
Below is what the server terminal says in response to those telnet pings:

Code: Select all

Session #6 timed out <- this is telnet ping for port 5122, next timeout is for port 6122
Session #6 timed out
Connection of the GM (level:99) account 'SaultDon' accepted. <- this is me trying to login, next two lines...
LAN test (result): LAN source.
Account Logged On; Account ID: 0 (GM level 99). <- this is where my screen gets stuck at "Connecting to character server..."
Session #5 timed out <- this is telnet pinging 6901
Connection of the account 'Quaid' accepted. <- successful login/logout of user Quaid, how come he's so special...
LAN test (result): WAN source.
Account Logged On; Account ID: 2000000.
Character selection 'Quaid' (account: 2000000, slot: 0) [192.168.0.101]
--Send IP of map-server. LAN test (result): WAN source.
From queue index 0: recalling packet version 1
Connection accepted: Character 'Quaid' (account: 2000000).
Player [Quaid] has logged off your server.
Frost wrote:Only with great hackery could you accept connections on two different interfaces (127.0.0.1 is on 'lo0' and 192.168.0.105 is on 'eth0') to the same server, and I strongly suggest you don't pursue that option. Fortunately, there should be no need to.
I don't know what this means... I followed the walkthrough from http://wiki.themanaworld.org/index.php/ ... a_on_Linux and thought that following those steps would allow me to connect to this server from localhost by default?

Like I said, I know nothing really about this, other than it says to fill out this IP there and forward ports on your firewall. The fact that everyone else can connect means that for me it is a firewall issue?

I read under "General Configuration:
If you are just going to use the server yourself you can enter 127.0.0.1 as the value for all IP addresses. Also, if you have no clue about what ports are or which you will be using, leave the default values as they are.
Isn't that suppose to allow me access using 'localhost' as the IP from the login screen?


File contents:
login_local.conf

Code: Select all

// Athena Login Server local configuration file.
 
// Port to bind Login Server to (always binds to all IP addresses)
login_port: 6901

// Whether remote administration is enabled or disabled (1 for enabled, 0 for disabled)
admin_state: 1

// Administrative password, used by ladmin (perl software) to connect remotely to server.
// NOTICE: If you enable remote administration, you should change its value for security
admin_pass: password

// Indicate the IP that the server accepts for remote administration.
// put: 'all', or 'xxx.xxx.' (begin of an ip finished by '.' or a complete ip),
//      or a network and its mask (example: '123.456.789.012/24' or '123.456.789.012/255.255.255.0')
//      or 'clear' to suppress previous parameter (use it in import file mainly)
// Add as many IP's as you wish.
ladminallowip: all

// Gamemaster password, used with the @gm command to obtain GM commands (level of gm set with level_new_gm parameter).
// NOTICE: You should also change this one.
gm_pass: password

// Update host
// Tells the client that an alternative updatehost is available if the client
// supports this. If left out nothing will be sent. max length 127.
update_host: http://updates.themanaworld.org/
char_local.conf

Code: Select all

// Athena Character local configuration file.

// Server Communication username and password.
userid: SaultDon
passwd: password

// Server name, no more than 19 characters
server_name: Camerons Mana World

// Wisp name for server: used to send wisp from server to players (between 4 to 23 characters)
wisp_server_name: Server

// Login Server IP
login_ip:127.0.0.1
// Login Server Port
login_port: 6901

// Character Server IP
char_ip:192.168.0.105
// Character Server Port
char_port: 6122
map_local.conf

Code: Select all

// eAthena Map-Server local Configuration File

// Interserver communication passwords, set in account.txt (or equiv.)
userid: SaultDon
passwd: password

// Character Server IP
char_ip:127.0.0.1
// Character Server Port
char_port: 6122

// Map Server IP
map_ip:192.168.0.105
// Map Server Port
map_port: 5122
account.txt

Code: Select all

// Accounts file: here are saved all information about the accounts.
// Structure: ID, account name, password, last login time, sex, # of logins, state, email, error message for state 7, validity time, last (accepted) login ip, memo field, ban timestamp, repeated(register text, register value)
// Some explanations:
//   account name    : between 4 to 23 char for a normal account (standard client can't send less than 4 char).
//   account password: between 4 to 23 char
//   sex             : M or F for normal accounts, S for server accounts
//   state           : 0: account is ok, 1 to 256: error code of packet 0x006a + 1
//   email           : between 3 to 39 char (a@a.com is like no email)
//   error message   : text for the state 7: 'Your are Prohibited to login until <text>'. Max 19 char
//   valitidy time   : 0: unlimited account, <other value>: date calculated by addition of 1/1/1970 + value (number of seconds since the 1/1/1970)
//   memo field      : max 254 char
//   ban time        : 0: no ban, <other value>: banned until the date: date calculated by addition of 1/1/1970 + value (number of seconds since the 1/1/1970)
0	SaultDon	!:@jJ6$7b6982832306db0bf3902ec1	2012-04-22 18:15:14.792	S	712	0	a@a.com	-	0	127.0.0.1	!	0	
1	s2	!GxFKW$0f35a34708d00827ab2b3d7a	- 	S	1	0	a@a.com	-	0	-	!	0	
2	s3	!kDVCx$b0edf0b7eb6106165625adea	-	S	1	0	a@a.com	-	0	-	!	0	
3	s4	!xjTn5$9bf58a699321f245c6988891	-	S	0	0	a@a.com	-	0	-	!	0	
4	s5	!QmYlk$463294e54560ce9e81937c8a	-	S	0	0	a@a.com	-	0	-	!	0	
2000000	Quaid	!_4{AN$babf83248a6ab274a4dda0f7	2012-04-22 07:23:08.739	M	2	0	a@a.com	-	0	192.168.0.101	!	0	
2000001	%newid%
gm_account.txt

Code: Select all

// <account ID> <level>
0 99
User avatar
o11c
Knight
Knight
Posts: 2262
Joined: 20 Feb 2011, 22:09
Location: ^ ^

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by o11c » 22 Apr 2012, 20:09

ugh, please don't set up accounts like that, you will *definitely* have problems trying to use ID 0

Create accounts and GMs using ladmin, using the latest instructions at: http://wiki.themanaworld.org/index.php/How_to_Develop
Former programmer for the TMWA server.
SaultDon
Newly Registered User
Posts: 6
Joined: 20 Apr 2012, 05:13

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by SaultDon » 22 Apr 2012, 20:35

o11c wrote:ugh, please don't set up accounts like that, you will *definitely* have problems trying to use ID 0

Create accounts and GMs using ladmin, using the latest instructions at: http://wiki.themanaworld.org/index.php/How_to_Develop
Gotcha.

When I run the ladmin command (http://wiki.themanaworld.org/index.php/ ... nistration) on steps 5 and 6, do I replace 'username' and 'password' with my actual username 'SaultDon' and preferred password?
User avatar
Freeyorp101
Administrator
Administrator
Posts: 708
Joined: 04 Nov 2008, 10:17
Location: New Zealand

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by Freeyorp101 » 24 Apr 2012, 10:15

SaultDon wrote:0 SaultDon !:@jJ6$7b6982832306db0bf3902ec1 2012-04-22 18:15:14.792 S 712 0 a@a.com - 0 127.0.0.1 ! 0
Notice how the "Gender" of SaultDon in that database is "S", or server. S accounts are special purpose accounts used for interserver communication, and should not be attempted to be used from clients.

Create an account through the client if this option is enabled, or through ladmin otherwise. If you need to use ladmin, you do need to replace "username" and "password" with your desired username and password.


---Freeyorp
(09:58:17) < tux9th> Freeyorp: your sig on the forums is kind of outdated
User avatar
Immune
Peon
Peon
Posts: 36
Joined: 16 Dec 2011, 05:09

Re: Flex error when compiling server on opensuse 12.1 (64bit

Post by Immune » 26 Apr 2012, 12:03

Don't forget to forward ports 6122,5122 and sometimes 6901 (for non local) Also you two have lan_support.conf (or something similar) These both should be completed.
Image
Post Reply