At some point my logstash forwarder used to work properly but at some point fail to start with this error message
Failed unmarshalling json: invalid character ']' looking for beginning of value logstash
This message appears only if i run forwarder with this command:
$ /opt/logstash-forwarder/bin/logstash-forwarder -config="/etc/logstash-forwarder"
If i run it as a service it fails without any error message, if i restart the service getting this
Restarting log shipper logstash-forwarder
start-stop-daemon: warning: failed to kill PID: No such process
...done.
The first time stopped forwarder working i found in syslog this message:
connection from UDP: [54.194.184.218]:63707->[10.38.143.181] Nov 21
12:41:38 logstash-forwarder[PID]: 2014/11/21 12:41:38.692517 Read
error looking for ack: EOF Nov 21 12:41:38 logstash-forwarder[PID]:
2014/11/21 12:41:38.692592 Setting trusted CA from file:
/etc/pki/tls/certs/logstash-forwarder.crt Nov 21 12:41:38
logstash-forwarder[PID]: 2014/11/21 12:41:38.692827 Connecting to
X.X.X.X:5000 (X.X.X.X) Nov 21 12:41:38 logstash-forwarder[PID]:
2014/11/21 12:41:38.694128 Failure connecting to X.X.X.X: dial tcp
X.X.X.X:5000: connection refused
At server side logstash and ES cluster seems to work fine..
I found many similar problems with mine but not any solution.
Related
I have decided to start with laravel and successfully installed it in my mac but the problem is I can't connect to my localhost/phpmyadmin because XAMPP wont make mysql start and proftpd.
Here's the log
Starting MySQL Database...
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting ProFTPD...
Exit code: 8
Stdout:
Checking syntax of configuration file
proftpd config test fails, aborting
Stderr:
2020-04-24 15:42:55,322 mypc-2 proftpd[22004]: warning: unable to determine IP address of 'mypc-2'
2020-04-24 15:42:55,322 mypc-2 proftpd[22004]: error: no valid servers configured
2020-04-24 15:42:55,322 mypc-2 proftpd[22004]: fatal: error processing configuration file '/Applications/XAMPP/xamppfiles/etc/proftpd.conf'
and I dont know why it says mypc-2 when it should only be mypc
I'm deploying my Java8 SpringBoot App to a Google Compute Engine instance and trying to connect it to a Debian9 CloudSQL instance. I'm trying to get the instance to run with my startup-script.sh, but when it tries to boot up the SpringBoot Application, according to the daemon.log, when the .war is ran by "java -jar order-routing-0.0.1-SNAPSHOT.war" the startup fails with a "Unable to obtain connection from database: Communications link failure", with SQL State:08S01 and error code 0.
I mapped the GCE instance to a static external IP, as well as whitelisting that IP on the CloudSQL instance's connections configs. I also verify that the war file runs locally with "java -jar order-routing.war".
Here is my startup script.sh:
#!/usr/bin/env bash
# This script is passed to the GCE instance by the setup script. It is run on the instance when it is spun up.
# Derived from GCE Tutorial at https://cloud.google.com/java/docs/tutorials/bookshelf-on-compute-engine
# [START script]
set -e
set -v
# Talk to the metadata server to get the project id
PROJECTID=$(curl -s "http://metadata.google.internal/computeMetadata/v1/project/project-id" -H "Metadata-Flavor: Google")
BUCKET=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/attributes/BUCKET" -H "Metadata-Flavor: Google")
echo "Project ID: ${PROJECTID}"
# get our file(s)
gsutil cp "gs://order-routing-install/gce/"** .
# Install dependencies from apt
apt-get update
apt-get install mysql-client -y
wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64
mv cloud_sql_proxy.linux.amd64 cloud_sql_proxy
chmod +x cloud_sql_proxy
./cloud_sql_proxy -instances=instance-qa1:us-central1:instance-qa1-cloudsql-0=tcp:3307 &
apt-get install -yq default-jre
apt-get install -yq default-jdk
java -jar order-routing-0.0.1-SNAPSHOT.war
# [END script]
Here is the failing error log from the daemon.log:
ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.exception.FlywaySqlException:
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: Unable to obtain connection from database: Communications link failure
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: 2019-07-29 03:39:30.435 INFO 9051 --- [ main] ConditionEvaluationReportLoggingListener :
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script:n from database: Communications link failure
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: SQL State : 08S01
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: Error Code : 0
Jul 29 03:39:30 order-routing-group-hk66 startup-script: INFO startup-script: Message : Communications link failure
Expected Result:
The GCE instance starts up the war file successfully and I can access my app using the external IP.
Actual Result:
Getting CommunicationsLinkFailures upon starting up Spring Boot Java app.
I have a node.js app to be running with rabbitmq and mysql.
After setting everything up, when I do npm start
I have given the user administrator tag and permissions as
rabbitmqctl set_permissions RABBIT_USERNAME "." "." ".*"
It shows this error :
> node app.js
13:43
Started database log (Mon Jan 29 2018 13:43:42 GMT+0530 (IST))
13:43
Started mailer log (Mon Jan 29 2018 13:43:44 GMT+0530 (IST))
13:43
Started messaging log (Mon Jan 29 2018 13:43:44 GMT+0530 (IST))
13:43
Started messaging log (Mon Jan 29 2018 13:43:44 GMT+0530 (IST))
13:43
Started database log (Mon Jan 29 2018 13:43:44 GMT+0530 (IST))
13:43
Started socket log (Mon Jan 29 2018 13:43:44 GMT+0530 (IST))
13:43 messaging:3000 is listening..
13:43 DB connected (7)
13:43 DB connected (6)
13:43 Error:
Expected ConnectionOpenOk; got <ConnectionClose channel:0>
Error: Expected ConnectionOpenOk; got <ConnectionClose channel:0>
at /PATH/node_modules/amqplib/lib/connection.js:167:14
at /PATH/node_modules/amqplib/lib/connection.js:159:12
at Socket.recv (/PATH/node_modules/amqplib/lib/connection.js:497:12)
at Object.onceWrapper (events.js:255:19)
at Socket.emit (events.js:160:13)
at emitReadable_ (_stream_readable.js:520:10)
at emitReadable (_stream_readable.js:514:7)
at addChunk (_stream_readable.js:280:7)
at readableAddChunk (_stream_readable.js:256:11)
at Socket.Readable.push (_stream_readable.js:213:10)
at TCP.onread (net.js:599:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! messaging# start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the messaging# start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/mishal23/.npm/_logs/2018-01-29T08_13_45_095Z-debug.log
There is no enough context on how this happened so I'm making a few assumptions:
RabbitMQ is not installed locally and it is installed on some server.
You're using amqplib for the connection. (Not an assumption)
You haven't created any Virtual Hosts.
Setting Up
So the first thing you need to do is to create a user if you haven't already.
sudo rabbitmqctl add_user admin password
sudo rabbitmqctl set_user_tags admin administrator
Run this command if you haven't enabled the Management Dashboard
sudo rabbitmq-plugins enable rabbitmq_management
By default, it runs on port 15672. So don't forget to open that port. And you can access this dashboard using your.server.ip.address:15672.
Now in this Management Dashboard, go to the Admin tab and on the right side, you'll see a link to Virtual Hosts.
There will be one virtual host named / and user guest (that you cannot access without localhost). Now create a new virtual host and check if it has the same user as you just created a few moments back (admin in this case).
Connecting to the RabbitMQ server
Use the string below to connect to the server instead of amqp://localhost
amqp://admin:password#your.server.ip.address/vhost_name
You can use this example (or any other examples) for the rest of the things...
I hope this helps!
Go to the rabbitmq dashboard > click admin menu > select your user from which you want to connect > click set permission button > restart server
In my case, the issue was related to heartbeat. You have to pass the heartbeat as a parameter to your connection URL:
amqps://user:password#domain/vhost_name?heartbeat=30
When trying to persist an entity from Cygnus to Cosmos global instance it fails.
Looking at the log file I see something like that:
2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:273) - >> GET /webhdfs/v1/user/ms/def_serv/def_servpath/6_registervalues/6_registervalues.txt?op=getfilestatus&user.name=ms HTTP/1.1
12 Nov 2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> X-Auth-Token: xxxxxxxxxxxxxxxxxxx
12 Nov 2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> Host: cosmos.lab.fiware.org:14000
12 Nov 2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> Connection: Keep-Alive
12 Nov 2015 15:31:50,007 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> User-Agent: Apache-HttpClient/4.2.1 (java 1.5)
12 Nov 2015 15:31:50,284 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.close:169) - Connection 0.0.0.0:59834<->130.206.80.46:14000 closed
12 Nov 2015 15:31:50,285 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.client.DefaultRequestDirector.tryExecute:716) - Closing the connection.
12 Nov 2015 15:31:50,285 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.close:169) - Connection 0.0.0.0:59834<->130.206.80.46:14000 closed
12 Nov 2015 15:31:50,286 INFO [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.client.DefaultRequestDirector.tryExecute:723) - I/O exception (java.net.SocketException) caught when processing request: Connection reset
12 Nov 2015 15:31:50,287 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.client.DefaultRequestDirector.tryExecute:728) - Connection reset
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:185)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
(I have obfuscated the token in the example above.)
for some reason the connection is closed.
Orion and Cygnus are installed on a fiware lab private instance in Spain2.
When trying to fire the same request from the command line from the Orion machine, I get the same disconnected response.
curl -X GET "http://cosmos.lab.fiware.org:14000/webhdfs/v1/user/ms/def_serv/def_servpath/6_registervalues/6_registervalues.txt?op=getfilestatus&user.name=ms" -H "X-Auth-Token: xxxxxxxxxxxxxxxxxxxxxx"
curl: (56) Failure when receiving data from the peer
But surprisingly, when doing the same request from the command line from the Cosmos global instance, it works!
See:
[ms#cosmosmaster-gi ~]$ curl -X GET "http://cosmos.lab.fiware.org:14000/webhdfs/v1/user/ms/def_serv/def_servpath/6_registervalues/6_registervalues.txt?op=getfilestatus&user.name=ms" -H "X-Auth-Token: xxxxxxxxxxxxxxxxx"
{"FileStatus":{"pathSuffix":"","type":"FILE","length":2,"owner":"ms","group":"ms","permission":"644","accessTime":1447332222908,"modificationTime":1447253745711,"blockSize":67108864,"replication":3}}
[ms#cosmosmaster-gi ~]$
Seems like Cosmos will not service connection arriving from a fiware lab instance running on Spain2.
Does anyone knows what's the issue here, and how to correct this.
Thanks!
Menachem S.
Issue was solved by a workaround.
The Cygnus server was installed on an external node ( a Machine on Azure), and everything works fine wrt Orion-->Cygnus-->Cosmos stream.
Suddenly, the apache and MySQL won't start anymore. I already restarted the mac several times, but the error persists:
Starting Apache Web Server...
Exit code: 8
Stdout:
apache config test fails, aborting
Stderr:
AH00543: httpd: bad user name lucasvallim
I didn't change any configuration at all, it was running normally but then this error appeared...
Any suggestions?