Tag Archives: .net

[Solved] kafka Error: java.net.UnknownHostException: ls-bptysztw

kafka connect error:

java.net.UnknownHostException: ls-bptysztw

2022-07-20 15:48:28.701  INFO 15924 --- [ntainer#0-0-C-1] org.apache.kafka.clients.Metadata        : [Consumer clientId=consumer-abc-1, groupId=abc] Cluster ID: LFbHxG8qSSu7PyPKXoDD4g
2022-07-20 15:48:28.703  INFO 15924 --- [ntainer#0-0-C-1] o.a.k.c.c.internals.ConsumerCoordinator  : [Consumer clientId=consumer-abc-1, groupId=abc] Discovered group coordinator ls-bptysztw:9092 (id: 2147483647 rack: null)
2022-07-20 15:48:30.990  WARN 15924 --- [ntainer#0-0-C-1] org.apache.kafka.clients.NetworkClient   : [Consumer clientId=consumer-abc-1, groupId=abc] Error connecting to node ls-bptysztw:9092 (id: 2147483647 rack: null)

java.net.UnknownHostException: ls-bptysztw
	at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_144]
	at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) ~[na:1.8.0_144]
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) ~[na:1.8.0_144]
	at java.net.InetAddress.getAllByName0(InetAddress.java:1276) ~[na:1.8.0_144]
	at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[na:1.8.0_144]
	at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[na:1.8.0_144]
	at org.apache.kafka.clients.DefaultHostResolver.resolve(DefaultHostResolver.java:27) ~[kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.ClientUtils.resolve(ClientUtils.java:110) ~[kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.ClusterConnectionStates$NodeConnectionState.currentAddress(ClusterConnectionStates.java:511) ~[kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.ClusterConnectionStates$NodeConnectionState.access$200(ClusterConnectionStates.java:468) ~[kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.ClusterConnectionStates.currentAddress(ClusterConnectionStates.java:173) ~[kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.NetworkClient.initiateConnect(NetworkClient.java:988) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.NetworkClient.ready(NetworkClient.java:301) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.tryConnect(ConsumerNetworkClient.java:575) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$FindCoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:854) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$FindCoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:830) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.RequestFuture$1.onSuccess(RequestFuture.java:206) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.RequestFuture.fireSuccess(RequestFuture.java:169) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.RequestFuture.complete(RequestFuture.java:129) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient$RequestFutureCompletionHandler.fireCompletion(ConsumerNetworkClient.java:602) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.firePendingCompletedRequests(ConsumerNetworkClient.java:412) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:297) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:236) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:215) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureCoordinatorReady(AbstractCoordinator.java:246) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.coordinatorUnknownAndUnready(ConsumerCoordinator.java:459) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:487) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.KafkaConsumer.updateAssignmentMetadataIfNeeded(KafkaConsumer.java:1262) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1231) [kafka-clients-3.1.1.jar:na]
	at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1211) [kafka-clients-3.1.1.jar:na]
	at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollConsumer(KafkaMessageListenerContainer.java:1522) [spring-kafka-2.8.7.jar:2.8.7]
	at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doPoll(KafkaMessageListenerContainer.java:1512) [spring-kafka-2.8.7.jar:2.8.7]
	at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:1340) [spring-kafka-2.8.7.jar:2.8.7]
	at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:1252) [spring-kafka-2.8.7.jar:2.8.7]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_144]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_144]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]


It can be found from the log that ls-bptysztw:9092 is the address information of the host. Because the host cannot recognize the IP corresponding to ls-bptysztw, which leads to an unknownHost exception. Therefore, as long as the host is configured to point to the correct IP, this error will be solved.


Configure the C:\Windows\System32\drivers\etc\hosts file       ls-bptysztw

[Solved] Tableau Desktop Install Error: 0x80070643 fatal error during installation

Problem description

When installing tableau desktop, the following errors may occur:

0x80070643 fatal error during installation

The error log is as follows:
in addition, the following errors can be found in the log:

Error 0x80070643: unable to execute MSI package


Required installation components failed to start
Please note that error 0x80070643 is an error of Microsoft


1. In windows, navigate to control panel > “Programs and features >”, Locate the visual c + + redistributable package shown in the setup file. For example, tableau desktop 2018.2 3 installation procedure Exe file contains 2013 and 2014 x64 Visual C + + redistributable component packages (as well as. MSI installer and some Database Driver Installer files of tableau desktop)

2. If not, go to the Microsoft official website to download
download link: https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=53587

3. Just download and install
run the installer from tableau desktop Exe file, and then run tableau desktop MSI installer

IIS Web Deploy Website Error: HTTP error 500.19 – Internal Server Error

HTTP error 500.19-Internal Server Error
The requested page cannot be accessed because the relevant configuration data for the page is invalid.

Detailed error information:

Module: IIS Web Core
Notice: BeginRequest
error code: 0x800700b7
Configuration error: When the unique key attribute “name” is set to “ScriptHandlerFactory”, duplicate collection items of type “add” cannot be added
Because the child site inherits the web.config of the parent site

Because the child site inherits the web.config of the parent site

  <location path="." allowOverride="true" inheritInChildApplications="false">
  /* Wrap <system.web> with location in the web.config file
// If it doesn't work, wrap all configurations with the <add> attribute in location

For example: system.web, system.webServer, ApplicationConfiguration and other configuration
locations with add attributes only need to be written once

Make the subsite not inherit the web.config of the parent site

[Solved] net core HTTP Error 500.31 – Failed to load ASP.NET Core runtime HTTP Error 500.30 – ASP.NET Core

Question 1:

HTTP Error 500.31 – Failed to load ASP. NET Core runtime
Common solutions to this issue:
The specified version of Microsoft. NetCore. App or Microsoft. AspNetCore. App was not found.
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process’ stdout messages
Attach a debugger to the application process and inspect


Cause of failure:
when the machine is published NETCORE version and server NETCORE version is inconsistent

modify the published NETCORE version

Or synchronize the server’s environment download NET 5.0 (Linux, macOS, and Windows)

Question 2:

HTTP Error 500.30 – ASP. NET Core app failed to start
Common solutions to this issue:
The app failed to start
The app started but then stopped
The app started but threw an exception during startup
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process’ stdout messages
Attach a debugger to the application process and inspect

So I checked the event viewer & gt; Windows Log & gt; Appliction> The first time I checked the error log, I checked the following logs. I thought it was a CLR problem. After tossing around, I found that the problem was not solved.

Redis did not start and lost…

Then the most important thing is that all browsers are closed. It’s a little pit. It seems to occupy the port

Application specific permission settings do not grant the user NT service\SQLServerAgent in the address localhost (using LRPC) running in the application container unavailable Sid (unavailable) local activation permission for the COM server application with CLSID. This security permission can be modified using the component service management tool- Blue street lamp blog Garden

[Solved] RSA decrypt error: the data to be decrypted exceeds the maximum 128 bytes of this module

RSA decryption error: the data to be decrypted exceeds the maximum 128 bytes of this module

            RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
            byte[] cipherbytes;
            cipherbytes = rsa.Decrypt(Encoding.UTF8.GetBytes(content), false);
            var Text=Encoding.UTF8.GetString(cipherbytes);

cipherbytes = rsa.Decrypt(Encoding.UTF8.GetBytes(content), false);
Modify to:
cipherbytes = rsa.Decrypt(Convert.FromBase64String(content), false);

.net socket programming error [How to Solve]

The development of a C/s project involves the problem of regular reconnection of the client after the server is stopped. During the development process, an error is reported as follows:

After the socket is disconnected, it can only be reconnected asynchronously, and can only be connected to different endpoints.   Beginconnect must be called on the thread that will not exit before the operation is completed.

After searching for relevant information on the Internet, the problem was not solved. A whim occurred and the universal list type was used to solve the problem. The methods are as follows:

Add global variables first

Private _Socket As New List(Of Socket)

Add several more in the process of connection_ Socket.Clear():

Private Sub ConnectServer()
        Dim SockClient As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) 
        Dim Address As IPAddress = IPAddress.Parse(_ServerIPString)
        Dim Endpoint As New IPEndPoint(Address, _ServerPort)
        Try 'Catching exceptions
            _Socket(0).Connect(Endpoint) 'initiate the connection, where the first index in the List is used instead of the local SockClient
        Catch ss As SocketException
            Dim strErrorMsg As String = ss.SocketErrorCode.ToString
            strErrorMsg = strErrorMsg.Replace("TimedOut", "Connection timeout!")
            strErrorMsg = strErrorMsg.Replace("ConnectionRefused", "Connection rejected!")
            If SockClient.Connected Then SockClient.Close()
            MessageBox.Show(strErrorMsg, "Connection exception", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Catch s As Exception
            If SockClient.Connected Then SockClient.Close()
            MessageBox.Show(s.Message, "exception", MessageBoxButtons.OK, MessageBoxIcon.Information)
        End Try

End Sub

be accomplished

Test results:

After repeatedly disconnecting the server, call the connectserver process again to connect again. The connection is successful and no error is reported.

c# Newtonsoft.Json.JsonReaderException: ‘Error reading JArray from JsonReader. Path ‘‘, line 0

When the data queried by c# datatable is converted to JSON object, the following error is reported.

Newtonsoft.Json.JsonReaderException: 'Error reading JArray from JsonReader. Path '', line 0, position 0.

The reason for this problem is that the queried data set directly becomes a string, and then an error is reported when it is empty
solution: add judgment

		if (jsonStr.Length > 0)
                    JArray jArray = JArray.Parse(jsonStr);
                    JProperty Data = new JProperty("Data", jArray);
                    JArray jArray = new JArray();
                    JProperty Data = new JProperty("Data", jArray);

C# Error: Import “google/protobuf/timestamp.proto“ was not found or had errors. [How to Solve]

When using c# as the development language to convert Pb files into CS files, I believe many people will encounter a very difficult problem

The first question: in the protoc3 environment, import timestamp. In the header, import “Google/protobuf/timestamp. Proto”; Exceptions will be thrown when: Google/protobuf/timestamp. Proto “was not found or had errors;

Solution [sharing of original articles by blogger “pamxy”:

(Note: it was found later that it is not necessary to add this directory, because the timestamp.pb.cc file generated by timestamp.proto has been compiled as the source code when compiling libprotobuf.lib file, and libprotobuf.lib is also used in compiling protoc.exe, so it is natural to default that there is already a source code, so there is no need to import it again!)
Just delete the import “Google/protobuf/timestamp. Proto”.

Second question:  ” google.protobuf.Timestamp” is not defined.

Under normal circumstances, there is no need to import google.protobuf.timestamp directly in the protoc3 environment, because in the compilation process, the problem will be read in the Lib file, but if timestamp is called in the file, it is as follows:

It is necessary to call the timestamp file in the header, but bloggers are always prompted during the call  ” google.protobuf.Timestamp” is not defined.

There is really no way, so I have to find the path of this file: timestamp.proto file in protobuf master \ SRC \ Google \ protobuf folder, directly copy the file to the same level directory of the file you want to compile, and then modify the timestamp file in the header. The call path: Import “timestamp. Proto”;

Finally, the file was finally solved…….

The third question: how to call after converting the protocol file into a CS file?

a. Found in referenced project: Tools & gt& gt; Nuget package manager & gt& gt; Nuget package for management solution & gt& gt; Search for “Google. Protocolbuffers” and install

B, directly convert the protoc file into the CS file, and call it in the project.

This small problem is recorded, which is also convenient for you to use as a reference when you encounter this problem.

Sys.webforms.pagerequestmanagerparsererrorexception: unable to parse message received from server



The message received from the server cannot be parsed. The common reason for this error is that response filters, httpmodules, or server tracing will be enabled when the corresponding message is modified by calling response. Write().

Details: error parsing nearby output.

The solution is as follows:

1. If the server control calling the response. Write() method is on the page using the UpdatePanel, you only need to add a node under the UpdatePanel and register the control with postbacktrigger. The code is as follows:

    < asp:ScriptManager ID= “ScriptManager1” runat=“server”>& lt;/ asp:ScriptManager>& lt; asp:UpdatePanel ID= “UpdatePanel1” runat=“server”> & lt; asp:PostBackTrigger ControlID= “Button2” />

    < asp:Button ID= “Button2” runat=“server” OnClick=“Button2_ Click” Text=“Button” />& lt; asp:UpdateProgress ID= “UpdateProgress1” runat=“server”>& lt;/ asp:UpdateProgress> & lt;/ asp:UpdatePanel>

    2. However, if the UpdatePanel is used in the master page, the above methods cannot be used to solve the problem. Otherwise, the following error may appear:

    A control with ID ‘btnExport’ could not be found for the trigger in UpdatePanel ‘UpdatePanel1’.

    This is mainly because updatepanel1 cannot be found & lt; asp:PostBackTrigger ControlID= “btnExport” /> Because we generally do not add this control (btnexport) to the master page( Of course, if a control with ID btnexport is added under the node of the UpdatePanel, there will be no error.)

    If there is such an error, what should I do?My solution is to use the page of the control page where the response. Write() method is needed_ Add the following code to the load event:
    ((ScriptManager) master. Findcontrol (“scriptmanager1”)). Registerpostbackcontrol (btnexport)
    // scriptmanager1 is & lt; asp:ScriptManager ID= “ScriptManager1” runat=“server”> & lt;/ asp:ScriptManager> ID of

    Reprint address: http://www.cnblogs.com/shenyixin/archive/2012/03/08/2385376.html