I'm trying to make several socket connection in an app. deployed on oTomcat OpenShift and I get this exception:
java.net.SocketException: Permission denied
My Account is free it's possible that with a payment Account openshift let me make binding to several port (open several sockect).
For plain WebSockets ws:// you can port 8000 and for secured connections wss:// port 8443. This blog goes into more detail https://www.openshift.com/blogs/paas-websockets and should point you in the right direction.
Related
Launch error: Failed to connect to remote VM. Connection timed out
Project -SDK
Connection type - Standard (Socket Attach)
Host: IP address of the SAP server
Port: 8080
There is nowhere like enough information in your question to identify the actual cause of your problem (or the fix), but problems like this typically occur because:
you are using the wrong hostname or IP address when connecting to the server
the server is off
a firewall is blocking your access to the server
there is something wrong with the network.
Hope this will give you some ideas about what to look for.
Application is accessible over tomcat http port.
Application when accessed from web server(Apache http server) gives bad gateway error.
worker.properties(apache http server) & server.xml(tomcat) are tuned well. Socket/connection timeout is 20 sec on both sides.
Jk.log shows below error.
enter image description here
The error says tomcat is not accepting any connections. But how come at the same time, application is accessible over http.
On tomcat side I dont see any errors in the log.
You use different ports for HTTP connection (default is 8080) and for AJP connection (default is 8009). You can check exact values in conf/server.xml.
Your error indicates that there are some problems between httpd and client (firewall, slow connection etc.). Try to remove timeouts, like worker.ajp13.socket_timeout=3. (https://tomcat.apache.org/connectors-doc/common_howto/timeouts.html)
Make sure that ports are not blocked by possible firewalls. For Ubuntu, UFW (Uncomplicated Firewall) could be used to open AJP connections: ufw enable && ufw allow 8009.
I deploy two web apps in the same jetty in a server, AppA and AppB.
AnyOne in the WWW can access the two apps by the Domain mapped to the IP address of the server www.name.com/appA and www.name.com/appB.
The port of jetty is 8080.
The reason why we can access the app by www.name.com.appA in the port 80 is that I have mapped the outer Internet port 80 to the port 8080 in the inner server.
I need to access the data of the appA in the appB, just in a HTTP request like www.name.com/appA/requestXXX, but it fails with
org.apache.http.conn.HttpHostConnectException: Connect to name.com:80
[name.com/xx.xx.xxx.xxx] failed: Connection refused.
I installed LDAP server on my virtual machine(centOS) running on windows, now I want to access it from windows
So how do I enable remote access to LDAP server.
I tried installing 389 Directory Server (which is actually meant for fedora), on some forum I heard its a easy GUI to do the command line jobs easily, but I did not find the option to enable the remote login or any ip filters.
Note:
I am trying to use Java to login the LDAP server for authentication and authorization, for that I am using unboundid api
You can suggest which api should I use, I am just a beginner.
Update:
my java code
LDAPConnection ldap = new LDAPConnection("http://xxx.xx.xx.xxx", 9830);
error
an error occurred while attempting to connect to server http://xxx.xx.xx.xxx:9830: java.io.IOException: An error occurred while attempting to establish a connection to server http://xxx.xx.xx.xxx:9830: java.net.UnknownHostException: http://xxx.xx.xx.xxx')
I also tried ldap://xxx.xx.xx.xxx instead of http://xxx.xx.xx.xxx
Don't specify the server address as a URL. Just specify the address as either an IP address or resolvable name. So instead of "http://xxx.xx.xx.xxx" just use "xxx.xx.xx.xxx".
Today I encountered the following problem. When connecting to a database, the following error.Appeal to the remote database by connecting through vpn.
Added necessary firewall ports and even tried to disconnect its(did not help)
Added record to $JAVA_HOME/jre/lib/security/java.policy
grant codeBase "file:/-" {
permission java.security.AllPermission;
};(did not help)
If trying to connect with same data through sql management studio, it works and there is access. from the development environment no connection
Example(string connection = jdbc:sqlserver://DEVMSSQL14.test.com:1433;SCHEMA=test;DATABASENAME=test, sql managment studia = DEVMSSQL14.test.com,1433)
on another computer it works without problems, the same version of the project
It remains only to "Permission denied: connect".Maybe somebody faced with similar
Error:
The TCP/IP connection to the host DEVMSSQL14.test.com, port 1433 has failed. Error: "Permission denied: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
In the error message, you have shown like DEVMSSQL14.test.com, 1433 has failed.
I believe, it is correct. I dont think. this host name is correct. which says "TEST" as domain
Open the cmd, try to ping DEVMSSQL14.test.com
Success case :
If you are able to ping, then make sure the services are running for sql in services
Failure case:
Get the right host name to establish the connection
When i tried, i got this message, because i may be out of network.
Pinging DEVMSSQL14.test.com [208.64.121.161] with 32 bytes of data:
Request timed out.
Request timed out.
Try setting a System Property while running the code.
The catch is to introduce this line in code: System.setProperty("java.net.preferIPv4Stack", "true");
Or to pass it in VM option: -Djava.net.preferIPv4Stack=true