Heroku run console get "Timeout awaiting process" - console

No way to have console wired with Heroku lately:
lsoave#ubuntu:~/rails/github/gitwatcher$ heroku run console
Running console attached to terminal...
Timeout awaiting process
lsoave#ubuntu:~/rails/github/gitwatcher$
Does it happen to anyone else ?

I had the same problem on the ISP FastWeb, which is an ISP here in Italy. Based on my Googling, it appears that they block port 5000.
To get around it for now, I am running the following:
heroku run:detached rake db:migrate
That tells it to run without waiting to connect to my machine on port 5000.
Then, you can examine the logs for your process you just kicked off. (The heroku command will tell you this after you run it):
heroku logs -p run.1
That tells it to output the logs for the running process.
But I found that the logs command was exiting even though my process was still running.
To get around that, you can add "-t" if you want to "tail" the logs:
heroku logs -p run.1 -t
You'll know your process is done when you see something like this in the logs:
2012-10-14T15:36:41+00:00 heroku[run.1]: Process exited with status 0
2012-10-14T15:36:41+00:00 heroku[run.1]: State changed from up to complete
I'm sure someone could whip up a script that would
Run the given heroku command with run:detached
Examine the output to determine what its process name was (run.1, run.2, etc)
run heroku logs -p run.1 -t and show me the output
exit the logs process when it sees something like State changed from up to complete

From: http://devcenter.heroku.com/articles/oneoff-admin-ps
The heroku run process opens a connection to Heroku on port 5000. If
your local network or ISP is blocking port 5000, or you are
experiencing a connectivity issue, you will see an error similar to:
$ heroku run rails console
Running rails console attached to terminal...
Timeout awaiting process
You can test your connection to Heroku by trying to connect directly
to port 5000 by using telnet to rendezvous.heroku.com. A successful
session will look like this:
$ telnet rendezvous.heroku.com 5000
Trying 50.19.103.36...
Connected to ec2-50-19-103-36.compute-1.amazonaws.com.
Escape character is '^]'.
If you do not get this output, your computer is being blocked from
accessing our services. We recommend contacting your IT department,
ISP, or firewall manufacturer to move forward with this issue.

There's a way to bypass this restriction by executing commands you were going to execute with 'heroku run ...' directly as system calls.
For this heroku command:
heroku run rake db:migrate
One could make a call in Ruby
system("rake db:migrate")
This call could be done as a result on some HTTP GET request - you better protect by some means, so that it wouldn't be accessible for strangers.
It's not a nice way - but when you don't have a choice - it works.

I had the same problem on the ISP FastWeb, which is an ISP here in Italy.
The most simple way to overcome the problem is set a VPN when you are using heroku run (something)
Personally I use Tunnel Bear that offer you 0.5GB of internet traffic for free

I've just connected successfully to a console on Heroku
Is it all apps or just a single one? I'd suggest checking your heroku gem is up to date, that you can run other commands like heroku ps, restart your application via heroku restart - if you've tried these then get in touch with Heroku support as something is wrong with your application.

Related

Apache2 server getting too many connection requests

I am trying to deploy a Nodejs & WordPress website together on an ubuntu server and I am using apache2 for my server config. Everything works fine initially. But after some time my website start showing connection timeout in the browser and when I checked the Ubuntu machine then I found the following:
I checked the error log and increased the worker limit but then got this error again.
I also checked the tasks using htop command then I found this and as I am increasing the worker request number in the apache2 config file the tasks increase automatically.
I also checked which IP calling so many requests and then I found this:
Access logs file :
I have no idea what is going on here and don't know how to fix it. If anyonw know the solution to this problem then please reply.
Thanks

Alfresco unable to connect to server http://mydomain:8080/alfresco

i am running alfresco on linux server i am able to access the files from back end but when running http://mydomain:8080/ it gives the following error
Unable to connect
Firefox can’t establish a connection to the server at mydomain:8080.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
tomcat is running but i still cant figure out what could be the cause of the error.
Could you take a look to a tomcat logs?. Maybe you can find more information about the issue.
Could you check compatibility of your amps files with Alfresco version?
Regards,
clv
First, try to hit the Alfresco webapp from the local server itself using curl, like:
curl -v -uadmin http://localhost:8080/alfresco
And see what comes back. If you get a 200 or a redirect, try Share next, like:
curl -v http://localhost:8080/share
If you get a 200 or a redirect then both web applications are working fine and this is due to a network connectivity problem between your client machine and the server or a firewall issue.
If curl cannot hit one of the web applications locally, you should inspect the logs ($TOMCAT_HOME/logs/catalina.out) to figure out why.
You can also "ps -ef|grep tomcat" to make sure Tomcat is actually running, and you can "netstat -atnp|grep 8080" to make sure Tomcat is listening on the port you think it is.
If all of the firewall and networking tests are fine and the logs have no clues, uninstall the AMPs one-by-one until it starts working again.

HTTP fails on Inetsim

I'm trying to set up a malware analysis lab, following the instructions found here:
https://blog.christophetd.fr/malware-analysis-lab-with-virtualbox-inetsim-and-burp/
In setting up inetsim to simulate internet protocols, I keep getting "http_tcp_80 - failed!" everytime I run it. Changing the port it uses in the configuration file to 8080 causes the it to work. When I run it on a different vm, the configuration works as intended.
I have apache also installed on this vm. Could it be interfering?
Edit: I just installed a new vm to try using inetsim without apache installed. HTTP is reported to be running, but now dns_53_tcp_udp is reported to be failing to start. Trying to browse web pages to bring up inetsim's default page fails, regardless of if I use the FQDN or the IP address. The only time I get the page is with localhost. Otherwise, I get server not found. At least I know its not apache.
The error I get with DNS indicates that the 0.0.0.0 ip is already in use, which doesn't make sense to me since 0.0.0.0 is being used to bind the services to all IPs. Changing the inetsim.conf file so "service_bind_address 10.0.0.0" instead of "service_bind_address 0.0.0.0" seems to run dns, but the browser on both the analysis machine and the victim machine still report no server found.
You should stop the Apache server:
service apache2 stop
It works for me.
I guess there are some other processes listening on those ports.
Use
sudo netstat -tulpn | grep LISTEN
It will print out those processes with their pid. For example, 964 is the pid of the first process in this case:
Check if something is occupying your corresponding ports. Shut them down with
sudo kill -9 <pid>
Of course, the busy processes running on those ports may not in listening states but still be able to cause such a problem. So you can check it with
sudo netstat -tulpn
just in case.
Anyway, it does work for me.

Meteor ddp-client.js socksjs ERR_CONNECTION_REFUSED on local

The problem
I'm having an issue where when I start my local dev server with meteor, about 3/5 times the client's socksjs connection via ddp-client.js isn't able to connect and gets an ERR_CONNECTION_REFUSED error. All other connections work fine (websocket, JS, css, etc).
I'm seeing this in the console
The socks is attempting to connect to 192.168.1.14, which is my correct internal ip.
What I've tried
setting the port manually with meteor --port 3000
waiting for Meteor.status().status === 'connected' on the client before making any calls
If you'd like to recreate the problem yourself you can pull down the package I'm working on, ProseMeteor at commit 51c0a304338228102edc75427f72e689a7aafb8a and try running the app yourself by running the bash run_demo script, you should see the problem when you visit http://localhost:3000.
I appreciate any help!

How to get past the MongoDB port error to launch the examples?

I'm getting started with Meteor, using the examples:
https://www.meteor.com/examples/parties
If I deploy and load the deployment url ( http://radically-finished-parties-app.meteor.com/ ) , the app runs ... nothing magic there... it was an easy example
My issue occurs when I want to run it locally, I get the following message
"You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number"
I got meteor running through the terminal command:
meteor --port 3004
Setup:
- Mac OS 10.9
- Chrome 31
This is happening because you are accessing the mongodb port in your web browser.
When you run a meteor app, e.g on port 3004
Port 3004 would be a web proxy to port 3005
Port 3005 would be the meteor app in a 'raw' sort of sense (without the websockets part.. i think)
Port 3006 would be the mongodb (which you are accessing).
Try using a different port. Or use a simpler port e.g just run meteor and access port 3000 in your web browser.
If the reason you moved the port number up because it said the port is in use the meteor app may not have exited properly on your computer. Restart your machine or have a look at activity monitor to kill the rogue node process.
I think what might have happened is you ran in on 3000, then moved the ports up and the previous one may have not been exited correctly so what you're seeing is a mongodb instance of a previous meteor instance.
This happens when you run another meteor on port 2999, forget about it and try to start a second instance on the usual port.
Try making sure Meteor is using the local embedded mongo db, which it will manage on its own:
export MONGO_URL=''
Something changed in my bash settings that I didn't copy over to zsh. I uninstalled zsh and meteor can now find and access mongo.

Resources