View previous topic :: View next topic |
Author |
Message |
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Thu Nov 19, 2009 1:13 Post subject: ODBC fail to connect. ODBC!EXEC failures, etc. |
|
|
After fighting with the nwnx version for Linux (and not knowing about nwnx_easy), I decided to try the easy version. Following the directions line for line, I got it to compile using the install shell script with -force, and the ./nwnstartup.sh seems to work just fine except for one small detail:
Code: |
./nwnstartup.sh
NWNX2lib: Init
NWNX2lib: org SetString() at 0x81f41b4, new SetString() at 0xb77fbe9e
NWNX2lib: org GetObj() at 0x81f40bc, new GetObj() at 0xb77fbec5
* Parsing configuration...
NWN Extender v2.7-beta4
(c) 2004 by the APS/NWNX Linux Conversion Group
(c) 2007-2008 by virusman
Based on the Win32 version (c) 2003 by Ingmar Stieger (Papillon)
and Jeroen Broekhuizen
visit us at http://www.avlis.org
* Loading modules...
CHAT plugin Registered.
EVENTS plugin Registered.
FIXES plugin Registered.
FUNCTIONS plugin Registered.
HASHSET plugin Registered.
LETO plugin Registered.
MNX plugin Registered.
ERROR: ODBC: OnCreate() failed.
PROFILER plugin Registered.
RESMAN plugin Registered.
STRUCTS plugin Registered.
TMI plugin Registered.
* NWNX2 activated.
Neverwinter Nights Server
Build:8109
Copyright BioWare Corp 1998-2004
Server: Loading...
Server: Running...
Server: Loading module "aps_demo"...
Server: Module loaded
NWNX!INIT enforcement disabled, using 0x082041ec
* Library ODBC!SPACER does not exist.
* Library ODBC!EXEC does not exist.
* Library ODBC!EXEC does not exist.
* Library ODBC!EXEC does not exist.
* Library ODBC!FETCH does not exist.
* Library ODBC!EXEC does not exist.
* Library ODBC!EXEC does not exist.
* Library ODBC!FETCH does not exist.
|
Obviously the ODBC part isn't working.
1. I've verified that I can log into MySQL through the account nwnx is now set to.
2. I went into the module and set the appropriate scripts to 'MySQL' and removing 'SQLite3'.
3. I copied all of the contents of the 'compiled' folder into the nwnserver folder IAW the README file.
4. I set the nwnstartup.sh and nwnx2.ini files to the correct MySQL information.
5. I log into the game and click the signs and get:
Code: |
Table 'pwdata' deleted.
Creating Table 'pwdata' for MySQL...
Table 'pwdata' created.
Stored 'testValue' in database.
Retreived variable from database:
..................................................................................................
..................................................................................................
..................................................................................................
..................................................................................................
......................................................................................
|
The module confirms that the table is created; however, when I go into MySQL the table is not there.
I can verify that all of the .so files are in the folder, even the nwnx_odbc.so file.
Can anyone help diagnose this?
Last edited by 12o on Thu Nov 19, 2009 20:43; edited 1 time in total |
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Thu Nov 19, 2009 2:20 Post subject: |
|
|
OnCreate failed? That could mean a few things:
- logs.0/nwnx_odbc.txt could not be created (i.e. no write permissions).
- There was an error in loading the configuration. Check logs.0/nwnx_odbc.txt to see if there's a line about it there.
- The functions could not be hooked properly.
- Connecting to the database failed. Again, logs.0/nwnx_odbc.txt will offer some clue as to why if this is the case.
So... paste the contents of nwnx_odbc.txt and all should become clear. |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Thu Nov 19, 2009 3:32 Post subject: |
|
|
Thanks, Fireboar. That pointed me in the right direction.
The problem is with the mysql.sock file. The version of MySQL I was using somehow wasn't creating a .sock file. NWNX couldn't connect to MySQL, but everything else could (not sure how). I completely removed the MySQL due to what I believe was a faulty install, reinstalled it, and now I can run mysqld and it generates the .sock file.
According to the logs file, NWNX is looking for the mysql.sock file in /tmp. However, on my system, mysql puts the file in /tmp/mysqld/mysql.sock. Everything on my pc looks for MySQL there and isn't configurable.
ATM, I'm looking at how NWNX can look for the mysql.sock file in the new place. Any ideas on how I can make nwnx look for /tmp/mysqld/mysql.sock?
---------------------------------------------------
UPDATE
---------------------------------------------------
NWNX does work if /tmp/mysqld/mysql.sock is set in /etc/my.cnf to /tmp/mysql.sock. However, the default installation directory was /tmp/mysqld/mysql.sock.
Just an FYI in case you ever want to incorporate a variable to set the location of the mysql.sock file in the nwnx.ini or other file. |
|
Back to top |
|
|
12o
Joined: 27 Dec 2008 Posts: 35
|
Posted: Thu Nov 19, 2009 20:50 Post subject: |
|
|
Okay. Fixed the problem permanently. Turns out it was a very easy fix.
The problem I was having was getting NWNX to see /tmp/mysqld/mysql.sock. This resulted in the ODBC not registering when ./nwnstartup.sh was executed.
I was unable to just move mysql.sock to /tmp or change the /etc/my.cnf file to the new location as I have other programs that look for the sock file in /tmp/mysqld/, and those can't be changed.
Creating a symbolic link worked. For anyone who might run into this problem:
Code: |
$ cd /tmp
$ sudo ln -sf mysql.sock /tmp/mysqld/mysql.sock
|
I verified this fix works.
-----------------------------------
Addition: Changed the symbolic link to include -f to make the link permanent. I found that stopping MYSQL often removes the symbolic link as well. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|