I am trying to run Cloud Endpoints ESP container locally on my Mac fallowing the documentation at https://cloud.google.com/endpoints/docs/openapi/running-esp-localdev.
I could deploy the endpoint configuration to GCP using the openapi yaml file. But some how the ESP container could not get the service definitions from Service management API.
I have looked at the ESP container logs, it has go below errors. Am I missing something?
2018/09/13 21:29:38[error]11#11: Failed to download rollouts: UNAVAILABLE: Failed to connect to the service management, Response body:
2018/09/13 21:30:08 [error] 11#11: servicemanagement.googleapis.com could not be resolved (110: Operation timed out)
2018/09/13 21:30:08 [error] 11#11: servicemanagement.googleapis.com could not be resolved (110: Operation timed out)
2018/09/13 21:30:08 [error] 11#11: servicemanagement.googleapis.com could not be resolved (110: Operation timed out)
2018/09/13 21:30:38 [error] 11#11: servicemanagement.googleapis.com could not be resolved (110: Operation timed out)
2018/09/13 21:30:38 [error] 11#11: servicemanagement.googleapis.com could not be resolved (110: Operation timed out)
2018/09/13 21:30:38 [error] 11#11: servicemanagement.googleapis.com could not be resolved (110: Operation timed out)
Operation timed out errors imply that there may be a networking issue with your ESP container. Try running:
$ docker run byrnedo/alpine-curl curl -sI servicemanagement.googleapis.com
If you see HTTP/1.1 404 Not Found then you can eliminate any issues with your docker networking setup; otherwise try following the troubleshooting guide at https://success.docker.com/article/troubleshooting-container-networking.
Related
I am attempting to deploy a locally developed web application as an aws instance. The application is web based with a node.js back end. I uploaded the application using aws's Elastic Beanstalk which is pretty straightforward and worked well. I received a green health checkmark after the deployment was completed.
However, when I selected the url at the top of the Dashboard to open my newly deployed app, I received a '502 Bad Gateway' error. I did a Google search to identify what the error was and how to correct it without much success. Most of the suggestions were to refresh the page and it would somehow go away 'by itself'. It didn't. I also read through the Elastic Beanstalk war - 502 Bad Gateway stackoverflow question also without much success.
Here is the output of the error.log that I downloaded from aws:
2018/10/11 15:04:24 [error] 2946#0: *231 connect() failed (111:
Connection refused) while connecting to upstream, client: 172.31.88.17,
server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/",
host: "sowapp-env.bpcts5p34k.us-east-1.elasticbeanstalk.com"
2018/10/11 15:04:24 [error] 2946#0: *231 connect() failed (111:
Connection refused) while connecting to upstream, client: 172.31.88.17,
server: , request: "GET /favicon.ico HTTP/1.1", upstream:
"http://127.0.0.1:8081/favicon.ico", host: "sowapp-env.bpcts5p34k.us-east-1.elasticbeanstalk.com", referrer: "http://sowapp-env.bpcts5p34k.us-east-1.elasticbeanstalk.com/"
2018/10/11 15:05:13 [error] 2946#0: *231 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.88.17, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "sowapp-env.bpcts5p34k.us-east-1.elasticbeanstalk.com"
2018/10/11 15:05:13 [error] 2946#0: *231 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.88.17, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8081/favicon.ico", host: "sowapp-env.bpcts5p34k.us-east-1.elasticbeanstalk.com", referrer: "http://sowapp-env.bpcts5p34k.us-east-1.elasticbeanstalk.com/"
I also downloaded the nodejs.log which seems to indicate that the aws server is not pointing to the startup file, server.js.
Error: Cannot find module '/var/app/current/system.js'
at Function.Module._resolveFilename (module.js:476:15)
at Function.Module._load (module.js:424:25)
at Module.runMain (module.js:611:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:160:9)
at bootstrap_node.js:507:3
module.js:478
throw err;
Suggestions are appreciated.
Thanks...
I would try this.
Set up a folder in your source your uploading to elastic beanstalk called .ebextensions
Create the files here to set your source and setup your application.
An example is creating a file called node-settings.config
(to run any npm commands your application needs to initialize) Example \/ from the link:
option_settings:
aws:elasticbeanstalk:container:nodejs:
NodeCommand: "npm start"
ProxyServer: apache
GzipCompression: true
aws:elasticbeanstalk:container:nodejs:staticfiles:
/images: myimages
Here is the link to show what you can set as Platform Specific Options in this file (nodejs):
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-specific.html
In my case, I tried changing the node.js port to 8081 and committed on local branch. Thereafter doing eb deploy from command line deployment solved my problem.
I have created a new server redash in aws Region us-west-2.
after a setup superset in server but error. I reboot server instance in aws and redash don't active.
Bad Gateway: The proxy server received an invalid response from an
upstream server HTTP Error 502 - Bad Gateway
check error in cat /var/log/nginx/error.log I see:
2018/09/27 17:33:06 [error] 1192#1192: *16 recv() failed (104:
Connection reset by peer) while reading response header from upstream,
client: 210.245.121.234, server: , request: "GET / HTTP/1.1",
upstream: "http://127.0.0.1:5000/", host: "54.191.135.96" 2018/09/27
17:33:06 [error] 1192#1192: *16 connect() failed (111: Connection
refused) while connecting to upstream, client: 210.245.121.234,
server: , request: "GET /favicon.ico HTTP/1.1", upstream:
"http://127.0.0.1:5000/favicon.ico", host: "54.191.135.96", referrer:
"http://54.191.135.96/"
Did you add your redash start command in your /etc/init.d/ configuration ?
A simple installation on a Ec2 Server will not do that for you, you have to ask your ec2 to launch redash on startup process
There is multiple ways to do that, AWS User data is one of them, try this out?
(If not, please provide us more information about your system and how you launch your redash)
I have a Jenkins running on AWS instance with Ubuntu server. Jenkins can’t reach the WSDL file on the remote server. The WSDL is running on the virtual environment (windows 10).
What can I do to solve this issue?
Building in workspace /var/lib/jenkins/workspace/ToscaCI
[ToscaCI] $ /bin/sh -xe /tmp/jenkins494407163776032501.sh
+ java -jar /var/lib/jenkins/ToscaCIJavaClient.jar -e http://18.233.94.164:8732/TOSCARemoteExecutionService/ -c /var/lib/jenkins/workspace/ToscaCI/result.xml -t junit
javax.xml.ws.WebServiceException: Failed to access the WSDL at: http://18.233.94.164:8732/TOSCARemoteExecutionService//?wsdl. It failed with:
Connection timed out (Connection timed out).
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:250)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:231)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:194)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:163)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:348)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:306)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:215)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:196)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:192)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
at javax.xml.ws.Service.<init>(Service.java:77)
at org.tempuri.RemoteExecutionService.<init>(RemoteExecutionService.java:43)
at com.tricentis.continuousintegration.toscacijavaclient.Dispatcher.Connect(Dispatcher.java:30)
at com.tricentis.continuousintegration.toscacijavaclient.Main.main(Main.java:22)
Caused by: java.net.ConnectException: Connection timed out (Connection timed out)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:357)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at java.net.URL.openStream(URL.java:1045)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:984)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:385)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:216)
... 12 more
[Ljava.lang.StackTraceElement;#506e1b77
Message: Failed to access the WSDL at: http://18.233.94.164:8732/TOSCARemoteExecutionService//?wsdl. It failed with:
Connection timed out (Connection timed out).
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I deployed my spring boot app with this tutorial https://aws.amazon.com/pt/blogs/devops/deploying-a-spring-boot-application-on-aws-using-aws-elastic-beanstalk/, set the server port door to 5000 with enviroment varible, and it's work fine.
But some time latter without any request when i try to post our get some resource i take a timeout error:
2017/08/26 02:19:24 [error] 12955#0: *15 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.2.223, server: , request: "GET /api/motoristas HTTP/1.1", upstream: "http://127.0.0.1:5000/api/motoristas", host: "vaptuberjjaerp-env.e5y5w4fa2q.sa-east-1.elasticbeanstalk.com"
and if i try to access api documentation link it works fine: http://vaptuberjjaerp-env.e5y5w4fa2q.sa-east-1.elasticbeanstalk.com/swagger-ui.html
What is happening ?
Not knowing for certain but this sounds like your documentation might just be static content that is generated at build time. If this is the case then it would still be accessible if the Java process for your app died. In this case the rest of your app would be unavailable. I recommend checking that the app your process runs in is still active and running.
I am setting up a new Percona node on an AWS to connect to an existing cluster that is not on AWS. I have security groups updated.
I added all the IPs to the my.cnf file and could not start Percona. I removed the IPs to start from scratch. I am getting this error:
140114 16:24:30 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out)
at gcomm/src/pc.cpp:connect():139
140114 16:24:30 [ERROR] WSREP: gcs/src/gcs_core.c:gcs_core_open():195: Failed to open backend connection: -110 (Connection timed out)
140114 16:24:30 [ERROR] WSREP: gcs/src/gcs.c:gcs_open():1289: Failed to open channel 'my_centos_cluster' at 'gcomm://10.10.25.10,10.20.4.11,10.10.20.12,10.20.4.13': -110 (Connection timed out)
140114 16:24:30 [ERROR] WSREP: gcs connect failed: Connection timed out
140114 16:24:30 [ERROR] WSREP: wsrep::connect() failed: 6
140114 16:24:30 [ERROR] Aborting
That is only a sample. Here is my.cnf:
[mysqld]
#datadir=/var/lib/mysql
datadir=/data/mysql
user=mysql
log-error=/data/mysql/mysqlerror.log
# Path to Galera library
wsrep_provider=/usr/lib64/libgalera_smm.so
# Cluster connection URL contains the IPs of node#1, node#2 and node#3
wsrep_cluster_address=gcomm://LOCAL_IP
# In order for Galera to work correctly binlog format should be ROW
binlog_format=ROW
# MyISAM storage engine has only experimental support
default_storage_engine=InnoDB
# This is a recommended tuning variable for performance
innodb_locks_unsafe_for_binlog=1
# This changes how InnoDB autoincrement locks are managed and is a requirement for Galera
innodb_autoinc_lock_mode=2
# Node #1 address
wsrep_node_address=LOCAL_IP
# SST method
wsrep_sst_method=xtrabackup
# Cluster name
wsrep_cluster_name=my_centos_cluster
# Authentication for SST method
wsrep_sst_auth="USER:PASS"
What am I doing wrong?