Cloud Foundry on Bluemix: No network connection when starting new app with binary-buildpack - ibm-cloud

First, I've finaly found out what the problem was but still, I decided to write this question+answer for others (because I spent 6 hours with this issue).
So, what's the problem...
I have a Cloud Foundry app (on public Bluemix) based on binary-buildpack. Two days ago, everything was OK. But not since yesterday. My app crashed (probably during restaging or something similar) and never started again. I tried to push the app again and still the same result. Really frustrating...
Something about the backend... There is a shell script in my instance that runs one binary application. Generaly, the application should connect to database server (also on public Bluemix).
The problem: Everytime I tried to start the app, it crashed immediately. This is what I found in logs: dial tcp: lookup databaseserverdomain.com on 0.0.0.0:53: server misbehaving.
There are a couple of similar problems on StackOverflow but no answer that would be helpful for me.
So, the error means that something went wrong with TCP connection. Ok, but what exactly? That's the question I'm going to answer myself...

Sounds like your binary isn't capable in properly handling connection problems. I would rather fix that part since I guess it will crash anyway when there is a connection issue.

The solution was actually simple...
I edited my shell script and add ping google.com -count 3 before launching the application to test if there is a stable network connection. This worked.
The application got 2 more seconds and it was enough for network/router/whatever to establish the connection.
Hmm.. It seems that there is something wrong with network routing on Cloud Foundry/Bluemix since yesterday.

Related

VSCode Remote Server stuck on initializing server

I'm currently trying to access a remote server using VS Code's Remote SSH extension. I haven't had a problem when using it before (that was around a month ago) but today when I tried to access the server I ran into some trouble.
I have the hostname and everything configured in a config file, and so I just click on that option and type in the password. However, VS Code seems to be stuck on "Opening Remote..." for the past hour or so. The dialogue I get in the terminal is as follows:
username#host's password:
Running remote connection script
Acquiring lock on /home/username/.vscode-server/bin/abcdefghijklmnop1234567989/
vscode-remote-lock.abcdefghijklmnop1234567989
Installing to /home/username/.vscode-server/bin/abcdefghijklmnop1234567989...
Downloading with wget
Does anybody know what the problem might be? Is this normal?
EDIT
As soon as I posted this the connection was successfully made. However, I would also like to still know what the problem was and if it normally takes around an hour, and what this process might be doing. I also believe it would be helpful to the community overall.
Thank you.
I've faced the same issue just now and realized that firewall protection has something to do with it.
As soon as I disabled it, the remote connection was established and I managed to see my code again.

Concourse result keeps loading

I'm new to concourse and really excited to start working with it but I have a problem running the hello world example described here: https://concourse-ci.org/hello-world.html
I'm running this example on a concourse docker setup described here: https://concourse-ci.org/docker-repository.html.
Everything seems to work just fine but when I want to verify the results of both examples it keeps saying loading:
Task result loading (image)
Any idea why this would happen? I'm running docker-compose on Mac OS X (El Capitan) but that shouldn't matter right? Is there some additional configuration that I'm missing?
I also noticed when checking the network trace that the following request doesn't return any value: /api/v1/builds/<buildnumber>/events
It keeps saying 'pending'. Is that normal? I assume it isn't but I don't know the cause of this. Is there any logging I can check?
EDIT:
It seems to have something to do with the fact that it isn't running on localhost. When I use port forwarding and open concourse on localhost:8080 the results are shown just fine. Also mapping another hostname to 127.0.0.1 with port forwarding enabled works. So only when I communicate directly with the opened docker ports it doesn't work. Am I missing something?
After much frustration I found out that to cause of this issue was that Sophos Anti-Virus was blocking Concourse server-side events...
https://community.sophos.com/products/free-antivirus-tools-for-desktops/f/sophos-anti-virus-for-mac-home-edition/5750/sophos-av-blocks-server-sent-events-sse-on-mac-os-x-yosemite

ConnectionPool::PoolShuttingDownError thrown once in a while by application_controller rails using Mongodb replicaSet

I have a RoR application running on two different server. They run the same version of the app and are similar in configuration. I have a Mongodb replica set running on both the server with a third server as an arbitrary server.
Everything runs fine. The data is syncing perfectly. But after 2 weeks of running, one of the server started giving ConnectionPool::PoolShuttingDownError. I checked the log and I can see the error was raised application controller. I didn't change any code on any of the server.
The server raising the error is fine till it gets 6-7 simultaneous request. Or when you refresh the page 6-7 times together. It gives this error once and then again you refresh the page and its back to normal. This is weird and I can't understand why one server has this problem while the other one don't and that too sometime.
I am using Mongoid with Moped, Rails 4.1.0 and Ruby 2.1.5. I also checked available connections using db.serverStatus().connections which is around 51158 and ulimit of max process is 257185.
I searched a lot but I am still unsure of the cause of this problem. It will be great if someone can put some light on this issue. Any help will be appreciated. Thanks in advance.

VS 2013 Web Deployment Failing - Socket Error 10054

I posted on friday regarding this issue and received no response, however since then some updates have occurred which might affect whether people have an answer to my question or not.
I'm trying to deploy an MVC website to Azure, and in this particular project the web deploy receives a Socket Error 10054 and gives up after 10 attempts saying it was Unable to write data to the transport connection. It makes varying progress in between the socket failures but never completes within the 10 attempts.
I have since had a play around with other projects which are deployed to different url locations within this same Azure Account and they deploy fine! I think this means the problem is not on my end, i.e. port 8172 is open and deployment can be achieved with my current local settings.
What are the problems that can cause this socket error 10054? I saw somewhere that I should enable the "Allow untrusted certificate" option when deploying but I can't find that option within VS 2013.
Any ideas are welcome please,
This issue is driving me mad, it seems there's a real mixed bag of solution ideas which have worked for others but not me.
JK

Connection to google cloud sql fails on dev

I'm trying to connect to the Dev SQL server on Google's cloud platform.
I used to have no problem at all connecting a few weeks ago but I wanted to upgrade some stuff and suddenly a connection cannot be established..
I've tried connecting via MySQL Workbench first and it keeps getting a connection error 10060. When I test the parameters it goes fine but the connection never succeeds.
So I also tried using code in Java using a code similar to Google's example and this arbitrarily works but mostly doesn't and throws connection link fail exception.
So I know the code and setup is fine since it sometimes succeeds. so the question is: why? When is it fine and when does it fail and why? Also why does it never work via the workbench although it did work in the past?
Is this familiar to anyone?
Any help is greatly appreciated!
Thanks
I'm having the same problem.
I read that it might be the ISP blocking outbound port 3306.
is your IPS is Bezeq International-Ltd by any chance?
when I use my cell phone network it works fine.
It looks like Google are currently having issues with Cloud SQL. See Twitter for example