Page 1 of 2
Newly setup local server, cannot create accounts
Posted: Sat Jul 18, 2015 2:17 pm
by theRonLewis
Hi all,
I searched around a bit on the forums, and found some *similar* issues, but not quite this.
I've been able to get everything compiled and working as far as I can tell, but I'm running into issues now that I'm interacting with the servers. I followed all the directions in the Building the Server page on the wiki. I have my windower profile configured to look at localhost, and I can see it connecting to the DSConnect-Server, but when I try to create an account, there is an error creating the account.
I keep getting a SQL error:
DB error - Column 'timelastmodify' cannot be null
Then shows the query which caused the problems (obviously the insert into accounts).
In ffxiloader, it says username is already taken, but that is definitely not the case.
I could just manually add the account into the table, or I could also dig around, find the source of the query, and fix it, but I figure that this shouldn't be happening, and was hoping to resolve the issue.
Tips, hints, suggestions? My firewall is completely disabled, and I just pulled down a fresh copy of DS master as well, just in case - but no luck.
Re: Newly setup local server, cannot create accounts
Posted: Sat Jul 18, 2015 4:53 pm
by Desufire
Try Ashita. I don't know why, but after the June update, Windower has been acting up when creating a new character. Me and a Gm on my server were able to create new using Ashita but not with Windower.
It's weird because we've had new players join and a few of them use Windower and they didn't have an issue.
Re: Newly setup local server, cannot create accounts
Posted: Sat Jul 18, 2015 7:43 pm
by whasf
Make sure you have the latest source from github, and rebuild your connect server. I think that was a problem a while back with the NULL column
Re: Newly setup local server, cannot create accounts
Posted: Sat Jul 18, 2015 8:23 pm
by theRonLewis
I think I've found the issue, but I'm doing a little more checking into it. I want to make sure that it's not something to do with a MySQL vs. Microsoft SQL. If I think there's a need, I'll put in a PR.
Re: Newly setup local server, cannot create accounts
Posted: Sat Jul 18, 2015 8:35 pm
by TeoTwawki
"pass" is not a valid password. Minimum 6 characters for a password. That is only 4.
Edit:
Microsoft SQL.
This project uses only* mysql, and the 2 are not interoperable. Just mentioning because I run into a lot of people who think microsoft's product is "better" and try to run DSP using it without understanding this won't work. Not without some custom editing anyway.
*
or MariaDB, which is a drop in fully compatible replacement - the connector dsp uses even comes from MariaDB
Re: Newly setup local server, cannot create accounts
Posted: Sat Jul 18, 2015 9:27 pm
by theRonLewis
Ok, reverted my fix. Tried a longer password, but still the same problem. See image.
Here's the story with sql on my machine though. I'm honestly not sure what I'm running. When I'm in the command prompt and I'm using mysql run mysql and login as root, I can login fine, and it says... "Server version 5.6.17 MySQL Community Server (GPL)" (see image). So that leads me to believe that I'm running MySQL.
But when I look into task manager, services tab, I don't see anything for MySQL running. I only see SQLWriter, description SQL Server VSS Writer.
I had to play around with alotta config stuff on my computer or a previous project, but that was also using MySQL. I've used wamp server to host a php mysql server for the webapp we were building at the time. I am currently running wamp to make things run. Maybe this is part of the problem? In task manager services, I do see a wampmysqld64 processs running.
Either way, here is how I fixed it. I tried to change the default value for the timelastmodify field in sql/accounts.sql CURRENT_TIMESTAMP but that did not work. What did work was going into src/login/login_auth.cpp and changing line 250 so that the insert statement doesn't have NULL for timelastmodify, but instead CURRENT_TIMESTAMP. I haven't created a PR yet because I would like to confirm the change is actually needed and isn't an issue on my end, but the changes can be seen/compared
here.
edit: not sure why my master branch updates are in the compare changes (and most likely the PR too I'd assume). is that normal?
Re: Newly setup local server, cannot create accounts
Posted: Sat Jul 18, 2015 11:38 pm
by TeoTwawki
If using MySQL Community Edition the exe name is "mysqld.exe" and the service name is "MySQL56" (the 56 will change between versions when they update). wampmysqld64 is your 64 bit equivalent of mysqld.
I wouldn't use WAMP to run a DSP server. I don't know if its a definite problem but I do know it has a bunch of stuff not needed to run DSP. WAMP/XAMP/LAMP are mainly used for people to quickly setup websites without actually knowing much about setting up websites. I Run a LAMP stack on a laptop to test webcode before rolling out any major changes to domains I manage. (For those who don't know: replace "
Windows" with "
Linux", the other 3 letters are
Apache
MySQL and
PHP)
It's possible you stumbled on an obscure incompatibility with your specific setup, and hopefully that change can be accepted into main trunk to prevent it from hitting anyone else. At least, I've yet to ever see or hear of this prob and I don't recall any recent changes there. I have a fairly recent clean build with a fresh database I made without running into it (less than a week old).
not sure why my master branch updates are in the compare changes (and most likely the PR too I'd assume). is that normal?
If its just merges you probably did your updates by merging DSP's master into yours, rather than just pulling DSP to your local copy then pushing back to your remote. I think You can just rebase to keep those out of the pull request.
Tip: Never commit anything to master, only use it to pull from DSP's master to update it. Instead always create new branches for whatever changes you make for pull requests, and an extra branch for your server if you need to commit any customizations. When you create a new branch using githubs website interface it will always start off as a 1:1 copy of your master branch (not dsp's master branch) so any changes you have in master will wind up replicated to the new branches.
Also, never ever touch that pos github for windows. Literally anything is better. I use a combination of tortoisegit and command line (tortoises right click menu is handy) myself. And Trying to use just the github website alone for everything is almost as bad as the github app. Almost.
Re: Newly setup local server, cannot create accounts
Posted: Sun Jul 19, 2015 8:02 am
by theRonLewis
Alright. I'm going to try and get the proper version of sql running, and my test server up and running without wamp, as I would prefer it to be setup like everyone else. I thought that I had this already, but I guess I probably only have MySQL Workbench, and not the actual MySQL service, since apparently thats been being provided by wamp. Thanks for the more in depth description of wamp/lamp. At the time it was... get this shit working so you can work on your project for class before the semesters over, ha.
I found the information to fix the issue I was having
here. After reading it again, I'm unsure whether assigning a NULL value should be OK or not, but it seems to not be causing issues for anyone else (at least that we know of). It is defined in the table to be not null.
Code: Select all
DROP TABLE IF EXISTS `accounts`;
CREATE TABLE IF NOT EXISTS `accounts` (
`id` int(10) unsigned NOT NULL DEFAULT '0',
`login` varchar(16) NOT NULL DEFAULT '',
`password` varchar(64) NOT NULL DEFAULT '',
`email` varchar(64) NOT NULL DEFAULT '',
`email2` varchar(64) NOT NULL DEFAULT '',
`timecreate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`timelastmodify` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`content_ids` tinyint(2) unsigned NOT NULL DEFAULT '16',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1',
`priv` tinyint(3) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
RE: The PR and merges. I was merging DSP's master into mine, so I'll stop doing that. I didn't think I was doing commits into master, but I guess when I was making a PR and merging, thats essentially the same as pulling all the commits that have been made into DSP master and comitting them to mine. I'll research rebasing. Also researching how to use tortoisegit more as well. I've got both git and tortoisegit installed already, so it should just be a matter of getting familiar with the interfaces.
Teo if I'm still getting a grasp on this and figuring out tortoisegit or the sql stuff later this week with not much luck, might you be able to share 15~20minutes of your time with me?
Re: Newly setup local server, cannot create accounts
Posted: Sun Jul 19, 2015 1:35 pm
by TeoTwawki
Its entirely possible some people had the issue and never actually reported it too. The project gets that a lot...
If you poke me on IRC I can usually remote in to assist via either anydesk or teamviewer, both of which have no-install portable exe's if desired. I won't be around much till after the 23rd though.
Re: Newly setup local server, cannot create accounts
Posted: Sun Jul 19, 2015 2:03 pm
by kjLotus
teotwawki wrote:Its entirely possible some people had the issue and never actually reported it too. The project gets that a lot...
If you poke me on IRC I can usually remote in to assist via either anydesk or teamviewer, both of which have no-install portable exe's if desired. I won't be around much till after the 23rd though.
everyone's server assigns NULL into the timestamp (because MySQL automatically replaces it with the current time)