Tag Archives: dm

Mgr [error]: library file libdmhs_exec.so not found, error: 0

DM8 reports an error when building DMHS
Mgr [error]: library file libdmhs_ Exec.so not found, error: 0

DMHS> start exec
CSL[ERROR]: Failed to load execution module

view log

MGR[INFO]: Loading execution module...
MGR[ERROR]: Library file libdmhs_exec.so not found, Error: 0
MGR[ERROR]: Log execution failed to start

Solution:
LDD tracking library file

[dmdba@DM bin]$ ldd libdmhs_exec.so
	linux-vdso.so.1 =>  (0x00007ffe819f6000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f3897ed8000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f3897bd5000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f38979cd000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f38977b1000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f38975ac000)
	libdmhs_pub.so => ./libdmhs_pub.so (0x00007f3897280000)
	libdmhs_ucvt.so => ./libdmhs_ucvt.so (0x00007f3896d25000)
	libdmhs_dm_obj.so => ./libdmhs_dm_obj.so (0x00007f3896b0f000)
	libdmhs_cvt.so => ./libdmhs_cvt.so (0x00007f3896886000)
	libdodbc.so => /opt/dmdbms/bin/libdodbc.so (0x00007f389665a000)
	/lib64/ld-linux-x86-64.so.2 (0x0000563b938c3000)
	libdmhs_exp.so => ./libdmhs_exp.so (0x00007f3896284000)
	libdmhs_xml.so => ./libdmhs_xml.so (0x00007f3896075000)
	libdmoci.so => not found
	libdmdpi.so => /opt/dmdbms/bin/libdmdpi.so (0x00007f3895406000)
	libdmfldr.so => /opt/dmdbms/bin/libdmfldr.so (0x00007f38947d5000)
	libdmelog.so => /opt/dmdbms/bin/libdmelog.so (0x00007f38945ce000)
	libdmutl.so => /opt/dmdbms/bin/libdmutl.so (0x00007f38943bc000)
	libdmclientlex.so => /opt/dmdbms/bin/libdmclientlex.so (0x00007f3894189000)
	libdmos.so => /opt/dmdbms/bin/libdmos.so (0x00007f3893f5c000)
	libdmcvt.so => /opt/dmdbms/bin/libdmcvt.so (0x00007f389387d000)
	libdmstrt.so => /opt/dmdbms/bin/libdmstrt.so (0x00007f3893669000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f3893360000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f389314a000)
	libdmmem.so => /opt/dmdbms/bin/libdmmem.so (0x00007f3892f3c000)
	libdmcalc.so => /opt/dmdbms/bin/libdmcalc.so (0x00007f3892cb7000)

Libdmoci.so not found

[dmdba@DM bin]$ pwd
/home/dmdba/dmhs/bin
[dmdba@DM bin]$ find -name libdmoci.so
./stat/libdmoci.so
[dmdba@DM bin]$ cat /home/dmdba/.bash_profile 
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/dmdbms/bin"
export DM_HOME="/opt/dmdbms"
export DMHS_HOME=/home/dmdba/dmhs
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/dmdba/dmhs/bin
[dmdba@DM bin]$ cp ./stat/libdmoci.so ./

Find and find it in/home/dmdba/DMHS/bin/STAT/libdmoci.so, but LD_ LIBRARY_ Path is not specified in this directory. Copy libdmoci.so to LD_ LIBRARY_ Under the directory specified by path, or add LD_ LIBRARY_ The path points to/home/dmdba/DMHS/bin/STAT
(if find is not found, you need to download one online)

Try LDD it again

[dmdba@DM bin]$ ldd libdmhs_exec.so
	linux-vdso.so.1 =>  (0x00007ffcf27be000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f8c25479000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f8c25176000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f8c24f6e000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8c24d52000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f8c24b4d000)
	libdmhs_pub.so => ./libdmhs_pub.so (0x00007f8c24821000)
	libdmhs_ucvt.so => ./libdmhs_ucvt.so (0x00007f8c242c6000)
	libdmhs_dm_obj.so => ./libdmhs_dm_obj.so (0x00007f8c240b0000)
	libdmhs_cvt.so => ./libdmhs_cvt.so (0x00007f8c23e27000)
	libdodbc.so => /opt/dmdbms/bin/libdodbc.so (0x00007f8c23bfb000)
	/lib64/ld-linux-x86-64.so.2 (0x00005591fe1ef000)
	libdmhs_exp.so => ./libdmhs_exp.so (0x00007f8c23825000)
	libdmhs_xml.so => ./libdmhs_xml.so (0x00007f8c23616000)
	libdmoci.so => ./libdmoci.so (0x00007f8c22ba6000)
	libdmdpi.so => /opt/dmdbms/bin/libdmdpi.so (0x00007f8c21f38000)
	libdmfldr.so => /opt/dmdbms/bin/libdmfldr.so (0x00007f8c21307000)
	libdmelog.so => /opt/dmdbms/bin/libdmelog.so (0x00007f8c21100000)
	libdmutl.so => /opt/dmdbms/bin/libdmutl.so (0x00007f8c20eee000)
	libdmclientlex.so => /opt/dmdbms/bin/libdmclientlex.so (0x00007f8c20cbb000)
	libdmos.so => /opt/dmdbms/bin/libdmos.so (0x00007f8c20a8e000)
	libdmcvt.so => /opt/dmdbms/bin/libdmcvt.so (0x00007f8c203af000)
	libdmstrt.so => /opt/dmdbms/bin/libdmstrt.so (0x00007f8c2019b000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f8c1fe92000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f8c1fc7c000)
	libdmmem.so => /opt/dmdbms/bin/libdmmem.so (0x00007f8c1fa6e000)
	libdmcalc.so => /opt/dmdbms/bin/libdmcalc.so (0x00007f8c1f7e9000)

When it is normal, restart DMHS and try to start exec again

DM Install Error: error while loading shared libraries: libdmnsort.so:

An error is reported when installing DM to initialize the database
error while loading shared libraries: libdmnsort.so: cannot open shared object file: no such file or directory

[root@localhost tmp]/opt/dmdbms/bin/dminit PATH=/opt/dmdbms/data
/opt/dmdbms/bin/dminit: error while loading shared libraries: libdmnsort.so: cannot open shared object file: No such file or directory
##but in /opt/dmdbms/bin there is libdmnsort.so
[dmdba@localhost ~]$ ll /opt/dmdbms/bin/libdmnsort.so
-rwxr-xr-x 1 dmdba dinstall 269865 8月  17 11:07 /opt/dmdbms/bin/libdmnsort.so

I’m impressed that I met you once before. The solution seems to be to go to the/opt/dmdbms/bin directory and find out the reason this time

After installing DM, these two lines will be automatically added to the environment variable of the home directory

[dmdba@localhost ~]$ cat .bash_profile
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/dmdbms/bin"
export DM_HOME="/opt/dmdbms"

I don’t know the reason this time. I didn’t read it after adding it, which led to

[dmdba@localhost ~]$ echo $LD_LIBRARY_PATH

Read. Bash again_Just a profile

[dmdba@localhost ~]$ source ~/.bash_profile 
[dmdba@localhost ~]$ echo $LD_LIBRARY_PATH
:/opt/dmdbms/bin
[dmdba@localhost ~]$ /opt/dmdbms/bin/dminit
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2022-08-04
input system dir: ^C

[Solved] Go use zoom to connect DM database and start reporting error in Linux

Golang, beego framework uses worm to connect DM database, and starts to report invalid memory address or nil point dereference under Linux

GOPATH=/home/wt207/go-space #gosetup
/home/wt207/go/bin/go build -o /tmp/___1go_build_main_go -gcflags all=-N -l /home/wt207/go-space/insight-client/main.go #gosetup
/home/wt207/GoLand-2021.1.3/plugins/go/lib/dlv/linux/dlv --listen=0.0.0.0:40223 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /tmp/___1go_build_main_go --
API server listening at: [::]:40223
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd34e4e]

goroutine 1 [running]:
gitee.com/chunanyong/dm.(*Properties).GetTrimString(0x0, 0x158d9c9, 0xc, 0x0, 0x0, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/zv.go:80 +0x6e
gitee.com/chunanyong/dm.(*DmConnector).mergeConfigs(0xc000034600, 0x15b2b55, 0x28, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/n.go:767 +0x274
gitee.com/chunanyong/dm.(*DmDriver).openConnector(0xc00015ce80, 0x15b2b55, 0x28, 0x0, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/p.go:79 +0x105
gitee.com/chunanyong/dm.(*DmDriver).OpenConnector(0xc00015ce80, 0x15b2b55, 0x28, 0x0, 0x0, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/p.go:63 +0x6d
database/sql.Open(0x157561c, 0x2, 0x15b2b55, 0x28, 0x0, 0x0, 0x0)
        /home/wt207/go/src/database/sql/sql.go:771 +0x1cb
gitee.com/chunanyong/zorm.newDataSource(0xc00007fb00, 0x0, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/dataSource.go:59 +0xdc
gitee.com/chunanyong/zorm.NewDBDao(0xc00007fb00, 0x0, 0x0, 0x0)
        /home/wt207/go-space/pkg/mod/gitee.com/chunanyong/[email protected]/DBDao.go:70 +0x6b
main.main()
        /home/wt207/go-space/insight-client/main.go:54 +0x91

Debugger finished with the exit code 0

The database connection configuration is as follows:

func main() {
	//Custom zorm log output
	//zorm.LogCallDepth = 4 //level of logging calls
	//zorm.FuncLogError = myFuncLogError //function to record exception logs
	//FuncLogPanic = myFuncLogPanic //logging panic log, default use ZormErrorLog implementation
	//FuncPrintSQL = myFuncPrintSQL // function to print sql

	//custom log output format, reassign FuncPrintSQL function
	//SetFlags(log.LstdFlags)
	//zorm.FuncPrintSQL = zorm.

	//dbDaoConfig database configuration. Here is just a simulation, production should be reading configuration configuration file, construct DataSourceConfig
	dbDaoConfig := zorm.DataSourceConfig{
		//DSN database connection string
		DSN: "dm://GO207:[email protected]:5236",
		//DSN: ". /db/test.db",
		//database driver name: mysql,postgres,oci8,sqlserver,sqlite3,dm,kingbase,aci and DBType correspond, handle databases with multiple drivers
		DriverName: "dm",
		// Database type (dialect judgment basis): mysql,postgresql,oracle,mssql,sqlite,dm,kingbase,shentong and DriverName correspond, processing database has more than one driver
		DBType: "dm",
		//MaxOpenConns Maximum number of database connections Default 50
		MaxOpenConns: 50,
		MaxIdleConns: 50, //MaxIdleConns: 50, //MaxIdleConns: 50
		MaxIdleConns: 50,
		//ConnMaxLifetimeSecond connection lifetime seconds. Default is 600 (10 minutes) after the connection is destroyed and rebuilt. MySQL default wait_timeout 28800 seconds (8 hours)
		ConnMaxLifetimeSecond: 600,
		//will use FuncPrintSQL to record SQL.
		PrintSQL: true,
		//DefaultTxOptions default configuration of transaction isolation level, default is nil
		//DefaultTxOptions: nil,
		//TxOptions{Isolation: sql.LevelDefault},
	}

	// Create dbDao according to dbDaoConfig, a database is executed only once, the first database to be executed is defaultDao, the subsequent zorm.xxx method, the default is used is defaultDao
	var err error
	dbDao, err = zorm.NewDBDao(&dbDaoConfig)
	// Mark the test as failed
	if err ! = nil {
		fmt.Println("dm database connection failed:", err)
	} else {
		fmt.Println("dm database connection successful")
	}

	beego.Run()
}

reason

The reason is to get the system default DM_ Svc.conf configuration file failed. According to the error prompt of the console, we can find the following method to get the DM of different systems_ SVC. Conf configuration file.

if filePath == "" {
    switch runtime.GOOS {
        case "windows":
	    filePath = os.Getenv("SystemRoot") + "\\system32\\dm_svc.conf"
        case "linux":
	    filePath = "/etc/dm_svc.conf"
        default:
	    return
    }
}

According to the default file path of windows system, find DM_ Open the SVC. Conf configuration file and find the following

TIME_ZONE=(480)
LANGUAGE=(cn)

Solution

Creating DM in /etc path of Linux virtual machine_ SVC. Conf configuration file, the content of which is similar to the OS. Getenv ("systemroot") + "\ \ system32 \ \ DM of windows_ SVC. Conf " DM under Path_ SVC. Conf configuration file can be consistent