Anope IRC Services

Anope Support => 1.8.x/1.7.x Support (Read Only) => Topic started by: Keiro on January 26, 2008, 10:33:32 AM

Title: Backing up fails. Anope gives errors.
Post by: Keiro on January 26, 2008, 10:33:32 AM
At first, I thought it was an IRCD issue till I looked at the Anope logs and saw the following errors:

[12:01:02] -irc.shatteredtears.homelinux.net- *** Global -- from OperServ: WARNING! Backup of hs_request.db failed.
-
[12:01:02] -irc.shatteredtears.homelinux.net- *** Global -- from OperServ: WARNING! Backup of nick.db failed.
-
[12:01:02] -irc.shatteredtears.homelinux.net- *** Global -- from OperServ: WARNING! Backup of bot.db failed.
-
[12:01:02] -irc.shatteredtears.homelinux.net- *** Global -- from OperServ: WARNING! Backup of chan.db failed.
-
[12:01:02] -irc.shatteredtears.homelinux.net- *** Global -- from OperServ: WARNING! Backup of hosts.db failed.
-
[12:01:02] -irc.shatteredtears.homelinux.net- *** Global -- from OperServ: WARNING! Backup of oper.db failed.
-
[12:01:02] -irc.shatteredtears.homelinux.net- *** Global -- from OperServ: WARNING! Backup of news.db failed.
-
[12:01:02] -irc.shatteredtears.homelinux.net- *** Global -- from OperServ: WARNING! Backup of exception.db failed.
-

This is from mIRC.

The log from Anope gives the same error.

[Jan 26 00:01:02 2008] Backup of hs_request.db failed.
[Jan 26 00:01:02 2008] Backing up databases
[Jan 26 00:01:02 2008] Backup of nick.db failed.
[Jan 26 00:01:02 2008] Backup of bot.db failed.
[Jan 26 00:01:02 2008] Backup of chan.db failed.
[Jan 26 00:01:02 2008] Backup of hosts.db failed.
[Jan 26 00:01:02 2008] Backup of oper.db failed.
[Jan 26 00:01:02 2008] Backup of news.db failed.
[Jan 26 00:01:02 2008] Backup of exception.db failed.

So, how do I fix that? Is it mysql? If it is, then why is it doing that? I do have mysql, but not for IRC!

O_o...o_O...and I have another set of errors after trying /OS Restart

[Jan 26 02:22:46 2008] debug: trying to load core module [ms_rsend]
[Jan 26 02:22:46 2008] debug: status: [6][Module Error, Error during load time or module returned MOD_STOP]
[Jan 26 02:22:49 2008] Databases loaded
[Jan 26 02:22:49 2008] Info: Reflecting database records.
[Jan 26 02:22:49 2008] Connected to Server 1 (localhost:7030)
[Jan 26 02:22:49 2008] trying to load [cs_appendtopic]
[Jan 26 02:22:49 2008] [cs_appendtopic] Loaded successfully
[Jan 26 02:22:49 2008] status: [cs_enforce]
[Jan 26 02:22:49 2008] status: [ns_maxemail]
[Jan 26 02:22:49 2008] status: [os_info]
[Jan 26 02:22:49 2008] os_info: Loading configuration directives...
[Jan 26 02:22:49 2008] os_info: OSInfoDBName is not defined in Services configuration file, using default os_info.db
[Jan 26 02:22:49 2008] os_info: Directive OSInfoDBName loaded (os_info.db)...

Database issue, it looks like... unless I'm wrong?

[Edited on 26-1-08 by Keiro]
Title:
Post by: Jan Milants on January 26, 2008, 11:32:31 AM
Code: [Select]
debug: status: [6][Module Error, Error during load time or module returned MOD_STOP]
is no error, it simply auto-unloads if it is not required in your setup..

Code: [Select]
[os_info: OSInfoDBName is not defined in Services configuration file, using default os_info.db
no error either, just informing which db it s using...

make sure you have enough free HD space and that you acctually have writing permissions on the  backup directory..

[Edited on 26-1-2008 by Viper]
Title:
Post by: Keiro on January 26, 2008, 11:48:49 AM
The hard drive is 400GB.

I have like...almost 99% of it free.

I'm using almost 20GB, most of that installed programs.

The rest? Just sitting there, waiting to be used. 8D

Ahh, okay, I'm still somewhat learning my way around Anope, and so far, it has been enjoyable, learning how these things work together. :D

Edit: Writing permissions for...? Anope? Myself or what?

[Edited on 26-1-08 by Keiro]
Title:
Post by: Jan Milants on January 26, 2008, 01:38:49 PM
writing permissions for the user anope is running under...
Title:
Post by: Keiro on January 26, 2008, 03:14:24 PM
Which would mean that I have to give it permissions...in the logs? Or the databases?

I'll poke around in the installed files to see exactly where.

Hmm. I'm assuming it's the data folder.

So far, giving Anope write access has been unsuccessful.

:| XP is a pain in the ass.

[Edited on 26-1-08 by Keiro]
Title:
Post by: Jan Milants on January 26, 2008, 04:10:40 PM
oh it s on windows... then i can't really help...

it just needs write access to the "backups" directly.. at least on *nix
Title:
Post by: Keiro on January 26, 2008, 04:29:29 PM
It's alright, Viper.

You gave me the hints, and I've been trying to get Anope the access it needs.

At least, when I compile it in Linux, I'll know exactly where to look for if I see this error.

Could I have how you'd do it in Linux please?
Title:
Post by: Rhainor on February 26, 2008, 08:00:26 AM
I'm having this same problem (backup failed).

I'm running the latest version of UnrealIRCd with Anope v1.7.12 (non-MySQL version) on Windows XP.

I had it running perfectly once before.  I recently had to consolidate my various webserver software onto the primary hard drive; Anope was one of the things which had to be relocated from the secondary drive.  After uninstalling it and re-installing in the new location, I get this error.  I copied the "services.conf" file from the old installation to the new one (same goes for the UnrealIRCd config), but I don't remember whether or not I was using the MySQL version of Anope on the previous installation.

Any help would be appreciated.
Title:
Post by: Rhainor on March 23, 2008, 03:30:17 AM
Bump.

It's been a month.  Can't anyone help?
Title:
Post by: katsklaw on March 23, 2008, 03:35:10 AM
backup failures only occur when Anope can not write to disk. This is ONLY due to lack of disk/quota or wrong permissions. Please consult your Operating System help files on how to change permissions as permissions has nothing to do with Anope.
Title:
Post by: okami on April 02, 2008, 06:39:13 PM
BUMP


Okay i DO NOT have a lack of disk space, Anope CAN write to the disk there is nothing denying this function, there IS something preventing anope however from backing up the databases on the windows version of anope.

i am using version 1.7.21 and am still looking for an answer to this ongoing issue, if you don't know then your not helping by giving the same answers. because this is clearly NOT due to a lack of disk space or file permissions.

And don't think im a noob to this i have been behind a keyboard for 25y i know enough about my OS to give a file/folder write permission.
Title:
Post by: steellord on April 24, 2008, 06:54:19 AM
Well this is the src
static void rename_database(char *name, char *ext)
{

    char destpath[PATH_MAX];

    snprintf(destpath, sizeof(destpath), "backups/%s.%s", name, ext);
    if (rename(name, destpath) != 0) {
        alog("Backup of %s failed.", name);
        anope_cmd_global(s_OperServ, "WARNING! Backup of %s failed.",
                         name);
    }
}

notice the line "backups/%s.%s"
try creating a folder in your c:/program files/anope/ (or whatever directory you installed to) because it wont create the directory. it's simply failing because you dont already have one.
Title:
Post by: steellord on April 24, 2008, 07:04:30 AM
meh i just noticed i didnt help you. create a directory named "backups" in the anope folder.
c:/program files/anope/backups
also try
c:/program files/anope/data/backups
dunno which ever one it would go to. usually in windows if you begin with a directory/
it's looking in the folder the .exe is located in.
hope it helps.
Title:
Post by: steellord on April 25, 2008, 06:45:49 AM
I installed anope for windows and ran a test. it didnt install a "backups" folder in the anope/data/ directory. it gave me the same errors when it tried to backup my databases. i added anope/data/backups directory and it works fine now. that is your problem. :)
Title: anope error
Post by: nicolacharmed on April 29, 2008, 09:20:51 AM
hehe i having same problem as well and am going to try things said before this post! here's hoping it works

nic
Title:
Post by: llearch on June 23, 2008, 12:42:29 AM
Since this page shows up in google when looking for this particular error - even though I'm running Debian, not Windows - I thought I'd post the possible solution I ended up finding, in the hope that it saves someone else from days or weeks of scratching their head and trying to figure out why backups are failing.

The anope startup script[1] doesn't set $PWD at all. So, if started from /etc/init.d,  it doesn't start from the services directory, and "backups/%s.%s" doesn't actually translate to anything useful - probably /backups/ or something, which I wasn't willing to set as writable for anope... ;-]

The solution is trivial; add a line that does a "cd $ANOPEDIR" in there, up towards the top, and set the variable to something appropriate, then shutdown and restart services, and it should all be hunky-dory.


... The annoying bit is I'll have to wait another 24 hours to see if it worked. I'll let you know if it didn't.


Incidentally, it'd be downright useful if debug mode reported precisely what path it was trying to back up the db to when it ran, rather than merely reporting the precise path of the db it's backing up twice. I suspect I should go put a feature request in somewhere else, though... *grin*


[1] ah, $SBIN/anoperc, rather than anything in /etc/init.d - I've patched the anoperc into /etc/init.d/unreal, rather than having two scripts, which is probably a bit of a bodge, but it works...
Title:
Post by: katsklaw on June 23, 2008, 01:15:23 AM
ok, stop

Anope has nothing to do with /etc/init.d or anything else that llearch said .. on *nix, if anope can not create backups then it's a simple permissions problem.

if you get the error on Windows it's either the same permissions problem or the backups directory doesn't exist.

nothing more and nothing less.
Title:
Post by: TommyGun on June 23, 2008, 03:46:05 PM
Aint getting this shit fixed. Folder is chmodded 777, and the user who runs services is the owner of it. so why the fuck are the backups failing?

ty
Title:
Post by: Jan Milants on June 23, 2008, 05:12:19 PM
something that cannot be reproduced cannot be debugged and therefore not fixed...
as for starting anope through an init script, if it starts anope as root, it is not supported.
Title:
Post by: TommyGun on June 23, 2008, 06:45:34 PM
Not started via init, neither as root. Just logged in as a 'normal' user and runned ./services in the anope dir
Title:
Post by: katsklaw on June 23, 2008, 10:22:31 PM
Quote
Originally posted by TommyGun
Not started via init, neither as root. Just logged in as a 'normal' user and runned ./services in the anope dir


It works for everyone else so you must be doing something wrong which we have already covered.
Title:
Post by: TommyGun on June 24, 2008, 08:06:39 AM
Yeh right, for everyone else. Members like okami  just gave up because they didnt post anymore after saying that it still doesnt work.

Its something else then lack of space and permissions.

Bugged shit

[Edited on 24-6-2008 by TommyGun]
Title:
Post by: katsklaw on June 24, 2008, 12:19:23 PM
Quote
Originally posted by TommyGun
Yeh right, for everyone else. Members like okami  just gave up because they didnt post anymore after saying that it still doesnt work.

Its something else then lack of space and permissions.

Bugged shit

[Edited on 24-6-2008 by TommyGun]


ok lets do some math. 3 people have the same issue. That's 3 out of the 15,000 that use Anope.

So you tell me what is bullshit! Anope has a problem? .. NO!

The problem is the 3 people that can't seem to follow directions. Anope CAN do backups, 3 people CAN'T follow directions!

There is not need to edit anything! No need for init scripts .. no need for src code editing .. the only NEED is for 3 people to read the damned manual and do as they are asked when someone like my self, who by the way have backups working fine, to do as they asked!@!

If you insall Anope as a REGULAR NON-ROOT USER in /usr/home/user or /home user just like the instructions tell you, then there is only 4 possibilities and the 4th one is highly doubful

1>LACK OF PERMISSIONS
2>LACK OF DISK SPACE/QUOTA
3> YOU ENABLED "NOBACKOKAY" IN SERVICES.CONF
4> YOUR OS IS A PIECE OF SHIT

So again .. what's really the bullshit here?!

I'd bet money that if you gave me ssh access o your shell that I can fix your "problem" in less than 5 minutes by following the directions. Dare you take that bet?? Come on I dare one of you to prove me wrong!!

[Edited on 24-6-2008 by katsklaw]
Title:
Post by: Jan Milants on June 24, 2008, 02:43:12 PM
this particular error is only ever send if rename() fails...
can't see what anope could be doing wrong in sending a rename("nick.db", "backups/nick.date").
Title:
Post by: TommyGun on June 25, 2008, 11:22:34 AM
Quote
Originally posted by katsklaw
Quote
Originally posted by TommyGun
Yeh right, for everyone else. Members like okami  just gave up because they didnt post anymore after saying that it still doesnt work.

Its something else then lack of space and permissions.

Bugged shit

[Edited on 24-6-2008 by TommyGun]


I'd bet money that if you gave me ssh access o your shell that I can fix your "problem" in less than 5 minutes by following the directions. Dare you take that bet?? Come on I dare one of you to prove me wrong!!

[Edited on 24-6-2008 by katsklaw]


Good! How can we trade login information and such?

pz -T
Title:
Post by: katsklaw on June 26, 2008, 01:09:51 AM
this forum has a built in PM system. I wouldn't waste too much time getting the info to me .. this offer DOES expire.

[Edited on 26-6-2008 by katsklaw]
Title:
Post by: katsklaw on June 26, 2008, 10:52:42 AM
to okami,

You need to make sure that the data\backups directory exists. For some reason it was excluded from the installer and on Windows it doesn't auto create. *nix doesn't have this issue,
Title:
Post by: TommyGun on June 26, 2008, 06:12:42 PM
U got PM
Title:
Post by: katsklaw on June 26, 2008, 11:52:00 PM
TommyGun,

1> That install is in the root group, which means you didn't install as a non-root user as you was clearly instructed.
2> I wouldn't be able to re-compile because you deleted the source directory, which is rather important since you didn't set Anope's default permissions. So I don't have all the resources needed to insure all steps are followed.
3> As per #2 I can't change the default permissions back to what they were and they are not set to now because again the source directory is missing. This is important because the permissions set during configuration is the permissions used by Anope forever until told otherwise, thus chmod will not be enough to fix the issue.
4> Also because of #2 you have prevented me from completing all steps required to insure that your backups work properly. Therefore I can no longer help you.
5> The creation timestamps on all the files are the same day that you last successfully backup, this suggests something has changed. Like say moved from one box to another and the new compile is not the same as the old, namely permissions. Which you was also clearly instructed that permissions is a primary reason for the backups to fail.

In short you failed to follow all instructions and wasted my time. The login information that you PM'ed to me has been deleted as I no longer need it.

Good luck fixing your services.

ciao.

PS: It's not a good idea to run your IRCd as root either. Additionally as a side note, Anope1.6.4 does not fully support Unreal 3.2 .. I suggest you upgrade to 1.7.21 if you wish to continue using that ircd. Also, do NOT delete the source directory as you will likely need it again in the future.
Title: Re: Backing up fails. Anope gives errors.
Post by: Keiro on July 19, 2008, 03:49:26 PM
facepalmed

Directory issues.

Figures.

:@ Well, at least it should be fixable the next time I reinstall Anope+UnrealIRCD

At this time though, I'm running Ubuntu with Anope.

It is working quite well now. :D 1.7.21 and 3.2.7 for those of you wondering what versions I'm running. >_>;