Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2   Go Down

Author Topic: Backing up fails. Anope gives errors.  (Read 18144 times)

0 Members and 1 Guest are viewing this topic.

Keiro

  • Anope User
  • Offline Offline
  • Posts: 35
Backing up fails. Anope gives errors.
« 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:
  • [Module, Okay - No Error]
  • [Jan 26 02:22:49 2008] trying to load
[cs_enforce]
[Jan 26 02:22:49 2008] status:
  • [Module, Okay - No Error]
  • [Jan 26 02:22:49 2008] trying to load
[ns_maxemail]
[Jan 26 02:22:49 2008] status:
  • [Module, Okay - No Error]
  • [Jan 26 02:22:49 2008] trying to load
[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]
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #1 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]
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Keiro

  • Anope User
  • Offline Offline
  • Posts: 35
(No subject)
« Reply #2 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]
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #3 on: January 26, 2008, 01:38:49 PM »

writing permissions for the user anope is running under...
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Keiro

  • Anope User
  • Offline Offline
  • Posts: 35
(No subject)
« Reply #4 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]
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #5 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
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Keiro

  • Anope User
  • Offline Offline
  • Posts: 35
(No subject)
« Reply #6 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?
Logged

Rhainor

  • Anope User
  • Offline Offline
  • Posts: 12
(No subject)
« Reply #7 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.
Logged

Rhainor

  • Anope User
  • Offline Offline
  • Posts: 12
(No subject)
« Reply #8 on: March 23, 2008, 03:30:17 AM »

Bump.

It's been a month.  Can't anyone help?
Logged

katsklaw

  • Guest
(No subject)
« Reply #9 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.
Logged

okami

  • Anope User
  • Offline Offline
  • Posts: 4
    • http://okami-designs.sytes.net
(No subject)
« Reply #10 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.
Logged

steellord

  • Anope User
  • Offline Offline
  • Posts: 3
(No subject)
« Reply #11 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.
Logged

steellord

  • Anope User
  • Offline Offline
  • Posts: 3
(No subject)
« Reply #12 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.
Logged

steellord

  • Anope User
  • Offline Offline
  • Posts: 3
(No subject)
« Reply #13 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. :)
Logged

nicolacharmed

  • Anope User
  • Offline Offline
  • Posts: 7
anope error
« Reply #14 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
Logged

llearch

  • Anope User
  • Offline Offline
  • Posts: 2
(No subject)
« Reply #15 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...
Logged

katsklaw

  • Guest
(No subject)
« Reply #16 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.
Logged

TommyGun

  • Anope User
  • Offline Offline
  • Posts: 11
(No subject)
« Reply #17 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
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #18 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.
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

TommyGun

  • Anope User
  • Offline Offline
  • Posts: 11
(No subject)
« Reply #19 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
Logged

katsklaw

  • Guest
(No subject)
« Reply #20 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.
Logged

TommyGun

  • Anope User
  • Offline Offline
  • Posts: 11
(No subject)
« Reply #21 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]
Logged

katsklaw

  • Guest
(No subject)
« Reply #22 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]
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #23 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").
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

TommyGun

  • Anope User
  • Offline Offline
  • Posts: 11
(No subject)
« Reply #24 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
Logged
Pages: [1] 2   Go Up