Category Archives: How to Fix

Was import certificate — error prompt: java.security.cert .CertPathValidatorException: Certificate chaining error

When sending MQ using an application of WAS, you encounter the following error:
The certificate issued by CN=DigiCert High Assurance EV Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US is not trusted; internal cause is:
Java. Security. Cert. CertPathValidatorException: Certificate chaining the error
This means that a pilot entry certificate is required to WAS:
Import steps:
1: Click the WAS menu security-& GT; SSL Certificate and Key Management see the following page:

Click Key Stores and Certificates on the page and click after entering the page

3 click NodeDefaultTrustStore

Click Signer Certificates from the appear page

5. Click the Add button in the display page:

6. First upload the file to /opt/root.cert, then enter a certificate name: MyRootCert. Click the Aplly button, and then click the Ok button.
Certificate import is complete.

After trying to send MQ, success.

SH script reports error “Eval: Line 1: syntax error: terminated quoted string”

There was a script that had been working properly, and suddenly it reported an error

eval: line 1: syntax error: unterminated quoted string

Eval is a simple eval. After filtering the contents of the script, I found a suspected code.

eval $(echo $line 2>/dev/null |awk '{print "iosOs="$13";iosDev="$14}')

Looked at the

l

i

n

e

this

a

change

The amount

.

in

one

some

love

Besides,

Under the

and

no

There are

the

?

more

word

Period of

.

on

surface

life

make

to

o

single

a

The variable line, in some cases, does not have as many fields as the above command requires

Line is a variable that, in some cases, does not have as many fields. The above command requires a single line to have at least 14 fields. If not, an error will be reported.
after the code or to do enough fault tolerance, when the external input will change, cut.

Solution for AutoCAD 2020 installation failure (error code: 1603) / valid for Autodesk family products

AutoCAD 2020 installation failed (error code: 1603) This solution works for all Autodesk products

Solutions found on the official website:

To handle this error message, perform the following steps :
. Find this folder C\Program Files (x86)\Common Files\Autodesk Shared\ adsklicense
2. Run uninstall.exe as an administrator (right-click > Run as administrator) delete software.
3. Then restart the installation.
if the problem persists, try the following method :
1. Open the command prompt as an administrator (i.e., cmd-right-click the first result and click run as an administrator)
2. Enter and run the following command, then press enter. A message is displayed declaring that the service is started.
“C:\Program Files (x86)\Common Files\Autodesk Shared\AdskLicensing\Current\AdskLicensingService\AdskLicensingService. Exe “
(find AdskLicensingService. Exe right click on AdskLicensingService as administrator, do not close the window, reinstall the CAD)
3. Try the installation again and the installation is successful.

brew install tmux: Error: parent directory is world writable but not sticky


 

 
 

 
It is then re-executed: Brew Install Tmux is installed successfully.
If the download fails sometimes because of the network, you can install it locally.
You can download the download tool and place it in the BREW cache directory (run BREW –cache, usually under /Library/Caches/Homebrew)
It is important to note that the file name is changed to the desired brew name (the file name is all lowercase and the underscore is’ – ‘)
Place the downloaded installation package in the cache directory and reinstall it.
 

Visual Studio Tips: error LNK2005: … already defined in LIBCMTD.lib(new.obj)

Problems encountered

A very old C++ project, before the compilation was all right, just after I introduced a few new.h and.cpp files, the compilation failed to pass, reported the following error:
(On the premise, of course, that there is no problem with the new files I introduced being double-checked, otherwise I would have started with those files and there would have been no article.)

Error	2	error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)	
C:\Work\Demo\DemoApplication\nafxcwd.lib(afxmem.obj)	Sentinel-XP



1>------ Build started: Project: DemoApplication, Configuration: Debug Win32 ------
1>  text.cpp
1>gbk.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification
1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)
1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)
1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBCMTD.lib(delete2.obj)
1>Debug\DemoApplication.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Problem analysis

There is no such thing as a gratuitous compilation error. After an extensive search, there is an explanation on MSDN that I think is very good. Here is an excerpt:

The CRT libraries use weak external linkage for the new, delete, and DllMain functions. The MFC libraries also contain new, delete, and DllMain functions. These functions require the MFC libraries to be linked before the CRT library is linked. 

I will not translate it into Chinese, I am lazy, and I believe everyone can understand this sentence.

This way, we give the MSDN link: https://support.microsoft.com/en-us/kb/148652

To solve the problem
In this article on the MSDN: https://msdn.microsoft.com/en-us/library/72zdcz6f.aspx
The following sentence was given:

To fix, add /FORCE:MULTIPLE to the linker command line options, and make sure that ... is the first library referenced.

is just like this:

Then it was compiled. Although there were some warnings, the compilation passed:

1>------ Build started: Project: DemoApplication, Configuration: Debug Win32 ------
1>  ...
1>  ...
1>  Compiling...
1>  ...
1>  Generating Code...
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
1>gbk.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
1>nafxcwd.lib(afxmem.obj) : warning LNK4006: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj); second definition ignored
1>nafxcwd.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj); second definition ignored
1>nafxcwd.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBCMTD.lib(delete2.obj); second definition ignored
1>Debug\DemoApplication.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
1>  DemoApplication.vcxproj -> C:\Work\Demo\DemoApplication\Debug\DemoApplication.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

works fine.

Of course, this is not the root of the problem, but given the old project document, I can’t easily change it too much, so let’s leave it as an imperfect solution.

reference

A LNK2005 error occurs when the CRT library and the MFC libraries are linked in the wrong order in Visual c + + https://support.microsoft.com/en-us/kb/148652
would Tools error LNK2005 https://msdn.microsoft.com/en-us/library/72zdcz6f.aspx
selectany https://msdn.microsoft.com/en-us/library/5tkz6s71 (v = versus 80). Aspx
LNK2005, “Already defined error” would error in MSVC2010 http://stackoverflow.com/questions/8343303/lnk2005-already-defined-error-linker-error-in-msvc2010

In depth analysis of mysq exceeding the number of connections error 1040 (HY000): too many connections

ERROR 1040 (HY000): Too many connections indicates that mysql has more than one connection
The first solution (not recommended) :
Need to wait for a period of time (quite long), let the existing connection timeout automatically released; Or restart mysql (CentOS7: SystemCTL Restart Mysqld.Service)
The second option (use with caution) :
Login to mysql: mysql-uroot-p your root password
Look at the maximum number of connections mysql is currently setting. In general, the default number of connections to mysql is over 100, and the maximum number can be set to 16384 (2 ^ 14)
show variables like ‘%max_connections%’;
Set the maximum number of connections as needed, so I’m going to set 1000 here
set GLOBAL max_connections = 1000;

Note: This is used with caution because once the server or mysql service is restarted, the Settings will not take effect and the default Settings will be restored
 
The third option (the conditions allow the recommended use) :
Add or modify the max_connections parameter in the mysql configuration file
Linux (centos7) environment:
Windows environment:
Find my.ini in the installation directory. If you don’t have it, find My-default.ini, make a copy and rename it my.ini. Add or modify the max_connections parameter
After setting parameters, restart mysql service.
 
Resources:
FAQ for Installing Mysql5.7 and mysql under Linux(Centos7)

Internal error 2203 C:\windows\Installer

Reference articles; http://blog.csdn.net/carolbaby/article/details/1440733
———————————————————————————————————————————-
The following error message appeared today when installing the software:
Internal error 2203 C:\windows\installer\1bbe2ab.ipi
// Screenshot below

 
I found the reason, it turned out that there was a problem with the environment variable of the user I logged in to the system. Strangely enough, the environment variable was the same when I installed it before
In this case, TEMP=I:\ TMP=I:\ // I is the disk character name
Change them back to:
TEMP=%USERPROFILE%/Local Settings/Temp
TMP=%USERPROFILE%/Local Settings/Temp
// Screenshot below

 
It is not clear why this problem did not occur when the TEMP and TMP paths were changed.
 

 
 
 
 
 
 
 

Two kinds of errors caused by root / lack of execution permission x

The Linux root directory lacks X permissions, resulting in two errors:
Execute the SystemCTL command as root to report permission related issues
[root@hps2 ~]# systemctl stop hps-manager
* (pkttyagent:10364): WARNING *: Unable to register authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files
Error registering authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files (g-dbus-error-quark, 2)
Switch from root to normal user and report an error:
[root@hps2 ~]# useradd aihps
[root@hps2 ~]# su – aihps
su: warning: cannot change directory to /home/aihps: Permission denied
su: failed to execute /bin/bash: Permission denied
The solution
Directory
Device: fd01h/64769d Inode: 2 Links: 23
Access: (0600/ DRW –) Uid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root) Gid: (0/root)
Access: 2016-05-30 09:54:45.692000000 +0800
Modify: 204000000 +0800
Change: 2016-05-25 15:41:46.204000000 +0800
Birth: –
problem, the permissions here are wrong, the loss of X permissions caused.
[root@localhost ~]#chmod 755/
modified, the problem goes away.
The operation that causes the above problem:
the first type, chmod 666 /, can cause.
or
the second, chmod 700 /lib/ ld-xxx. so, can also cause su to fail.
if you’re interested, try it out for yourself.
/the loss of permissions has the same effect on all daemons running on their own user identities.
Refer to the article: http://blog.itpub.net/9606200/viewspace-745674/

Invalid Drive:H:\ (subst X: %TEMP%)

Refer to the article: http://wenwen.soso.com/z/q186821336.htm
——————————————————————————————————————
Sometimes you install software that displays an error message that says “Invalid Drive:H:\”, or it could be
Invalid Drive:D:\ Invalid Drive:F:\ etc
The screenshot is as follows:

—————————————————————————————————————————————
To solve the above problem, in CMD, type a command: subst H: %TEMP%
The screenshot is as follows:

———————————————————————————————————————————————–
The above command is to take the temporary path %TEMP% of the system as a partition H. After we install the software, we want to delete the newly created partition H.
How do you do that?Also execute the following command in CMD; Subst: H/D

—————————————————————————————————————————————————————-
Brief introduction to SUBST:
Using the Built-in Windows Subst.exe tool, you can simulate a path on any partition as a separate partition,
Using this tool, you can trick the installer into successfully installing the software.
———————————————————————————————————————————-


Your satisfaction is my aim.
Your suggestion is the motivation for my follow-up.

Python error unhandled exception in thread started by error in sys.excepthook

import time
import thread
def timer(no, interval):
 cnt = 0
 while cnt<10:
 print 'Thread:(%d) Time:%s/n'%(no, time.ctime())
 time.sleep(interval)
 cnt+=1
 thread.exit_thread()
 
def test(): #Use thread.start_new_thread() to create 2 new threads
 thread.start_new_thread(timer, (1,1))
 thread.start_new_thread(timer, (2,2))
 
if __name__=='__main__':
 test()

There is an error
Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:
Solution: Change the main function to

<pre>if __name__=='__main__':
 test()
time.sleep(3)

As for why sleep for a few seconds, not clear

The message on the Web is that threading is not recommended, use the threading.thread class instead