Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: anope wont flatefile database  (Read 5714 times)

0 Members and 1 Guest are viewing this topic.

pehden

  • Anope User
  • Offline Offline
  • Posts: 6
anope wont flatefile database
« on: January 17, 2014, 06:01:25 AM »



running arch, 
anope-devel 2.0.0_rc1-1
unrealircd 3.2.10.2-1

they are connected, i have been able to log in with a registered nick, then /msg operserv update,  it says complete
but when i restart i have to re register the nicks.

ls -alt /var/lib/anope/
total 20
drwxr-xr-x 39 root  root  4096 Jan  8 08:21 ..
drwxr-xr-x  4 anope anope 4096 Jan  7 07:25 .
-rwxrwx---  1 anope anope 1205 Jan  7 07:25 anope.db
drwxr-xr-x  3 anope anope 4096 Jan  6 01:44 data
drwxr-xr-x  2 anope anope 4096 Jan  6 01:44 runtime

Logged

pehden

  • Anope User
  • Offline Offline
  • Posts: 6
Re: anope wont flatefile database
« Reply #1 on: January 17, 2014, 07:16:18 PM »

Bumb

Also, would like to switch from flatfile to mysql but there is nothing on an how to go about doing this.
"
flatfile config,
module
{
##Changed to this location, because thought the issue was with permissions well it doesn't save anywhere. even with the correct permissions.
   name = "anope.db"

   /*
    * The database name db_flatfile should use
    */
   database = "anope.db"

   /*
    * Sets the number of days backups of databases are kept. If you don't give it,
    * or if you set it to 0, Services won't backup the databases.
    *
    * NOTE: Services must run 24 hours a day for this feature to work.
    *
    * This directive is optional, but recommended.
    */
   keepbackups = 3

   /*
    * Allows Services to continue file write operations (i.e. database saving)
    * even if the original file cannot be backed up. Enabling this option may
    * allow Services to continue operation under conditions where it might
    * otherwise fail, such as a nearly-full disk.
    *
    * NOTE: Enabling this option can cause irrecoverable data loss under some
    * conditions, so make CERTAIN you know what you're doing when you enable it!
    *
    * This directive is optional, and you are discouraged against enabling it.
    */
   #nobackupokay = yes

   /*
    * If enabled, services will fork a child process to save databases.
    *
    * This is only useful with very large databases, with hundreds
    * of thousands of objects, that have a noticeable delay from
    * writing databases.
    *
    * If your database is large enough cause a noticeable delay when
    * saving you should consider a more powerful alternative such
    * as db_sql or db_redis, which incrementally update their
    * databases asynchronously in real time.
    */
   fork = yes
}



I would be interested in this method, if anyone has this working.

module
{
   name = "db_sql"
   #name = "db_sql_live"

   /*
    * The SQL service db_sql(_live) should use, these are configured in modules.conf.
    * For MySQL, this should probably be mysql/main.
    */
   engine = "mysql/main"

   /*
    * An optional prefix to prepended to the name of each created table.
    * Do not use the same prefix for other programs.
    */
   prefix = "anope_db_"

   /* Whether or not to import data from another database module in to SQL on startup.
    * If you enable this, be sure that the database services is configured to use is
    * empty and that another database module to import from is loaded before db_sql.
    * After you enable this and do a database import you should disable it for
    * subsequent restarts.
    *
    * Note that you can not import databases using db_sql_live. If you want to import
    * databases and use db_sql_live you should import them using db_sql, then shut down
    * and start services with db_sql_live.
    */
   import = false
}

« Last Edit: January 17, 2014, 08:56:56 PM by pehden »
Logged

pehden

  • Anope User
  • Offline Offline
  • Posts: 6
Re: anope wont flatefile database logs
« Reply #2 on: January 17, 2014, 08:19:51 PM »

cat /etc/systemd/anope.service
Code: [Select]
[Unit]
Description=Anope IRC Services
Requires=network.target
After=network.target
 
[Service]
Type=simple
PIDFile=/run/anope/anope.pid
ExecStart=/usr/bin/services --confdir=/etc/anope --dbdir=/var/lib/anope --localedir=/usr/lib/anope/locales --logdir=/var/log/anope --modulesdir=/usr/lib/anope --nofork
ExecReload=/bin/kill -1 $MAINPID
User=anope
Group=anope
 
[Install]
WantedBy=multi-user.target

[Jan 17 01:02:03 2014] ADMIN: pehden!pehden@localhost used LOGIN and successfully identified to OperServ
[Jan 17 01:02:06 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 01:02:29 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:01 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:02 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:02 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:03 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:03 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:04 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:04 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:06 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:08 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:10 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:12 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:14 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:16 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:18 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:20 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:22 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:24 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:26 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:30 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:15:32 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:30:56 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 03:37:46 2014] ADMIN: pehden!pehden@localhost used RELOAD
[Jan 17 03:37:46 2014] Inheriting commands and privs from Helper to Services Operator
[Jan 17 03:37:46 2014] Inheriting commands and privs from Services Operator to Services Administrator
[Jan 17 03:37:46 2014] Tied oper pehden to type Services Root
[Jan 17 03:37:46 2014] Successfully set user to anope
[Jan 17 03:37:46 2014] Successfully set group to anope
[Jan 17 03:37:49 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 04:36:05 2014] ADMIN: pehden!pehden@localhost used SESSION view localhost
[Jan 17 04:57:32 2014] ADMIN: pehden!pehden@localhost used SESSION view localhost
[Jan 17 04:58:25 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 13:17:20 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 14:07:48 2014] ADMIN: pehden!pehden@localhost used UPDATE
« Last Edit: January 17, 2014, 10:07:39 PM by pehden »
Logged

pehden

  • Anope User
  • Offline Offline
  • Posts: 6
Re: anope wont flatefile database
« Reply #3 on: January 17, 2014, 08:48:15 PM »

after adding  -debug to services on anope.services

Code: [Select]
[Unit]
Description=Anope IRC Services
Requires=network.target
After=network.target
 
[Service]
Type=simple
PIDFile=/run/anope/anope.pid
ExecStart=/usr/bin/services -debug  --confdir=/etc/anope --dbdir=/var/lib/anope --localedir=/usr/lib/anope/locales --logdir=/var/log/anope --modulesdir=/usr/lib/anope --nofork
ExecReload=/bin/kill -1 $MAINPID
User=anope
Group=anope
 
[Install]
WantedBy=multi-user.target
[Jan 17 14:45:04.272607 2014] ADMIN: pehden!pehden@localhost used LOGIN and successfully identified to OperServ
[Jan 17 14:45:04.272832 2014] Sent: :OperServ NOTICE pehden :Password accepted.
[Jan 17 14:45:06.432168 2014] Received: :pehden PRIVMSG operserv :update
[Jan 17 14:45:06.432422 2014] ADMIN: pehden!pehden@localhost used UPDATE
[Jan 17 14:45:06.432639 2014] Sent: :OperServ NOTICE pehden :Updating databases.
[Jan 17 14:45:06.432760 2014] Saving databases
« Last Edit: January 17, 2014, 10:08:14 PM by pehden »
Logged

pehden

  • Anope User
  • Offline Offline
  • Posts: 6
Re: anope wont flatefile database
« Reply #4 on: January 17, 2014, 08:52:34 PM »

% ls -alt /var/lib/anope
total 16
drwxr-xr-x 39 root  root  4096 Jan 17 14:13 ../
drwxr-xr-x  4 anope anope 4096 Jan 17 05:10 ./
drwxr-xr-x  3 anope anope 4096 Jan 17 05:10 data/
drwxr-xr-x  2 anope anope 4096 Jan 17 05:10 runtime/


data has an empty backups folder, and runtime is empty
« Last Edit: January 17, 2014, 08:56:10 PM by pehden »
Logged

pehden

  • Anope User
  • Offline Offline
  • Posts: 6
Re: anope wont flatefile database
« Reply #5 on: January 17, 2014, 09:42:28 PM »

After a long bit of trial and no error but fail, we managed to fix this, with editing the /etc/systemd/anope.service
to include -debug after .service

and running chown -R anope /var/lib/anope
for some reason this did the fix I am assuming.

Thanks to arch for the thrown together anope-devel or who ever made it....at least its working now.
Logged
Pages: [1]   Go Up