Cygnus can not persist data on Cosmos global instance - fiware

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.

Related

Sonarqube setup in Ubuntu

Trying to setup Sonarqube in Ubuntu 18.04 (on Ec2) using mysql, Went thru this digital Ocean tutorial
But after all that sudo service sonarqube start errors out:
ubuntu#ip-:/opt/sonarqube$ sudo service sonarqube start
Job for sonarqube.service failed because the control process exited with error code.
See "systemctl status sonarqube.service" and "journalctl -xe" for details.
ubuntu#ip-:/opt/sonarqube$ systemctl status sonarqube.service
sonarqube.service - SonarQube service
Loaded: loaded (/etc/systemd/system/sonarqube.service; disabled; vendor prese
Active: failed (Result: exit-code) since Fri 2019-10-04 16:45:33 UTC; 1min 43
Process: 11036 ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start (code=
Oct 04 16:45:32 ip-172-31-41-243 systemd[1]: sonarqube.service: Control process
Oct 04 16:45:32 ip-172-31-41-243 systemd[1]: sonarqube.service: Failed with resu
Oct 04 16:45:32 ip-172-31-41-243 systemd[1]: Failed to start SonarQube service.
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: sonarqube.service: Service hold-off
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: sonarqube.service: Scheduled restar
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: Stopped SonarQube service.
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: sonarqube.service: Start request re
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: sonarqube.service: Failed with resu
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: Failed to start SonarQube service.
Tried another tutorial and with different version of sonarqube and different DB - same result. Is there a resource requirement (memory) for sonarqube - I am deploying on EC2 t2.micro - 8GB - assuming that should be enough?
Tried /opt/sonarqube/bin/linux-x86-64/sonar.sh start this gives error:
Syntax error: newline unexpected (expecting ")"). I had Not edited the sonar.sh file
SonarQube Docker
Tried going Docker route - did not work.
Connection refused on port 9000. I have TCP/9000 opened in the Security Group and NACL is all open.
http://IP:9000 This site can’t be reached x.x.x.x refused to connect
I had a similar issue. Mine was caused by an extra white space in the systemctl service config file. I suggest you check properly, or delete and recreate the service file. More carefully this time.

My Google Compute Engine startup script has CommunicationsLinkFailures (SQL State 08S01 Error 0) even though it runs fine locally?

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.

sendmail can not relay email to another server

I installed sendmail on both server1 and server2. They use the same configuration file: sendmail.mc. I can send/receive mails to/from the users on the same server using an email client from my PC. But I can not send email to the users on the other server. For example, I can not send an email to bbb#server2domain.com from aaa#server1domain.com using the email client. I've added the ip address of my PC to /etc/mail/access on server1(Connect:zz.zz.zz.zz RELAY) and rebuilt access.db. Looking into /var/log/maillog, sendmail on server1 successfully accepted the mail from the PC but waited for a long time when connecting to server2
Apr 3 07:21:06 server1 sendmail[19771]: v33BKxfr019769: SMTP outgoing connect on server1.xxxxx.com
then timeout:
Apr 3 07:26:06 server1 sendmail[19771]: v33BKxfr019769: timeout waiting for input from server2domain.com. during client greeting
Apr 3 07:26:06 server1 sendmail[19771]: v33BKxfr019769: to=, ctladdr= (501/501), delay=00:05:04, xdelay=00:05:00, mailer=esmtp, pri=121178, relay=server2domain.com. [yy.yy.yy.yy], dsn=4.0.0, stat=Deferred: Connection timed out with server2domain.com.
On server2, the log is:
Apr 3 07:18:02 server2 sendmail[20121]: v33BI2Os020121: assigned id
Apr 3 07:18:02 server2 sendmail[20121]: NOQUEUE: connect from [xx.xx.xx.xx]
Apr 3 07:18:02 server2 sendmail[20121]: AUTH: available mech=ANONYMOUS,
allowed mech=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5
Apr 3 07:18:02 server2 sendmail[20121]: v33BI2Os020121: Milter: no active filter
Apr 3 07:23:02 server2 sendmail[20121]: STARTTLS=server, info: fds=6/4, err=5
Apr 3 07:23:02 server2 sendmail[20121]: STARTTLS=server, error: accept failed=0, SSL_error=5, errno=0, retry=-1, relay=[xx.xx.xx.xx]
Apr 3 07:23:02 server2 sendmail[20121]: v33BI2Os020121: disconnect level 1
Apr 3 07:23:02 server2 sendmail[20121]: v33BI2Os020121: in background, pid=20121
Apr 3 07:23:02 server2 sendmail[20121]: v33BI2Os020121: [xx.xx.xx.xx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA-SSL
I can successfully send email to server2 on server1 using the openssl command and do not need to input user name/password.
The sendmail.mc is:
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
define(`confCRL', `/etc/pki/tls/certs/revoke.crl')
define(`confCLIENT_CERT', `/etc/pki/tls/certs/sendmail.pem')
define(`confCLIENT_KEY', `/etc/pki/tls/certs/sendmail.pem')
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Family=inet, Port=465, Name=MTA-SSL, M=s')dnl
CLIENT_OPTIONS(`Family=inet')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 465')
define(`ESMTP_MAILER_ARGS', `TCP $h 465')
MAILER(smtp)dnl
MAILER(procmail)dnl
Both sendmail listen on port 465. I doubt the problem is related to auth but do not know the reason.
Please help, thank you!
After adopting Andrzej A. Filip's suggestion and removing the two lines in sendmail.mc, the following error occurs in the log on server1:
Apr 3 13:02:25 server sendmail[19927]: v33BKxfr019769: makeconnection (server2domain.com. [yy.yy.yy.yy]) failed: Connection refused by server2domain.com.
Apr 3 13:02:25 server sendmail[19927]: v33BKxfr019769: makeconnection (server2domain.com. [yy.yy.yy.yy]) failed: Connection refused by server2domain.com.
Apr 3 13:02:25 server sendmail[19927]: v33BKxfr019769: to=, ctladdr= (501/501), delay=05:41:23, xdelay=00:00:01, mailer=esmtp, pri=301178, relay=server2domain.com. [yy.yy.yy.yy], dsn=4.0.0, stat=Deferred: Connection refused by server2domain.com.
There is no message logged on server2.
I think without the two lines, sendmail on server1 will try to connect the server2 via port 25, not the port 465 that sendmail is listening.
sendmail and OUTGOING smtps (465) connections
smtps (465) starts SSL session before any SMTP level communications. AFAIR sendmail does not support it natively for outgoing connections.
Remove the following two lines, recompile your sendmail.mc into sendmail.cf, restart or (send signal) HUP your sendmail daemon.
define(`RELAY_MAILER_ARGS', `TCP $h 465')
define(`ESMTP_MAILER_ARGS', `TCP $h 465')

logstash-forwarder json invalid character

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.

Wampserver icon not going green fully, mysql services not starting up?

I'm running an application on localhost, it's been running successfully for at least a year now, but suddenly today wampserver isn't starting up. Whenever I rightclick on the taskbar icon and "start all services", it gets orange, but never green. Yesterday there was a data loss problem because one of the mysql tables crashed and had to be repaired, if that's related to this in any way.
If I try http://localhost/phpmyadmin, I get a 403 Forbidden error, which I never got before.
I checked the apache log today and its latest entries are:
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP 2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:25, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in D:\\wamp\\www\\zeejflow\\index_exe.php on line 25, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:31 2013] [error] [client 127.0.0.1] PHP 2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:25, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: [2002] No connection could be made because the target machine actively (trying to connect via tcp://localhost:3306) in D:\\wamp\\www\\zeejflow\\index_exe.php on line 26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: No connection could be made because the target machine actively refused it.\r\n in D:\\wamp\\www\\zeejflow\\index_exe.php on line 26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in D:\\wamp\\www\\zeejflow\\index_exe.php on line 26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:32 2013] [error] [client 127.0.0.1] PHP 2. mysql_real_escape_string() D:\\wamp\\www\\zeejflow\\index_exe.php:26, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP Warning: mysql_num_rows() expects parameter 1 to be resource, integer given in D:\\wamp\\www\\zeejflow\\index_exe.php on line 34, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\wamp\\www\\zeejflow\\index_exe.php:0, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] [client 127.0.0.1] PHP 2. mysql_num_rows() D:\\wamp\\www\\zeejflow\\index_exe.php:34, referer: http://localhost/zeejflow/index.php
[Sat Jul 20 14:17:33 2013] [error] an unknown filter was not added: DEFLATE
[Sat Jul 20 14:17:33 2013] [error] an unknown filter was not added: DEFLATE
[Sat Jul 20 14:17:33 2013] [error] an unknown filter was not added: DEFLATE
Lines 25 and 26 on index_exe.php are simply as below (I was trying to log in to the application):
$userName = mysql_real_escape_string($_POST['userName']);
$Password = mysql_real_escape_string($_POST['Password']);
Because of the [2002] No connection could be made because the target machine actively (trying to connect via tcp://localhost:3306 error, I figured maybe there's a problem with some other application using the same port, so I tried the following (my wamp is running on D:) :
C:\Users\admin>netstat
Active Connections
Proto Local Address Foreign Address State
TCP 127.0.0.1:5939 localhost127:49313 ESTABLISHED
TCP 127.0.0.1:5939 localhost127:49317 ESTABLISHED
TCP 127.0.0.1:49155 localhost127:49156 ESTABLISHED
TCP 127.0.0.1:49156 localhost127:49155 ESTABLISHED
TCP 127.0.0.1:49157 localhost127:49158 ESTABLISHED
TCP 127.0.0.1:49158 localhost127:49157 ESTABLISHED
TCP 127.0.0.1:49311 localhost127:49312 ESTABLISHED
TCP 127.0.0.1:49312 localhost127:49311 ESTABLISHED
TCP 127.0.0.1:49313 localhost127:5939 ESTABLISHED
TCP 127.0.0.1:49315 localhost127:49316 ESTABLISHED
TCP 127.0.0.1:49316 localhost127:49315 ESTABLISHED
TCP 127.0.0.1:49317 localhost127:5939 ESTABLISHED
TCP 127.0.0.1:49320 localhost127:49321 ESTABLISHED
TCP 127.0.0.1:49321 localhost127:49320 ESTABLISHED
TCP 192.168.15.200:49166 server6201:5938 ESTABLISHED
TCP 192.168.15.200:49847 Server-PC:netbios-ssn TIME_WAIT
TCP 192.168.15.200:49848 Server-PC:netbios-ssn TIME_WAIT
D:\>netstat
Active Connections
Proto Local Address Foreign Address State
TCP 127.0.0.1:80 localhost127:49799 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49800 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49801 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49802 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49803 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49804 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49806 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49810 TIME_WAIT
TCP 127.0.0.1:80 localhost127:49811 TIME_WAIT
TCP 127.0.0.1:5939 localhost127:49313 ESTABLISHED
TCP 127.0.0.1:5939 localhost127:49317 ESTABLISHED
TCP 127.0.0.1:49155 localhost127:49156 ESTABLISHED
TCP 127.0.0.1:49156 localhost127:49155 ESTABLISHED
TCP 127.0.0.1:49157 localhost127:49158 ESTABLISHED
TCP 127.0.0.1:49158 localhost127:49157 ESTABLISHED
TCP 127.0.0.1:49311 localhost127:49312 ESTABLISHED
TCP 127.0.0.1:49312 localhost127:49311 ESTABLISHED
TCP 127.0.0.1:49313 localhost127:5939 ESTABLISHED
TCP 127.0.0.1:49315 localhost127:49316 ESTABLISHED
TCP 127.0.0.1:49316 localhost127:49315 ESTABLISHED
TCP 127.0.0.1:49317 localhost127:5939 ESTABLISHED
TCP 127.0.0.1:49320 localhost127:49321 ESTABLISHED
TCP 127.0.0.1:49321 localhost127:49320 ESTABLISHED
TCP 192.168.15.200:49166 server6201:5938 ESTABLISHED
TCP 192.168.15.200:49805 mrs02s05-in-f4:http ESTABLISHED
But now I don't know what to make of this. I made sure my.ini had specified port 3306, and it had (anyway noone changed it in a year how could it suddenly have another value). Any help please! I think Apache is working because when I type in http://localhost, it works and gives the option to go to phpmyadmin or my application folder, but it appears mysql services aren't starting up or something? I confirmed with the admin and no new software (such as Skype) have been installed or anything.
Update
I went to Services.msc and checked wampapache, the status was "started".
But wampmysqld had no status. So I right-clicked and chose "Start".
A message said "Windows is attempting to start the service on the local computer", but then I got this error:
Windows could not start the wampmysqld service on Local Computer
Error 1067: The process terminated unexpectedly
What on earth is up? :(
Update 2
I got the mysql working again, here:
mysqld working but wampmysqld not starting up
HowEVER, localhost://phpmyadmin still gives me a 403 forbidden error, and mysql_connect keeps giving me an "Access denied" error.
Go to: wamp\bin\mysql\mysql5.6.17\data and delete the following:
auto.cnf, xxxxxxxxx.err, xxxxxxxxx.pid, ib_logfile0 and ib_logfile1
leave other file as it is.
if it is skype that is occupying your port 80 then go to skype: tools>option and in advance>connection uncheck "use port 80 and 443......"
This happened to me today. Since I had not changed my system setting since yesterday, I assumed it's predominantly a mysql issue on the system. I managed to fix it in the following way.
Open wampserver's mysql log file. This will contain information on why the service threw and error and exited prematurely.
In my case, the mysql service failed to start because it could not read a certain tablespace. The specific tablespace was indicated in the log.
Failure to read such a file could be because of file permissions or the file being broken. In such a case, mysql stops executing in order to avoid damaging a tablespace file that may be linked to a database you need. Usually, if you have a backup of the database, then it is safe to simply delete this problematic file and restore the database once your mysql service is started again.
If you do not have a database backup then you could force the mysql instance to run a recovery by enabling the option in your my.cnf / my.ini file.
innodb_force_recovery = 1
This forces the instance to run the crash recovery.
NOTE: installing a new instance of mysql does not necessarily mean that your databases shall be retained. I suggest you run a nightly backup of your databases if you are working on huge projects.
I had the same issue, to resolve it I added the following line to my.ini
innodb_force_recovery = 1
I was running Wamp Server for more than a year,
Now I faced a problem that I couldn't start Wamp server (The icon just stay red and the error message appear)
I managed to uninstall Wamp and reinstall it again, and so I did, but before that I copied the folder from mysql/data to my desktop then when I reinstall it I copied that files to the original location.
Then mysql just got confused... And phpmyadmin is not working so I fixed that by restoring the fresh install folder contents..
But I couldn't start mysql (the wamp servers icon still on yellow)
So after I googled a lot, I deleted every thing in the mysql/data except for:-
mysql
test
performance_schema
And my problem solved :)
I had this same problem...
WampServer has been running fine since Feb on my local dev server. Today I couldn't get it to run.
Off to google where I found this page and found no answers until I saw the last entry:
"1.Run WampServer: Apache->service->test port 80.
2.Find out application which occupation port 80(e.g. skype)"
So did and it returned that Skype was possibly blocking port 80.
Turned off Skype and the problem was solved.
I had the same problem. Mysql didn't start.
go to services.
right click the wampmysqld go to properties.
startup type select manual.
right click and click start service.
worked for me.
-Go to Task Manger
-End all task instances of mysql
-restart your wampserver
For me, adding innodb_force_recovery=3 to my.ini solved the issue
Another option is removing ibdata files and all ib_logfile from the data directory , as explained in MySQL docs here. However this will cause any innoDB tables not to work(because the some information stored in ibdata1)
You may want to reset data from MySQL
delete previous data from C:\wamp\bin\mysql\mysql5.6.17\data
restart service
Delete everything from this file.
C:\wamp\bin\mysql\mysql5.1.36\data\mysql-bin.index
Restart mysql server and it should work.
I opened up services.msc from the command prompt and disabled SQL Server reporting services
& SQL Server analysis services. These services were using port 80.
Then I restarted WAMP Server and it started working properly as before.
I have uninstalled the WampServer completelly, and deleted all files in /wamp folder, except www. This folder is preserved when uninstalling. After that I've installed it again and it works fine.
Important: This is helpful only in case when you already have your database backed up. All data from the database will be wiped out this way.
Delete everything from this file.
C:\wamp\bin\mysql\mysql5.1.36\data\mysql-bin.index
It works for me. My wamp server has turned green. Tnx a lot
Click on wamp (Yellow) icon
Go Apache-> Service-> Test port 80. If port is available to use
then go to Apache->Service-> Install Service
then click on Restart All Services.
Have you tried just changing the port number of MySQL and see if it works?
Right click your WAMP icon
Choose MySQL, in the menu choose "Use a port other than 3306"
Change port number to be "3307"
I've got a very similar problem, after a lot trying even the solutions in this question I concluded with THIS OTHER ANSWER.
I didn't replicated it here because it is NOT A CORRECT THING TO DO.
Basically is about re-installing MySQL (or the entire package) being sure to delete very well the old my-sql-data very well (back it up if you might need it) and stick on using 32 bit versions.
simplest this to do is find what other service is using the same service id as mysql does in windows.
When i looked through the list of services running on my pc (even after a restart...i still had the problem)
I quickly realised i had webmatrix installed on my computer previous to wamp server...webmatrix installed its own copy of mysql and set it to automatically startup another instance each time i logged in.
As soon as the other instance of mysql associated with web matrix was stopped (and changed from automatic startup to manual) my problem with WAMP mysql was solved.
I was running on the same problem, wampmysqld64 did not start, so I checked the Mysql log which you should find it inside the main wamp64 folder, and I found all the details on why is not working. on my computer I found another mysql instance is running so it prevents the wampmysqld64 to start. I stopped the other instance, and everything works fine after.
I have solved my problem just by following below steps:
On windows platform press WINDOWS + R
Put services.msc and press OK
Stop already running MySQL and
Go to Wamp and start/resume MySQL service
All the best
Click on wampserver icon then -> Apache -> httpd.conf -> search listen here you will find port number like this #Listen 12.34.56.78:80
Listen 80 change this port number with any other number like Listen 12.34.56.78:81 save this and now restart all servers it gets green to orange.
I had the same probelm for the past 3 days. Try this. It will definitely work.
BEFORE proceeding with the installation of Wampserver, you must ensure that certain elements are installed on your system, otherwise Wampserver will absolutely not run, and in addition, the installation will be faulty and you will need to remove Wampserver BEFORE installing the elements that were missing.
Uninstall wamp and download and Install microsoft visual c++ redistributable 2008 (https://www.microsoft.com/en-in/download/details.aspx?id=29), microsoft visual c++ redistributable 2012 (https://www.microsoft.com/en-in/download/details.aspx?id=30679), microsoft visual c++ redistributable 2015 (https://www.microsoft.com/en-in/download/details.aspx?id=48145). Now, reinstall wamp and it should work fine.
Wow.. This works for me. Unistall the wamp server
Make sure this dependencies are successfully installed Microsoft Visual C++ Redistributable Packages vcredist_Allversions(x32 orx64) depending on your OS.
Reinstall the wamp server and you are good to go. Thank you
Run WampServer: Apache->service->test port 80.
Find out what application which occupies the port 80(e.g. skype)
Shut down and restarts WampServer.
Basically this happens when you have not installed pre required software installed on your machine while installing Wampserver you might have got error bellow error at the time of installation.
program can't start because msvcr120.dll is missing OR
program can't start because msvcr120.dll is missing
If you fixed those issue after the installation of wampserver then you might get stuck at this problem.
Then You can simply uninstall and install wamp server again
And If you have not install pre required dependency then first of all uninstall wampserver . And then install pre requirement first and then finally you can install Wampserver and it should work now.
you can download Pre-required applications from following link
For x64 Machines
microsoft visual c++ 2010 redistributable package (x64) https://www.microsoft.com/en-in/download/details.aspx?id=14632
Visual C++ Redistributable for Visual Studio 2012 Update 4 https://www.microsoft.com/en-in/download/details.aspx?id=30679
Visual C++ Redistributable Packages for Visual Studio 2013 https://www.microsoft.com/en-in/download/details.aspx?id=40784
Visual C++ Redistributable for Visual Studio 2015
https://www.microsoft.com/en-in/download/details.aspx?id=48145
For x86 Machines
Microsoft Visual C++ 2010 Redistributable Package (x86)
https://www.microsoft.com/en-in/download/details.aspx?id=14632
Visual C++ Redistributable for Visual Studio 2012 Update 4 https://www.microsoft.com/en-in/download/details.aspx?id=30679
Visual C++ Redistributable Packages for Visual Studio 2013 https://www.microsoft.com/en-in/download/details.aspx?id=40784
Visual C++ Redistributable for Visual Studio 2015
https://www.microsoft.com/en-in/download/details.aspx?id=48145
Note:- Take backup of your project files before uninstall
My problem was that wampmysqld64 service was disabled, so I went to:
task manager > services > right click on wampmysqld64 and then properties, another window is gonna open, look for wampmysqld64 service then right click and then click on properties and a window is gonna pop up:
On "Startup type" just change it from disabled to automatic, then go back click on the service and run it and that's it wamp logo it's gonna turn green.