Accessing javascript resource under a Rails Engine throws net::ERR_CONNECTION_RESET - ruby-on-rails-4

I have a Rails 4.2.1 application with multiple engines under it. The application has been hosted in production with Apache2 and Passenger and was working fine till a few weeks back. I am now facing a strange problem and unable to load assets under one particular engine and get the error "Failed to load resource: net::ERR_CONNECTION_RESET" when trying to load javascript or other asset files under a particular engine.
The application structure is
Root
AssessmentTools (app->assets->javascript->assessment_tools->angular.js)
QuestionBankTools (app->assets->javascript->question_bank_tools->angular.js)
All seems to work fine when loading resources under AssessmentTools (http:///assets/assessment_tools/angular.js), but fails for QuestionBankTools (http:///assets/question_bank_tools/angular.js).
Also, everything seems to work fine on localhost and even in a VM that i hosted on my development machine (with app running behind Apache2 and Passenger), but the problem appears when i host it on server behind a proper a domain.
I have tried cleaning up the server and re-installing the application but without success. I am not able to figure out what could have changed in the past weeks to create this issue.

In my case the problem turned out to be an over eager firewall filter introduced by the data server admin. They had blocked off all url having particular keywords in it.
Fixed the firewall and all is well.

Related

localtunnel not generating url string on Windows 10

I have followed this guide in setting up my localtunnel:
https://www.hongkiat.com/blog/accessible-local-web-server/
however, when I run the following command lt –port 80 nothing is showing. I started looking for this solution since Facebook seems to have stopped localhost access to FB.iu() method for sharing content on their site.
I have tried running as admin while disabling firewall and McAfees Antivirus Scan. I have used ngrok before now too but Facebook rejects it for no clear reason.
Below is an image of the steps taken:
Managed to get my way around this localhost tunneling issue using ngrok.
I noticed I'm expected to add additional domain names under App Domains in Facebook APP settings. So I added ngrok.io as an additional APP Domain and WHALAH! everything started working for the FB.ui() method.

My django application is not working in customdomain

I recently finished my django project and deployed it successfully without any errors in heroku. It works fine with the appname.herokuapp.com domain. But when i tried to add my custom domain, i got a very different problem.
Only my machine can access the page. Weird right! Yes. The page can be accessed only by me in my machine. But i get DNS_PROBE_FINISHED_NXDOMAIN error. Really weird! I guess this is not the problem with the code and i know i'm missing somewhere in the dns configuration. I bought my domain in big rock. So please guide me through this weird problem.
The development site is arr-coaching.herokuapp.com
The deployed site is www.arccphysics.in (Which you cannot access) :(
And any device connected to my WIFI can open the site. Some serious thing! Please help me out !

Error. Recording shinyapps.io apps is not supported

I am testing out the load tester from shiny and I am having trouble recording a session. From this youtube video from Rstudio https://resources.rstudio.com/webinars/load-testing-shiny-alan-dipert , the instructor mentions grabbing the url of the deployed application. I have tried both the url from my server/browser application and the url from my deployed application on shinyapps io. I have also tried running it on Rstudio Cloud and I am redirected to a login which then shoots me to a 404 error. I have tried getting the URL from Mozzila, Microsoft Edge, and Chrome without luck.
library(shinyloadtest)
#server application
record_session("http://127.0.0.1:3793/")
Error in curl::curl_fetch_memory(appUrl, handle = h) :
Failed to connect to 127.0.0.1 port 3793: Connection refused
#deployed shiny app
record_session(" https://finance.shinyapps.io/PrivateApp/")#this is not the real url
Error in .subset2(public_bind_env, "initialize")(...) :
Recording shinyapps.io apps is not supported
I am looking to find the right url to add to record_session so I can begin load testing my application. Thank you.
From the package's vigentte and on the GitHub thread the author was clear that you cannot benchmark against a Shiny app hosted on shinyapps.io:
Under Deployment Limitations it says:
1. WebSockets are required: On RStudio Connect and Shiny Server Pro, SockJS is used instead of plain WebSockets in order to support browsers and load balancers that don’t support WebSockets. Even though Shiny works in the absence of WebSocket support, shinyloadtest does not.
2. shinyapps.io unsupported: Applications deployed on http://www.shinyapps.io/ can’t be recorded or load tested.
Instead, the documentation suggested that you should install the package on your development machine.
Otherwise, shinyloadtest works perfectly fine (tested on multiple versions of R 3.5 and above). The function record_session() takes the URL of the deployed application as an argument:
shinyloadtest::record_session('https://your-deployed-shinyapp.com/')
Taken from the documentation:
Running the function will open a browser displaying the app. Once open, interact with the application as a normal user would and then close the browser. After closing the browser window or tab, a file will be created that contains a recording of the session. This recording, written to recording.log by default, will serve as the basis for the load test.

Chrome not connecting to network

I was wondering how I could let Chrome connect to my network. I am using a website called Codeanywhere.com and I was using a Django container. I used the built-in terminal and installed Python 3.4 and Django 10. I created a project and ran the server, and it said it had created one at this ip: http://127.0.0.1:8000/. However, whenever I try to access it, it the site can't be reached. If it helps, I am using a Chromebook Thinkpad, and it is a school computer. They do block things with Lightspeed Systems and they have a lot of blacklisting things going on. I am trying to learn Django for a project. Below is a screenshot of the screen when I try to access the server.
My screenshot of the error screen.
I can't embed my image yet, I don't have 10 reputation points :/ It's a link instead.
Mistake #1
The server isn't located on your local host, so you need to go to the provided server. for example, when I opened a project I got this instruction:
To access your application over HTTPS, make sure your application is running on port 3000 and use the following link:
https://mysite-{username}551936.codeanyapp.com
Mistake #2
you should run the server with a specified ip commend - and use 0.0.0.0:3000 instead of the usual localhost, like so:
python manage.py runserver 0.0.0.0:3000
In addition, I would reccomend you to read the "mysite Container" file which explains everything about the setup in detail.

Amazon AWS Service Error

I am currently trying to set up a Virtual Machine and a Database Server for my website to launch off of. I decided to go with Amazon's AWS.
I have beeing working through This Tutorial and am at Part 3 now.
I got to the point where I started the Apache Web Server and went to my local DNS name in my browser, and successfully saw the Test Page.
I proceeded forward with Downloading "Drupal" and got to the section where it says "Configure Drupal". I am now trying to load my local DNS name in my browser again, only to get a 500 Server Error.
I'm not sure what could've went wrong, I only entered the commands in the tutorial for the whole section on "Install Drupal".
Thank you
EDIT: Also, what exactly does Drupal do? And do I need to use it?
Drupal is a CMS system, and you don't have to use it. It is only being used to provide an example for a website. Instead of installing Drupal, you can install your own site on the server if you prefer or even something like Wordpress if you're more familiar with that.
However, if you do want to follow the example your best bet for discovering the problem is to look into what the exact error is. You should be able to find more information about that in the log files located in /var/log/httpd. The error log in there should show you more details about what failed.