ejabberd localhost the connection was interrupted but logs say connection was accepted - xmpp

Good day
I'm completely new to ejabber. I have installed ejabber on debian (on virtual machine) but when I tried to check it with localhost (http://localhost:5280/admin) mozilla responded with the announcement "the connection was interrupted". I checked logs of ejabber and it had multiple lines of accepting connection on port 5280.
2018-06-02 14:27:50.526 [info] <0.491.0>#ejabberd_listener:accept:333 (#Port<0.12507>) Accepted connection ::1:32948 -> ::1:5280
2018-06-02 14:27:50.534 [info] <0.635.0>#ejabberd_http:init:163 started: {fast_tls,{tlssock,#Port<0.12507>,#Port<0.12508>}}
What is the reason of it and how could I get past this issue?

You have configured ejabberd to use TLS on port 5280 (see: tlssock in your logs), but you are using plain HTTP when trying to connect to it (http://localhost:5280).
You should use HTTPS to connect to it, assuming your cert is properly configured in ejabberd.

Related

unable to connect to openfire server with external ip

I'm trying to connect to openfire server using spark. I have dynamic dns, made port forwarding on port 5222 in d-link router. When i'm logging with host name as private ip for example "192.168.0.101" - connection is established, but when i'm setting my domain (pizokas.hopto.org) as host name i get the following error
Unknown connection error. Please review logs for the following information.
But there are no logs in openfire server, so i assume packets are dropped in router. I have firewall turned off. At this point i can't find information why the connection cannot be established. I'm using my own laptop as server and as a client, os win 10. Maybe somebody had similar issue?
The connection was established when i was trying to connect to server from outside of lan

Connection to ejabberd

I am currently having an issue with my ejabberd server I've set up recently: Any client is unable to connect to the server. Whether it is Psi or a sample code from the net, all produce an error when it comes to connecting, even though both is located on my computer, so no network issues can be the reason.
I have so far tried to bind the listener to a different port, and also checked the values in the ejabberd.yml. However, I was not able to find a sulution for my problem.
The service log of the server was not conspicious either:
2015-12-28 18:16:29.923 [info] <0.7.0> Application oauth2 started on node ejabberd#localhost
2015-12-28 18:16:29.938 [info] <0.449.0>#ejabberd_listener:listen_tcp:189 Reusing listening port for {5222,{0,0,0,0},tcp}
2015-12-28 18:16:29.938 [info] <0.450.0>#ejabberd_listener:listen_tcp:189 Reusing listening port for {5269,{0,0,0,0},tcp}
2015-12-28 18:16:29.938 [info] <0.451.0>#ejabberd_listener:listen_tcp:189 Reusing listening port for {5280,{0,0,0,0},tcp}
2015-12-28 18:16:29.938 [info] <0.37.0>#ejabberd_app:start:75 ejabberd 15.11 is started in the node ejabberd#localhost
2015-12-28 18:16:29.938 [info] <0.7.0> Application ejabberd started on node ejabberd#localhost
Did I do something wrong when entering the parameters? Or is this a problem of configuration? My first idea was that my anti-virus avast might be blocking some of the traffic, but i couldn't find anything on the web about that.
Attached you can find screenshots of psi and the server-ui.
The host name is pc-michi
With this link you can view my .yml file:
http://workupload.com/file/rQoLIf4Y
Could you please tell me what goes wrong here?
Thanks in advance :)
It looks like basic networking configuration issue. Psi client is not able to connect to the server. There may be multiple reasons:
Firewall blocking port.
Name of the machine you use to connect to cannot be resolve to proper IP address.
You should try connecting on that host on port 5222 from command-line, for example with telnet to check that you can open a TCP socket properly.

Error code 503 com.microsoft.sqlserver.jdbc.sqlserverexception the tcp/ip connection to host failed

Developed a SUP HWC application that will fetch data from SQL server 2005 using stored procedure.
Application deployed successfully to the server.And I'm able to view the application from my iPhone simulator.But, when I'm trying to retrieve the data on click of a menu,getting following error.
"Error code 503 com.microsoft.sqlserver.jdbc.sqlserverexception the tcp/ip connection to host failed"
I changed my settings as per this:
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed
But, still getting same error.Please help.Thanks.
Note: I have virtual MAC(where iPhone simulator is running) on my windows 7 PC.
Well, My problem got solved...As I was in client VPN, I got a different IP address.Now, I mapped to client VPN generated IP address and its working like a champ... :)

RhodeCode - What is blocking my connection?

All connection attempts on RhodeCode on CentOS 6.3 are refused except from localhost.
Note that iptables is not running, and I am only trying to visit the web interface.
I have googled the exact error message below and looked around SO. I have yet to find a solution.
abort: error: No connection could be made because the target machine actively refused it
If the firewall is down, and I am not trying to modify any repository, what else is preventing me from connecting? EDIT: See #5 below. Not sure how to address it yet.
Things tried and other info
Using localhost, 127.0.0.1 and hostname in production.ini
service iptables stop
Connected over HTTP successfully. In other words, connections are accepted outside RhodeCode.
Made sure no authentication methods were enabled or configured in production.ini
Although the server accepts connections on localhost, netstat -l does not show that port 5000 is listening. Port 5000 is set in production.ini and ps uax | grep paster confirms the server is running. No other software tries to grab port 5000.
Ok, apparently I have been misunderstanding the host configuration. I was running on the assumption that host should be set to 127.0.0.1 or localhost in production.ini for RhodeCode to know what host to look for for another service. This was a faulty presumption on my part, since I am used to pointing web applications to local systems to look for databases.
It turns out that host binds the application to a specific address for access, meaning that it RhodeCode was supposed to only respond to local requests, regardless of what other system policies say. The setup docs did not make this clear because it did not specify that external connections would be refused. All it said was:
This command [paster serve] runs the RhodeCode server. The web app should be available at the 127.0.0.1:5000. This ip and port is configurable via the production.ini file created in previous step
The problem was fixed by binding RhodeCode to 0.0.0.0, which opened it to outside connections. Kudos to Ɓukasz Balcerzak for pointing this out in the RC support google group.

Jenkins cannot find smtp.gmail.com

I am running Jenkins on RHEL6 in a tomcat container. My computer is behind my company proxy, which I have defined in the Plugins configuration tab. I can download plugins so that works (at least for port 8080, that is).
I am now trying to configure an SMTP server. I am trying with my localhost SMTP server but cannot get it to work, so I decided to debug first using something that should work (gmail). I have set SMTP server to "smtp.gmail.com" and port "465". I have tried with ports 25, 587 too. I get response:
javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
nested exception is:
java.net.UnknownHostException: smtp.gmail.com
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1932)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
What could be wrong?
Java Mail does not support the use of HTTP Proxies; http://www.oracle.com/technetwork/java/faq-135477.html#proxy
However;
If your proxy server supports the SOCKS V4 or V5 protocol
(http://www.socks.nec.com/aboutsocks.html, RFC1928) and allows
anonymous connections, and you're using JDK 1.5 or newer and JavaMail
1.4.5 or newer, you can configure a SOCKS proxy on a per-session, per-protocol basis by setting the "mail.smtp.socks.host" property as
described in the javadocs for the com.sun.mail.smtp package. Similar
properties exist for the "imap" and "pop3" protocols.
As an alternative, you could setup an MTA on the local machine such as postfix or sendmail which will accept connections on localhost and may be more configurable than Java to punch through the proxy configuration.
Note: If you company blocks connections on non-http ports (eg anything apart from 80, 8080, 443) then you may need to find another solution, perhaps getting some support from your local system administrators.
Also; If you want to be clever, you can setup a (Temporary) socks proxy using ssh with the following command;
ssh -D 9090 <remoteserver>
This assumes that the remoteserver has unrestricted access, and you can point connecting clients that can cope with SOCKS to localhost : 9090.
This happens because of Gmail security...
just allow access to your gmail account via apps go to under your account:
https://www.google.com/settings/security/lesssecureapps
and it will work .. smtp.gmail.com is correct.No need to change it.
Also don't forget to check internet connection as well.