Tag Archives: error

IIS “Bad Request – Request Too Long. HTTP Error 400. The size of the request headers is too long.”

The size of The Request Headers is Too Long. If The length of The Request headers received in IIS7/7.5 exceeds 16K (The default value), an Error is raised.
I wrote a blog post about this problem (Bad Request-Request Too Long caused by statistics code of CNZZ). The reason for the problem is that the statistics code of third-party statistics service CNZZ writes a large number of cookies, which are carried when requested, resulting in the Request header length exceeding the limit.
I thought this was a problem only for Chrome, but then I got feedback from friends that it was also a problem for Firefox. So, to solve this problem, you have to start at the server end, and this article shares how to start at the server end.
where
According to The IIS forum post (HTTP 400. The size of The Request Headers is Too long), The 16K request header/request length limit is determined by two Parameters in the registry (HKEY_LOCAL_MACHINE\System\ Services\HTTP\Parameters) MaxFieldLength (request header) and MaxRequestBytes (request header and request body). So, you start with these two parameters.
Know your target
Through the Microsoft official documentation (http://support.microsoft.com/kb/820129) to learn more about MaxRequestBytes and MaxFieldLength:
MaxFieldLength – Sets an upper limit for each header.
Used to set the maximum number of bytes per request header (default 16K).
MaxRequestBytes – Determines the upper limit for the total size of the Request line and the headers.
Used to set the maximum total number of bytes between the request line (the body of the request) and the request header (16K by default).
How to start
Start by adjusting the values of MaxFieldLength and MaxRequestBytes (assuming 32K) to take effect.
Run regedit, go to HKEY_LOCAL_MACHINE\System\ Services\HTTP\Parameters,
1. Add an item of type DWORD(32-bit) with the name MaxFieldLength and the value decimal 32768;
2. Add items of type DWORD(32-bit), named MaxRequestBytes, value decimal 32768.

Ok, so how do we get them to work?The easiest thing to do is reboot, but the last thing you want to do with a server is reboot.
Fortunately, the solution to this problem is mentioned in the Official Microsoft documentation. You need to run four commands:

Net stop HTTP
net start HTTP
net stop iisadmin /y
net start servicename

But the third command, NET Stop iISadmin, will disable all services related to IIS, and the fourth command will start all services related to IIS one by one.
Although there is no need to restart the server, I don’t like the solution of these four commands… I couldn’t find a better solution on the Internet…
Then, by trial and error, I found an even simpler method that required only three commands:

net stop http
net start http
iisreset

This method has been validated in practice on the server.

Microsoft.CppCommon.targets (132,5): how to solve error msb3073?

Originally, I wanted to generate DLL file and copy it to the specified path automatically, but the result of compilation was error:

1> syAve.vcxproj -> D:\My Resources\Hello World\ test \Smer 2019.4.28\Debug\ syave. DLL
1> The system could not find the specified file.
1> The system could not find the specified file.
1> C: \ Program Files \ MSBuild \ Microsoft (x86) Cpp \ v4.0 \ V120 \ Microsoft CppCommon. The targets (132, 5) : error MSB3073: command “copy D: \ My Resources \ Hello World \ test \ Smer 2019.4.28 \ Debug \ syAve lib).
\Smer\Lib\Debug
1> C: \ Program Files \ MSBuild \ Microsoft (x86) Cpp \ v4.0 \ V120 \ Microsoft CppCommon. The targets (132, 5) : error MSB3073: copy D: \ My Resources \ Hello World \ test \ Smer 2019.4.28 \ Debug \ syAve DLL.. \Smer
\Lib\Debug
1> C: \ Program Files \ MSBuild \ Microsoft (x86) Cpp \ v4.0 \ V120 \ Microsoft CppCommon. The targets (132, 5) : error MSB3073:
1 & gt; C: \ Program Files \ MSBuild \ Microsoft (x86) Cpp \ v4.0 \ V120 \ Microsoft CppCommon. The targets (132, 5) : error MSB3073: : VCEnd “have withdrawn, the code is 1.

The reason: the copy command does not support paths with Spaces. (Note: Chinese is supported.)
The solution: Paths in quotes!

 

【error】postgresql relation does not exist

There have been a lot of problems with PostgresQL lately.
postgresql relation does not exist
When querling AAA tables using PostgresQL, postgresQL relation does not exist, but

SELECT   tablename   FROM   pg_tables;

AAA tables exist. It’s weird.
The search turned out to be a problem with quotes. PostgreSQL itself is not case sensitive, so if you want to create a new table with uppercase letters, you must use quotation marks, and if you want to query it, you must use quotation marks.

select * from "AAA";

The following from: http://blog.csdn.net/dream20nn/article/details/51790106
A recently developed ETL tool for the WEB requires different data sources. The first time POSTGRESQL has found a problem with double quotes:
standard SQL is case-insensitive. But PostgreSQL allows case-sensitive definition and reference methods for the names of objects in the database. This is done by enclosing the name of the object you want to support size in double quotes in the DDL. For example, you want to create a table called AAA. If you use CREATE TABLE AAA (…) ; So the table that you create is actually aaa.
CREATE TABLE “AAA” (…) if you want to CREATE an upper case AAA TABLE. ; This is the double quote way of defining the object name. The disadvantage of writing
is that the query must also refer to the object name in double quotes. SELECT * FROM “AAA”; PostgreSQL doesn’t need to go to the AAA object and return an error that aaa doesn’t exist. It is important to note that not only tables can be defined and referenced in this way, but any object (column name, index name, etc.) in PostgreSQL is valid.
In fact, traditional SQL is case-insensitive, so there is no problem as long as DDL and DLLS manipulate database objects in the traditional (without double quotes) way. The problem is that if tables are created through PostgreSQL’s pgAdmin III tool, objects are created with double quotes by default, so the DLL must also be used with double quotes. However, this is not standard and is not supported if the database is accessed through some common library function.
Recommendation:
1. The tool pgAdmin III is not recommended for creating database objects. You should still write DDL statements by hand. 2. Double quotation marks in DDL are not recommended for creating case-sensitive objects. PostgreSQL recommends using uppercase for SQL key word and lowercase for all other names.

error: expected declaration or statement at end of input

This error is sometimes reported in Linux programming, and it hurts a lot because the compiler doesn’t tell you exactly what went wrong…
There are several possible reasons for this error:
1) Where the program is missing a parenthesis.
The detection method is as follows. If you are programming with VIM, you can use % to match the parentheses one by one. Here is how I did it
2) the variable does not declare

An error occurred while processing your request

One error occurred while processing your request. One more error occurred while processing your request.

Recently, when I visited the Apple developer’s website, I was frequently prompted to change my password. As one netizen put it, I ran out of passwords… What’s more annoying is that when I log into the Apple developer website with MBP, I will report the following error:
An error occurred while processing your request.
the Reference # 97. A40a4cdb. 1377947415.57 b2224a

opens at certificate findings suggest “a248.e.akamai.net this certificate is invalid (does not match the host name)”

use winxp desktop can normal login.

— — — — — — — — — — — — — — — — — — — — — — —
is the problem for several days, the website can change the host files, but still I tried after an error. I couldn’t log in to Windows all the time, so I continued to look for problems. I spent a lot of time with the key chain and installed Firefox, but I couldn’t solve them. Finally, search to the https://discussions.apple.com/thread/1893170?start=0& Tstart =0
basically means you can add two DNS: 208.67.222.222, 208.67.220.220.

After modification, the login was successful. At least you can log in now. Please pray that there will be no error in the future.

[MySQL] the solution of MySQL workbench “error code: 1175”

When performing a batch database update using MySQL Workbench, executing a statement will encounter the following error:
Error Code: 1175 You are using safe… without a WHERE that uses a KEY column
Because MySQL Workbench’s default security Settings do not allow batch table updates. This error is prompted when the SQL statement to be executed is batch update or delete.
The solution is as follows:
Open the Workbench menu [Edit]-> [Preferences…] -> Switch to the [SQL Queries] page -> Remove the [Safe Updates] check -> Click the [OK] button
Finally, just restart the SQL Editor and make a new connection.

Or before I make a query,
Execute the following statement:

SET SQL_SAFE_UPDATES = 0;

Using xrdp to realize windows remote desktop Ubuntu Linux


In general, we use SSH client to remotely log in Linux system. As for Linux remote login tools under the graphical interface, we usually think of VNC, but its security is not enough.
Here, I introduce the XRDP installation configuration method. We can easily use Windows remote desktop Linux.
XRDP installation configuration method
Open terminal: Install in turn
sudo apt-get install xrdp
sudo apt-get install vnc4server tightvncserver

Set the XRDP
echo “gnome-session –session=gnome-classic” > ~/.xsession
Ubuntu12.04 has unity and gnome multiple desktop managers. You need to specify one when you start up, otherwise
Even if the remote login is successful, it is only background.
XRDP’s configuration documents are in the /etc/xrdp directory of xrdp.ini and Sesman.in, generally selected by default.

Restart XRDP
sudo /etc/init.d/xrdp restart

Run MSTSC for Windows

Windows remote desktop, open the input remote Ip, connection, enter the user password can be remote Linux.

Error encountered
1, XRDP access to Ubuntu only see the background, not the menu bar solution
Gnome-panel
sudo apt-get install gnome-panel

2, Failed to load session “gnome”
Try
on the desktop with ubuntu-2d
Type the command: echo “gnome-session — session= Ubuntu-2D “> ~/.xsession, and then restart XRDP.

3. Error:
Possiblitie to sesman IP 127.0.0.1 port 3350
sesman connect ok
sending login info to sesman
login successful for display 14

connecting to 127.0.0.1 5914
error – problem connecting
XRDP – Sesman. log, error:

[INFO ] starting Xvnc session…
[ERROR] X server for display 10 startup timeout[INFO ] starting xrdp-sessvc – xpid=2924 – wmpid=2923
[ERROR] X server for display 10 startup timeout
[ERROR] another Xserver is already active on display 10
[DEBUG] aborting connection…
if your log also has things like Xserver for display 10 startup timeout and another Xserver is already active on display 10
The root cause of the problem is TightvNC. The version in question conflicts with the X font, causing an error in connection to the Xserver.
Solutions:
apt-get purge tightvnc xrdp
apt-get install tightvncserver xrdp
Finally:
Start the XRDP service, sudo /etc/init.d/ XRDP restart, at which point the port is enabled and the aspect is configured by default.
By command: netstat -tnl
Check 3350 3389 5910 these three ports in LISTEN, generally no problem.
The name of the DPkg-L + package that tells you what files the package contains.
4, ubuntu 13.10 and later without background:
Thanks for the Suggestions in the comments:
XRDP does not support 13.10 GNOME. The solution is to install an XFCE interface.

sudo apt-get install xubuntu-desktop

And then:
echo xfce4-session > ~/.xsession

Set up the configuration file again
sudo gedit /etc/xrdp/startwm.sh
Insert
xfce4-session on the front line of./etc/x11/xsession
Restart XRDP
sudo service XRDP

error C2137: empty character constant

Number: C2137
Null character definition.
Error analysis:
The reason is that two single quotes are used together without any characters in between. In general, single quotes represent character constants. Single quotes must have, and can only have, one character (when an escape character is used, the character represented by the escape character is treated as a character). Nothing between two single quotes is not allowed.
Case study:

#include<stdio.h>
int main()
{
    const char a='';
	printf("%c",a);
	return 0;
}

Solve MySQL error 1698 (28000): access denied for user ‘root’ @’localhost ‘

I believe that many users who just installed MySQL on Linux will encounter this problem, how to solve it?I found the answer on StackOverflow (I used method 1 and it worked), carried it over and translated it into Chinese.
The original address: https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost

Problem description: When I log in to the MySQL database via root, I get an ERROR “ERROR 1698 (28000): Access deniedfor user ‘root’ @’ localhost ‘”.

Answer:
This is because MySQL USES the UNIX Auth_Socket Plugin by default in recent Ubuntu installations (and possibly others).
In simple terms, this means that when DB_users use the database, they will be authenticated through the system user authentication table. You can see if your root user is set to this by using the following command:

$ sudo mysql -u root # I had to use "sudo" since is new installation

mysql> USE mysql;
mysql> SELECT User, Host, plugin FROM mysql.user;

+------------------+-----------------------+
| User             | plugin                |
+------------------+-----------------------+
| root             | auth_socket           |
| mysql.sys        | mysql_native_password |
| debian-sys-maint | mysql_native_password |
+------------------+-----------------------+

As you can see from the query, root is using the AUTH_socket plug-in. There are two ways to solve this problem:
1. You can set your root user to use mysql_native_password plug-in 2. You can create a new database user that is consistent with your system user (recommended)
(Note: Method 2 meets the requirements of auth_Socket plug-in)
Option 1:

$ sudo mysql -u root # I had to use "sudo" since is new installation

mysql> USE mysql;
mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit;

$ service mysql restart

Option 2 (substitute your operating system username for YOUR_SYSTEM_USER) :

$ sudo mysql -u root # I had to use "sudo" since is new installation

mysql> USE mysql;
mysql> CREATE USER 'YOUR_SYSTEM_USER'@'localhost' IDENTIFIED BY '';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'YOUR_SYSTEM_USER'@'localhost';
mysql> UPDATE user SET plugin='auth_socket' WHERE User='YOUR_SYSTEM_USER';
mysql> FLUSH PRIVILEGES;
mysql> exit;

$ service mysql restart

Remember that if you choose to use Method 2, you should connect to MySQL by using your operating system user name (mysql-u YOUR_SYSTEM_USER).
Note: In some operating systems (such as Debian), the ‘auth_Socket’ plugin is called ‘unix_socket’, so the corresponding SQL command statement should be UPDATE User SET plugin= ‘unix_socket’ WHERE user = ‘YOUR_SYSTEM_USER’.

R language error in match.names (clabs, names(xi)) :

Today, when I used the rbind function in R language, this error occurred, and I couldn’t find the error after searching for a long time.
The reason for this mistake:
1. The data type used is data.frame
2. The header files for the rows to be merged are different

Solution: change the data to matrix, and you can do it. In addition, when you read the data, add the data header=FALSE, which is also ok. I tried it, but it is hard to use, so I changed it to matrix.

Error name: Error in match. Names (CLABS, names(XI)) : Names do not match previous names