Unable to add an attribute to an entry in OpenDJ LDAP - opendj

I am trying to add an attribute to a custom objectclass in OpenDJ, but am getting a reference error. I have checked the schema and can't see any reason why I shouldn't be able to add. Here is what I am trying to add:
dn: o=#!aaaa.bbbb.cccc.dddd!0001!eeee.ffff,o=myorg
objectClass: top
objectClass: myOrganization
managerGroup: inum=#!aaaa.bbbb.cccc.dddd!0001!eeee.ffff!0003!5555,ou=groups,o=#!aaaa.bbbb.cccc.dddd!0001!eeee.ffff,o=myorg
o=#!aaaa.bbbb.cccc.dddd!0001!eeee.ffff
When I try add it, I get the following (with long inums replaced with ... for simplicty of this quote):
The DN "inum=...,ou=groups,o=...,o=myorg" could not be parsed due to the following reason: No attribute type with name or OID "inum" exists in the schema.
However, I can add an inum attribute to the the object (e.g. if I create the object without a managerGroup attribute, so inum is a known attribute. Here's the LDIF (in config/schema/101-myorg.ldif):
attributeTypes: ( 1.3.6.1.4.1.48710.1.3.117 NAME 'inum'
DESC 'XRI i-number'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
X-ORIGIN 'internal attribute' )
objectClasses: ( 1.3.6.1.4.1.48710.1.4.4 NAME 'myOrganization'
SUP ( top )
STRUCTURAL
MUST ( objectclass )
MAY ( c $ county $ description $ ... $ inum $ managerGroup $ ... $ o $ ... )
I am able to add an entry with objectClass myOrganization and a managerGroup set to ou=groups....,o=myorg which adds fine. If I modify the entry to include an inum in the value, I get the error.
I have another install (that was run by a 3rd party installer script) which works fine with adding the entry, and I have compared the full schema across both installs, but cannot see any differences in the 2 installs. Yet behaviour changes. Is there anything I am overlooking? How can I resolve this to add the entry?

I wonder if this could be an issue with schema order, I had an issue in the past where I had added an attribute to an objectclass in one of the original schema files (say 01-config.ldif) but the attribute was defined in 99-user.ldif, I saw an error on startup saying the attribute did not exist, all because it needed to be loaded first.

Related

Orphaned SYSTEM.MANAGED.DURABLE.* queue in Websphere MQ

I have a queue 'SYSTEM.MANAGED.DURABLE.ABCD***109' getting messages all the time and no one to consume it.
I tried to get its subscription but got the following result ,
dis sub(*) where (DEST LK 'SYSTEM.MANAGED.DURABLE.ABCD***109')
AMQ8096: IBM MQ subscription inquired.
SUBID(414D5120******************44A0109)
SUB(false)
DEST(SYSTEM.MANAGED.DURABLE.ABCD***44A0108)
then i tried to view the subscription via the subscription id listed,
dis sbstatus(*) where ( SUBID EQ '414D5120***44A0109')
AMQ8099: IBM MQ subscription status inquired.
SUB(false)
SUBID(414D5120***44A0109)
I don't have a subscription named "false" . I'm unable to clear or delete this queue as it is opened. I'm unable to view the open connection as well.
dis conn(*) where (objname eq 'SYSTEM.MANAGED.DURABLE.ABCD***44A0108')
AMQ8461: Connection identifier not found.
I need to cleanup & delete this queue to avoid disk space issue.
You can remove SUB objects with only the SUBID, try to remove it with this command:
DELETE SUB SUBID('414D5120***44A0109')
Note that the command is not specifying the SUB name, just the SUB keyword.
Before you delete it, if you are interested in seeing what the sub name actually is, you may want to try running the following command to dump the subscriptions:
amqldmpa -m <QueueManager> -c T -f /var/mqm/errors/amqldmpa_topic.out
Inside of the file /var/mqm/errors/amqldmpa_topic.out search for the SUBID in question and look for text similar to this:
Subscriber entry
{
SubId ( 414D5120***44A0109)
SubNameString ( SUBNAME_HERE )
TopicString ( TOPIC/STRING/HERE )
<more lines of information go here>
}
What does it show for the SubNameString field? Note that in the 8.0.0.6 version I ran this against it seems to pad each field with a leading and trailing space with the exception of SubId which did not have a trailing space.

Import Postgres dump into a table with CockroachDB

After executing a pg_dump from PostgeSQL, I attempted to import the .sql file into CockroachDB, but received the following errors:
ERROR: unknown variable: "STATEMENT_TIMEOUT"
ERROR: unknown variable: "LOCK_TIMEOUT"
ERROR: unknown variable: "IDLE_IN_TRANSACTION_SESSION_TIMEOUT"
SET
SET
ERROR: unknown variable: "CHECK_FUNCTION_BODIES"
SET
ERROR: unknown variable: "ROW_SECURITY"
SET
ERROR: unknown variable: "DEFAULT_TABLESPACE"
ERROR: unknown variable: "DEFAULT_WITH_OIDS"
CREATE TABLE
ERROR: syntax error at or near "OWNER"
Any guidance?
CockroachDB has special support for using psql, which supports the COPY command (which is faster than batched INSERT statements).
You'll need to do two things:
Clean up the SQL file
Import it into CockroachDB (which sounds like you tried, but I'll include the steps here for anyone else who needs them):
Clean up the SQL File
After generating the .sql file, you need to perform a few editing steps before importing it:
Remove all statements from the file besides the CREATE TABLE and COPY statements.
Manually add the table's PRIMARY KEY constraint to the CREATE TABLE statement.
This has to be done manually because PostgreSQL attempts to add the primary key after creating the table, but CockroachDB requires the primary key be defined upon table creation.
Review any other constraints to ensure they're properly listed on the table.
Remove any unsupported elements, such as arrays.
Import Data
After reformatting the file, you can import it through psql:
$ psql -p [port] -h [node host] -d [database] -U [user] < [file name].sql
For reference, CockroachDB uses these defaults:
[port]: 26257
[user]: root

got error 22 from storage engine mysql

mysqldump: Error: 'got error 22 from storage engine' when trying to dump
tablespaces
mysqldump: Got error: 23: Out of resources when opening file '.\database\table.MYD' (Errcode: 24) when using LOCK TABLES
i got this error when trying to make a dump in any database that I select , looks like that database is corrupted , is possible repair that ?
You seem to have reached the maximum number of open files. This limit is either MySQL's or the system's.
increase the value for the open_files_limit in your MySQL configuration file (this directive does not exist in a default installation, so you might need to create it in the [mysqld] section)
increase the limit at system level (but I am not sure this applies to Windows)
Here are some reasons for this error:
Type “source path-to-SQL-file“. BUT, you must follow these rules:
Use the full source command, not the . shortcut.
Have no spaces in your path. I copied mine to a root of a drive. Note that spaces in the file name is OK, just not the path.
Do not quote the file name, even if it has spaces. This gave error 22.
Use forward slashes in the path, e.g., C:/path/to/filename.sql. Otherwise you’ll get error 2.
Do not end with a semicolon.
Please check your read write access to the drive where you have stored your mySQL database.
error 22 occurred usually when you have no write access to that drive.

Error creating DB in bicgcouch with database_dir moved

I have a cluster setup and I've moved the data dir from /opt/bigcouch/var/lib to /bigcouch
I changed the following lines in /opt/bigcouch/etc/default.ini
database_dir = /bigcouch
view_index_dir = /bigcouch
I'm having a issue where if I try to create a new DB it returns JSON saying the DB was created but the actual DB is not created
I have the owner of the dir set to bigcouch
If I create the DB
curl -X PUT localhost:5984/testDB
and then
curl localhost:5986/dbs/_all_docs
I get zero records back
If you edited the .ini file by hand you'll need to restart bigcouch. I suggest using _config instead in general.

unique or semiunique module ID or Name for any Linux Kernel Module

Is there any way for me to query for an ID or name that could be used to identify a loaded Linux kernel module from within the module.
ex:
within sample.ko
int id = get_module_id(???);
printk("%d", id);
The goal is to use the IDs within a resource tracking system to identify what modules have failed to release resources, so the ID may be theoreticaly non-unique as long as it is unique in a practical system.
The goal here is to minimize change to individual components, so solutions like "define your own identifier" will not work.
If each module version is sufficiently different, the size of the module might be good enough for your purpose:
[wally#lenovotower ~]$ lsmod
Module Size Used by
uvcvideo 51149 0
snd_usb_audio 85970 1
snd_usbmidi_lib 14807 1 snd_usb_audio
snd_rawmidi 16204 1 snd_usbmidi_lib
videodev 70682 1 uvcvideo
media 9214 2 uvcvideo,videodev
vfat 7031 0
fat 37971 1 vfat
You could use the module name as a key.
Alternatively, you could make use of the preprocessor and use the filename (__FILE__) as a key. While it's not guaranteed, the filename is pretty unique for every module.

Resources