com.google.api.client.http.HttpResponseException: 503 Service Unavailable - google-cloud-sql

We are having severe problems connecting to any of our databases in Cloud SQL with a wide range of errors (from delays in retrieving results) to exceptions on the google driver:
com.google.api.client.http.HttpResponseException: 503 Service Unavailable
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>Sorry...</title><style> body { font-family: verdana, arial, sans-serif; background-color: #fff; color: #000; }</style></head><body><div><table><tr><td><b><font face=times color=#0039b6 size=10>G</font><font face=times color=#c41200 size=10>o</font><font face=times color=#f3c518 size=10>o</font><font face=times color=#0039b6 size=10>g</font><font face=times color=#30a72f size=10>l</font><font face=times color=#c41200 size=10>e</font></b></td><td style="text-align: left; vertical-align: bottom; padding-bottom: 15px; width: 50%"><div style="border-bottom: 1px solid #dfdfdf;">Sorry...</div></td></tr></table></div><div style="margin-left: 4em;"><h1>We're sorry...</h1><p>... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.</p></div><div style="margin-left: 4em;">See Google Help for more information.<br/><br/></div><div style="text-align: center; border-top: 1px solid #dfdfdf;">© 2013 Google - Google Home</div></body></html>
com.google.api.client.http.HttpRequest.execute(HttpRequest.java:861)
com.google.cloud.sql.jdbc.internal.googleapi.RpcGoogleApi$DefaultGoogleApi.execImpl(RpcGoogleApi.java:326)
com.google.cloud.sql.jdbc.internal.googleapi.RpcGoogleApi$DefaultGoogleApi.exec(RpcGoogleApi.java:308)
com.google.cloud.sql.jdbc.internal.googleapi.RpcGoogleApi.openConnection(RpcGoogleApi.java:99)
com.google.cloud.sql.jdbc.internal.SqlProtoClient.openConnection(SqlProtoClient.java:58)
com.google.cloud.sql.jdbc.Driver.connect(Driver.java:66)
com.google.cloud.sql.Driver.connectImpl(Driver.java:109)
com.google.cloud.sql.Driver.connect(Driver.java:98)
com.google.cloud.sql.Driver.connect(Driver.java:31)
org.jboss.jca.adapters.jdbc.local.LocalManagedConnect
Or:
org.jboss.resteasy.spi.UnhandledException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: 502 Bad Gateway
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 502 (Server Error)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}#media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
</style>
<a href=//www.google.com/><img src=//www.google.com/images/errors/logo_sm.gif alt=Google></a>
<p><b>502.</b> <ins>That’s an error.</ins>
<p>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds. <ins>That’s all we know.</ins>
org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:80)
org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:220)
org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:146)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:351)
It was working perfectly until an hour ago which we started to get alerts with the failures.
Best regards
Sergio

Between 11.00PST and 11.30PST there was an issue that interrupted many Cloud SQL instances. The problem should now be resolved.
We apologize for the inconvenience and thank you for your patience and continued support. Please rest assured that system reliability is a top priority for the Google Cloud Platform, and we are making continuous improvements to make our systems better.
To be kept informed of other Google Cloud SQL issues and launches, please join google-cloud-sql-announce#googlegroups.com
https://groups.google.com/forum/#!forum/google-cloud-sql-announce

Related

DSpace with links to social media

At the DSpace repositories of Massey University and University of Waikato in New Zealand there are buttons to share the link to a document in the repository with Twitter, Facebook and other social media.
Also have both sites a Window with Twitter tweets.
I hope someone of you wants to explain how both functionalities are added to the DSpace Mirage 2 theme.
We use the addThis service with our DSpace installation: http://www.addthis.com/
The service allows you to customize the share options for your site.
For Mirage2, we added the following javascript to Mirage2/xsl/core/page-structure.xsl to add the service to our site. The link will contain a unique id for your configuration.
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=..."></script>
We also added some custom CSS to Mirage2/styles/_style.scss
.container {
padding-left: 50px;
padding-right: 50px;
}
You can preview this on our repository site: https://repository.library.georgetown.edu/
terrywb's answer covers the share button aspect - that is exactly the service used at the University of Waikato's repository that Peter linked to. We add the JavaScript in navigation.xsl not page-structure.xsl, and we also add
<div class="addthis_sharing_toolbox list-group" style="min-height:37.5px"></div>
just after the opening tag for the #ds-options div, in line with the AddThis embedding instructions.
As to the tweets on the home page, refer to the Twitter embedded timeline instructions. I believe we add a placeholder div via news-xmlui.xml that then triggers a template in theme.xsl that pulls in the JavaScript and generates the required a element - example below is from the Twitter documentation.
<a class="twitter-timeline"
href="https://twitter.com/TwitterDev"
data-width="300"
data-height="300">
Tweets by #TwitterDev
</a>
If you want to avoid services like AddThis tracking your users or just want to keep it simple, you can use simple share links. Add to dspace-xmlui-mirage2/src/main/webapp/xsl/aspect/artifactbrowser/item-view.xsl this template:
<xsl:template name="share-section">
<div class="item-page-field-wrapper table hidden-print">
<h5><i18n:text>xmlui.mirage2.itemSummaryView.ShareSection</i18n:text></h5>
<xsl:variable name="url">
<xsl:value-of select="encoder:encode(confman:getProperty('dspace.baseUrl'))" />
<xsl:value-of select="encoder:encode('/handle/')" />
<xsl:value-of select="encoder:encode(substring-after(/mets:METS/#OBJID,'handle/'))" />
</xsl:variable>
<a target="_blank" i18n:attr="title" title="xmlui.export.mendeley"
href="http://www.mendeley.com/import/?url={$url}">
<img src="{concat($theme-path,'/images/mendeley.png')}"
i18n:attr="alt" alt="xmlui.export.mendeley" />
</a>
<a class="social-network-icon twitter"
href="http://twitter.com/home/?status={$url}"
title="Share on Twitter" target="_blank"></a>
<a class="social-network-icon facebook"
href="http://www.facebook.com/sharer.php?u={$url}"
title="Share on Facebook" target="_blank"></a>
</div>
</xsl:template>
Here you can find more share links for other social networks.
Then, you have to call the template from where you want it to appear. For example, we add it to the first column of the item metadata, at the <xsl:template match="dim:dim" mode="itemSummaryView-DIM"> template of the same file.
We got the icons from Expando (another option for sharing with social networks, and it's free software). This CSS is to show the icons:
.social-network-icon {
background-image: url("../images/social-networks-icons.png");
background-repeat: no-repeat;
background-origin: 0;
display: inline-block;
height: 16px;
margin-left: 4px;
vertical-align: middle;
width: 16px;
}
.social-network-icon.facebook {
background-position: -0*16px 0;
}
.social-network-icon.google-plus {
background-position: -2*16px 0;
}

parse api request to horeku mongodb returns 503 service unavailable

I am building react native mobile app and a backend service I am using parse service, as many of you know Parse service is shutting down in 2017 and I have migrated my data to mlab(mongo db). I am using Heroku for application platform.
Now when I am making rest api request from my app or rest api tool i.e. Postman then I am keep getting :
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
html, body, iframe { margin: 0; padding: 0; height: 100%; }
iframe { display: block; width: 100%; border: none; }
</style>
<title>Application Error</title>
</head>
<body>
<iframe src="//s3.amazonaws.com/heroku_pages/error.html">
<p>Application Error</p>
</iframe>
</body>
</html>
Here is my request with header:
Header: X-Parse-Application-Id: xxxxxxxxxxxxxxxxxxx
http://xxxx.herokuapp.com/parse/classes/Message/KwSKveyh9C
What am I doing wrong ?
Parse REST API request failure

copying a div or any borders, for an html email

This may seem like a very easy question for a some people, but I've been asked to make an html email signature for someone at my office.
Doing a little googling it seems that for gmail, all you need to do is design the signature that you want to use, then copy and paste the whole thing into their signature box, then you should be good to go.
The problem I'm running into is I can only copy the text, I can't find a way to copy the borders of my div (I tried using a table for this too, but ran into the same issue.
I tried to find a way to work around this, by seeing if there was somewhere I could just input pure html into their signature box, but it renders as text, not as html.
After searching around for a while I haven't been able to find a solution to this issue yet, any help would be appreciated!(will add html below)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
#box {
border-style: solid;
border-color: black;
height: 130px;
width: 285px;
}
#name{
font-weight: bold;
text-align: center;
}
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body>
<div id=box>
<p id=name> ———— John Doe ———— </p>
</div>
<table>
<tr>
<td>test</td>
</tr>
</table>
</body>
</html>
There is a lot to consider in an HTML email signature. You need to develop and design it just as you would a regular HTML email. This means ALL styling should be inlined - especially Gmail as it ignores all Style tags. You also need to take into account the CSS that is available for each client (https://www.campaignmonitor.com/css/).
You will also want to test this signature across each client as the email client you are using may in fact change the code you put in prior to sending and each email client's pre-processor may delete or further edit your code upon delivery.
A great article about creating an email signature: http://www.sitepoint.com/the-art-of-designing-and-marking-up-email-signatures/
This is your code inlined:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<div style="border-style: solid; border-color: black; height: 130px; width: 285px;">
<p style="font-weight: bold; text-align: center;"> ———— John Doe ———— </p>
</div>
<table>
<tr>
<td style="border: 1px solid black;">test</td>
</tr>
</table>
</body>
</html>

Issues adding github gist to my blog(using Google blogger)

I'm trying to add a gist to my blog to see how it works and use it to share some code related blogs going forward.
I've followed the steps mentioned form this blog, but I'm not able to get it to work. I don't know what I'm missing, any pointers on what I could be missing would be really appreciated.
My HTML Editor of blog related code looks like this:-
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
Hi<br />
<br />
test<br />
<br />
<br />
<div class="gistLoad" data-id="4132084" id="gist-4132084">
Loading ....</div>
<br />
<br />
<br />
<br />
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"></pre>
</div>
<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script> </div>
Thanks.
UPDATE (including, changing the code above)
I found one thing confusing for a while, why should I actually paste a div tag in the "Compose" Section of the Blog, it's afterall HTML code, so I moved it to the HTML editor part of the Blog. What was confusing to me initially was when it was mentioned in the blog:-
Now to include any gist template just add the following anywhere in
your blog post.
But anyways, now, I only get "Loading" .., The error still persists..
Here's the code that did it correctly for me. I had to ensure that within the div I copy the code that comes as part of 'Embed the gist' when you actually see one's real gist(say for e.g., this gist) on Github.
Also, one more mistake I made was in my code, the JS was not completely outside the post(it was actually inside the last div if you observer closely(my bad)). Anyways, All's well that end's well :). So here's the code that did the trick for me -
<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
Hi<br />
<br />
test<br />
<br />
<br />
<div class="gistLoad" data-id="4132084" id="gist-4132084">
<script src="https://gist.github.com/boddhisattva/4132084.js"></script>
In case you want to see how I was able to embed the gist in my blog, you can have a look
at the stackoverflow question that I posted here on the same when I had initially faced issues to get this to work for me.
Credits to the original blogger's post.
</div>
<br />
<br />
<br />
<br />
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"></pre>
</div>
</div>
<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>
Here's the actual blog link which uses the above code.
Cheers.. :)
A simpler solution (since October 2014): www.gistfy.com:
Gistfy is an easy way to create embeddable code snippets from your GitHub and Bitbucket repositories or your GitHub Gist.
For example:
<script type='text/javascript' src='http://www.gistfy.com/github/gist/10666727'></script>
^
(id of a GitHub Gist)
The blog post you mention explains everything clearly and it's all you have to do. I'll describe what I did:
I copied the <script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script> into a widget that is dynamically loaded into each blog page (posts, pages, everything). This will not work, because, as being said, include the following code at the end of each of your blog posts. This means you have to include it separately in al your posts. Yes, I don't like it as well, but the blog entries are loaded dynamically, so you have to load gists after the original blog entry is loaded.
Put the <div class="gistLoad" data-id="GistID" id="gist-GistID">Loading ....</div>
just where you would put original github gist code. For example - this is a gist I wanted to display on my post. This is the original code: <script src="https://gist.github.com/tkoomzaaskz/6235219.js"></script>. The gistID is 6235219. So, instead, I put <div class="gistLoad" data-id="6235219" id="gist-6235219">Loading ....</div>. And in the end of the post, I put the javascript source from point 1.
This blog post is an example that it works fine.
I dont know, whether your are trying gist content made it as private or public. Here are the few steps for how to implement PUBLIC gist code into your blogger.
1) Create a gist file in gist.github.com(While you save the file just choose as "Create Public Gist"
2) Take/copy the code "Embed URL" text box(almost you done).
3) Login to your blogger and add copied code into your desired posts. Thats all. Your public gist code will display in your page.
Actual article from here
For me it was because i was using dynamic view template on google blogger. When i changed it to simple then the javascript was working and showed the gist.
The 3rd party github hosted file tag didn't work for me at all. - <script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script>
failed in chrome with Refused to execute script from 'https://raw.github.com/moski/gist-Blogger/master/public/gis‌​tLoader.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
The embed links on github's site work, but for those wanting to avoid the reliance on a script link, I wrote code to pull down what the embed link serves up and decode it for pasting into blogger. LinqPad code at https://github.com/ImaginaryDevelopment/LinqPad/blob/master/LINQPad%20Queries/LanguageTranslators/fetch%20then%20parse%20gist%20html.linq
Kindly look for the Embed code ofrthe gist, i found out it to be
<script src="https://gist.github.com/boddhisattva/4132084.js"></script>
The just create a blogpost in blogger.com with just the above script, it's that easy

Show a form's response in browser instead of Lotus Notes Tab

this is the first time I work with email forms for Lotus Notes - should the answer be too simple, please forgive me.
What I do is sending an HTML mail with a FORM. Usually Notes opens URLs in such emails in a new browser window - but the email form (or rather the server's response) is opened in a new tab.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html charset=UTF-8" />
<title>Title</title>
</head>
<body style="width: 600px; padding: 20px; margin: 0px; font-family: Verdana, Arial, sans-serif; font-size: 12px">
...
<form action="http://server/url/" method="post" target="_blank">
...
<div style="margin-top: 30px; text-align: right; padding-bottom: 30px; border-bottom: 2px solid #CCCCCC">
<input type="submit" value="Send" />
</div>
</form>
</body>
</html>
PS: Lotus seems to ignore whether a target="_blank" is set or not.
Any suggestions? I know that you can modify the program's behavior when it is your Notes - but as the tab sometimes has other connections settings (e.g. proxy) than the local browser I'd like to change the behavior "by mail".
Thanks for suggestions!
BurninLeo
Unfortunately browser behavior can't be controlled by the content and needs to be set on the client side. The target attribute is the only thing you can change.
Check your browser settings and what happens when you click on a link in the browser. If it normally opens in a new tab, then setting your target doesn't make a difference, as the new tab is the target.
Before tabbed browsing was introduced, it would always open a new window, but now it just opens a new tab.