Neo4j AWS Browser Connection Working for One instance, not another - amazon-web-services

I have two Neo4j instances at AWS EC2. The second was created from the first and all port permissions were replicated. I can access and log in to the original using my FireFox browser. When I try to connect to the 2nd instance, I get asked to login. I use the instance ID for the second instance but get an error message:
ServiceUnavailable: WebSocket connection failure. Due to security
constraints in your web browser, the reason for the failure is not
available to this Neo4j Driver.
Why does the connection work for one and not the other instance? What is the fix?

Related

AWS Load Balancing all of same websocket route to the same instance

I'm writing an application where multiple users connect to a websocket server with the following url as an example wss://example.com/ws/1234.
Multiple users may connect to the same one and I require them to all connect to the same ec2 instance. All that try to connect to wss://example.com/ws/1234 will go to the same server, and all users that connect to wss://example.com/ws/4325 will also go to the same server. These routes are generated dynamically.
If a client is the first client to connect to an endpoint, it will route them to the server with the least CPU load. If a client is connecting to an endpoint that has already been connected to, they will be sent to the same server.
I've tried going into the listener rules for my ec2 auto-scaling group. But, I couldn't find any settings that seemed like they would do the trick.
My attempt:

Not able to connect to bolt in Neo4j through browser (deployed on AWS EC2)

I am not able to connect to Database through bolt in Neo4j browser when opening my domain on HTTPS. We are using Neo4j Enterprise version 4.4.4 and its deployed on AWS EC2. All the ports are opened in Security Group ( 7474, 7473, 7687, 22).
SSL has been applied through ACM and that is attached with Application Load Balancer.
Below is the error-
ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use.
Use "bolt+s://" or "neo4j+s://" for the connection
The '+s' variants of URI schemes for encrypted sessions with full certificates
Refer to the Neo4j Driver manual for more details on the connection URI.
I had the same issue after deploying to EC2 using an AWS image (not from neo4j) to install neo4j community edition.
In my case, the neo4j browser was initially using this "Connect URL": neo4j://127.0.0.1:7687, which the browser then automatically changed to bolt://127.0.0.1:7687. After that, I saw the same error message that you did.
If you experience that scenario, you need to change the 127.0.0.1 portion of the URL to the appropriate public IP address or public DNS hostname for your EC2 instance.

Connect to RDS eb2 by tableplus?

I have table plus app and I create eb then deploy my project then connect to database and all thing is good and cool!
I need to connect to database(MYSQL) to import some data to the AWS database so I do these steps:
open new workspace in table plus
take endpoint and username of database and the password and the name of database like so:
press Test button and after wait some times I got this error:
I change the port to also 5432 and got same first error
I change the port to 3306 and got this error:
where is the problem ?
Ok the way i did it was by following this video:
https://www.youtube.com/watch?v=saX75fTwh0M&ab_channel=AdobeinaMinute
In short you need to get the details of your instance and set up an ssh connection to it using its hostname (ie that of the instance not the db), your ec2 username (usually ec2-user) and your pem file. Then you get the connection details for the db and enter them. See the screenshot.
I think that your problem is that the configuration you created is set to a Redshift connection. It expects some network communications that are different from a MySQL connection.
Can you try to create a MySQL connection instead?
I had the same issue but my problem was with the security rules in aws. perhaps, this may help.
Navigate to the console
edit inbound rules of your rds instance
add a new security rule
where: type: 'all traffic', source: anywhere
This video gives a google explanation: aws rds setup

Jasperreports server works fine with actual EC2, but not from an instance taken from the same AMI

I have an EC2-1 which has a jasperreports server installed on it, and I could easily access it through http://IP_ADDRESS1:8081/jasperserver.
Now I have taken an image of EC2-1. once AMI is available, I launched a new EC2-2. As usual I logged in to EC2 using SSH , and was able to run the script ./ctrlscript.sh start ,to access the application. but when I tried to login to http://IP_ADDRESS2:8081/jasperserver and run the report, I am getting below error in jasperserver.log and unable to get the report
300 ERROR WebServiceConnector,pool-4-thread-1:139 - Communication error java.net.ConnectException: Connection timed out
320 ERROR AsyncJasperPrintAccessor,pool-4-thread-1:321 - Error during report execution
can any one give me some clarification on my understanding of **EC2 vs AMI**.As per my understanding EC2-1 and EC2-2 has to be same. but in this case why I am not able to run the reports in EC2-2, when I am still able to run the reports in EC2-1.
Also please guide me if I am missing something here. thank you all.
You are correct that a new EC2 instance that was launched from an AMI taken of the original EC2 instance should include any configuration changes you made on your source instance.
From your description, it sounds like everything about the new EC2 instance is good: you can SSH into it, you can start JasperReports Server, and you can log into the web interface. The problems only begin when you try to run a report -- an important detail, because running a report has an external dependency on an external data source.
Test Connection To Data Sources
In JasperReports Server Web UI, find your Data Source and go to its edit page to test the connection. You should be able to find it at the bottom of the edit page for most data sources. For example, in the JDBC UI:
Try to test Jasper's connection to the data source from this page on your new instance.
Verify Networking Rules
This reads to me like a networking error, specifically between the new EC2 JasperReports instance and the report's data source. There is likely a networking rule external to this EC2 instance that existed for your original instance, but wasn't updated for the new instance. For example, if you had a security group that allowed inbound traffic from the original instance's CIDR to the data source, and it wasn't updated for the new instance's CIDR, you would see these sort of timeouts when JasperReports Server attempts to connect to the data source.
If testing the connection to the data source above failed, check external networking rules on resources such as security groups or VPC network ACLs, and verify that all rules for your original EC2 instance have been updated to also be valid for your new EC2 instance.

I don't understand how to get the realm server running on the AWS AMI

I got AWS running an instance of the AMI service using this ami-80347097 from the Realm website. So I have the EC2 instance up now, but I don't know what to do next. Sorry I'm completely new to this sort of thing.
What would be the server URL for the AWS Instance? And would the admin access token for the Object Server still be the same? Or would I have to do something specific in the EC2 Instance?
TT.TT
EDIT:
Ok so I got the Object dashboard to actually work and I am able to log in.
Thank you very much for helping me with that. My last step is actually getting connected to the Object Server. What would the Server URL for the Object Server be?
I tried using the realm://public URL:9080 for the server URL and got this error Realm Sync Error
Server Connection Problem
Assuming that you have successfully initiated the ami-80347097 instance with realm-object-server service running. At this point make sure you have enabled the 9080 port in your inbound rules section. This is necessary because you are going to access the realm object dashboard with the port enabled.
Steps:
Goto EC2 Dashboard
Select "Securit Group" under "Network & Security"
Click on the security group you have been using for the ami-80347097 instance
Once you have clicked the security group a configuration tab "Description", "Inbound", "Outbound", "Tags" will appear at the bottom of the screen
Add the port 9080 in your Inbound section as a Custom TCP Rule
Once you are done doing this,
Open a new browser window and go to http://localhost:9080. The login page for the Realm Dashboard will be displayed. Remember to replace localhost with the IP address of your server.