Tomcat instance fails to start: ERROR: transport error 202: bind failed: Address already in use - tomcat6

I have two tomcat instances with shared tomcat installation on a ubuntu box.
Each server has its own shutdown port and own listener port.
When i start the second server (either one) I get the following error:
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197):
No transports initialized [../../../src/share/back/debugInit.c:750]
FATAL ERROR in native method:
JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
I am not trying to run these servers in debug mode. Have no additional startup options supplied.
I have checked other threads here but none of the solutions work for me. I've done netstat on the concerned port and there is nothing.

Related

Protocol error when executing cpp-driver datastax

I am currently workinig on datastax cpp-driver in C and was working around some examples when I came across a very trivial problem. While trying to execute the Basic Authentication Script here, I found this error showing up and the code execution getting stuck.
The Error:
1587040775.210 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.3 because of the following error: Underlying connection error: Connect error 'connection refused'
1587040775.210 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.2 because of the following error: Underlying connection error: Connect error 'connection refused'
1587040775.211 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.1 because of the following error: Underlying connection error: Received error response 'Invalid or unsupported protocol version (66); supported versions are (3/v3, 4/v4, 5/v5-beta)' (0x0200000A)
1587040775.211 [WARN] (cluster_connector.cpp:289:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Host 127.0.0.1 does not support protocol version DSEv2. Trying protocol version DSEv1...
1587040775.212 [ERROR] (cluster_connector.cpp:192:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Unable to establish a control connection to host 127.0.0.1 because of the following error: Underlying connection error: Received error response 'Invalid or unsupported protocol version (65); supported versions are (3/v3, 4/v4, 5/v5-beta)' (0x0200000A)
1587040775.212 [WARN] (cluster_connector.cpp:289:void datastax::internal::core::ClusterConnector::on_connect(datastax::internal::core::ControlConnector*)): Host 127.0.0.1 does not support protocol version DSEv1. Trying protocol version v4...
What could be these protocols that are not supported by my machine? Also, after it comes to the last warning, which is trying protocol v4 it gets stuck.
I'm using Casssandra 3.10+, Cpp-driver 2.13.
Anybody with a workaround or a solution would be of much help. Thanks in advance
I've looked around a bunch to find some documentation to back this up but I can't find any, so this part is conjecture. It appears that server version 3 uses protocol V3. It looks like server version 4 (still in beta) will use protocol V4. I suspect V5 is a future iteration that is being planned and still not written in stone yet (and why it's tagged as beta in the warning).
This part isn't conjecture.
If you add this to your code before you connect to the cluster:
cass_cluster_set_protocol_version(cluster, CASS_PROTOCOL_VERSION_V3);
All the warnings about downgrading to different protocols should go away.

Payara 5 doesn't start in debug mode

I'm new to Payara server and I tried just a simple *.war example to run it on Payara 5.193 Full version. If I start it with asadmin start-domain everything is fine. If I want to start it in debug mode with asadmin start-domain --debug true the windows console shows following:
Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 2.
Before it died, it produced the following output:
ERROR: transport error 202: gethostbyname: unknown host
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
The log file shows the start parameters like it does in "normal" mode and stucks.
The environment I use:
Payara Server 193.1 Full
JDK 1.8.0_131-b11
Windows 10
I've also tried to switch off my Firewall.

Volttron platform not accepting IP address during set up

I'm trying to get the matlab agent in Linux connected to the standalone agent in Windows. I start by setting up a platform (using vcfg) on Volttron. However, I get this error when I try to define an IP address and port on the volttron instance:
What is the vip address? [tcp://127.0.0.1]: tcp://192.168.56.101 What
is the port for the vip address? [22916]:
ERROR: That address has already been bound to. What is the vip
address? [tcp://192.168.56.101]: tcp://192.168.56.155 What is the port
for the vip address? [22916]: ERROR: That address has already been
bound to.
No matter the address I give, it says it has already been bound to. I removed the .volttron directory that contains the known_hosts, etc. but to no avail. The only IP address that seems to work is 127.0.0.2. However with that the standalone agent does not connect to the Volttron platform. I added the authentication credentials of the standalone agent in volttron and made sure the keys were correctly configured. This is all that I get:
2019-08-08 10:24:16,059 volttron.platform.vip.agent.core DEBUG: identity: standalone_matlab
2019-08-08 10:24:16,059 volttron.platform.vip.agent.core DEBUG: agent_uuid: None
2019-08-08 10:24:16,059 volttron.platform.vip.agent.core DEBUG: serverkey: None
2019-08-08 10:24:16,069 volttron.platform.vip.agent.core DEBUG: AGENT RUNNING on ZMQ Core standalone_matlab
2019-08-08 10:24:16,072 volttron.platform.vip.zmq_connection DEBUG: ZMQ connection standalone_matlab
After a while, it times out:
2019-08-08 10:25:14,540 volttron.platform.vip.zmq_connection DEBUG: ********************************************************************
2019-08-08 10:25:14,542 volttron.platform.vip.zmq_connection DEBUG: Closing connection to ZMQ: standalone_matlab
2019-08-08 10:25:14,542 volttron.platform.vip.zmq_connection DEBUG: ********************************************************************
I am missing this line which indicates that a connection has been made.
volttron.platform.vip.agent.core INFO: Connected to platform: router: ebae9efa-5e8f-49e3-95a0-2020ddff9e8a version: 1.0 identity: standalone_matlab
Also, I already set my network adapter to host-only. Can someone please help me know what I'm doing wrong?
I finally figured out what the problem was. It was a ZMQ issue. ZMQ was refusing to bind to the address that I was giving to the wizard. It threw up this error:
Traceback (most recent call last): File "", line 1, in
File "zmq/backend/cython/socket.pyx", line 495, in
zmq.backend.cython.socket.Socket.bind
(zmq/backend/cython/socket.c:5327) File
"zmq/backend/cython/checkrc.pxd", line 25, in
zmq.backend.cython.checkrc._check_rc
(zmq/backend/cython/socket.c:9542) zmq.error.ZMQError: Cannot assign
requested address
The fix was simply to do "ifconfig" and find the IP address that was assigned to my Linux system and provide that to the wizard.

Kinect DK Create Recording

Just received the new Kinect DK and installed the SDK on a W10 machine, then run
C:\temp>k4arecorder.exe -l 5 output.mkv
libusb: error [winusbx_open] could not open device \\.\USB#VID_045E&PID_097C#000041292112#{A5DCBF10-6530-11D2-901F-00C04FB951ED} (interface 0): [5] Access is denied.
[2019-07-03 16:53:10.760] [error] [t=9816] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\usbcommand\usbcommand.c (305): find_libusb_device(). Unable to open LIBUSB at index 0
[2019-07-03 16:53:10.761] [error] [t=9816] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\depth_mcu\depth_mcu.c (68): usb_cmd_create(USB_DEVICE_DEPTH_PROCESSOR, device_index, NULL, &depthmcu->usb_cmd) returned failure in depthmcu_create()
[2019-07-03 16:53:10.762] [error] [t=9816] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\sdk\k4a.c (129): depthmcu_create(index, &device->depthmcu) returned failure in k4a_device_open()
Runtime error: k4a_device_open() failed
Runtime error: k4a_device_get_serialnum(device, serial_number_buffer, &serial_number_buffer_size) returned 1
The cmd window was started in Admin mode, as was the viewer. Seems I cannot record on W10, but it works as described in Ubuntu 18.04. Seems it's an access condition, but not sure where.
the reason you cannot open the device is because you connected it to the wrong port. Check out https://learn.microsoft.com/en-us/azure/Kinect-dk/troubleshooting#usb3-host-controller-compatibility and try to connect the device to a different USB port.
We are working to try to make this error clearer. Access denied from libusb could also be due to the handle already being in use by another instance. On Windows you may also have the camera disabled (either you our a company policy). Check Settings -> Privacy for the global camera state.

Connect to cassandra on Google Cloud Compute

I deployed a Cassandra cluster through their launcher: https://cloud.google.com/launcher/explore?q=cassandra
I can connect to the VM fine, through SSH/PuTTY.
Then when I try to connect with for example DBeaver I get:
com.datastax.driver.core.exceptions.NoHostAvailableExeption: All host(s) tried for query failed(tried: /x.x.x.x:9160)
com.datastax.driver.core.ConnectionExption:[/x.x.x.x:9160] Unexpected error during transport initialization. Connection has been closed
Or with cassandra-driver (nodejs), I get:
All host(s) tried for query failed. First host tried, x.x.x.x:9160: Error: read ECONNRESET. See innerErrors.
InnerErrors: { 'x.x.x.x:9160': { [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' } }
Info: Represents an error when a query cannot be performed because no host is available or could be reached by the driver.
I've forwarded the 9160 port in the google developer console and it seems to work because when I stop the cassandra server on the VM it gives a different error, indicating connection is refused:
All host(s) tried for query failed. First host tried, x.x.x.x:9160: Error: connect ECONNREFUSED. See innerErrors.
InnerErrors: { 'x.x.x.x:9160':
{ [Error: connect ECONNREFUSED]
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect' } }
Info: Represents an error when a query cannot be performed because no host is available or could be reached by the driver.
Now, I've tried editing the cassandra.yaml rcp_adress to the actual external address instead of 0.0.0.0.
I've also tried the internal serverfarm address.
I've not changed the default authentication (but also tried with auth):
authenticator: AllowAllAuthenticator
# authenticator: PasswordAuthenticator
authorizer: AllowAllAuthorizer
# authorizer: CassandraAuthorizer
I'm at a loss, the connection seems to work, but cassandra seems to not allow a login or reset the connection?
You are trying to connect on the thrift port (9160). You should be using the native protocol port (9042).

Resources