thunderbird cannot login to apache james - apache

So far as I can tell, Apache James is running correctly:
root#dur:~/apache-james-3.0-beta4.derby#
root#dur:~/apache-james-3.0-beta4.derby# bin/james-cli.sh -h localhost listdomainslocalhost
127.0.1.1
127.0.0.1
127.0.1.1
listdomains command executed sucessfully in 262 ms.
root#dur:~/apache-james-3.0-beta4.derby#
root#dur:~/apache-james-3.0-beta4.derby# bin/james-cli.sh -h localhost listusersa#localhost
b#localhost
thufir#localhost
listusers command executed sucessfully in 277 ms.
root#dur:~/apache-james-3.0-beta4.derby#
root#dur:~/apache-james-3.0-beta4.derby# telnet localhost 143 -l thufir#localhost
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK JAMES IMAP4rev1 Server Server dur.bounceme.net is ready.
login
* BYE Unknown command.
Connection closed by foreign host.
root#dur:~/apache-james-3.0-beta4.derby#
So, I'm trying to login with tomcat:
Of course, that fails. Here's how the account was setup:
Should the server names be prepended with imap and smtp? Why won't thunderbird login? (Yes, I'm using the correct password.)
If this would be better to troubleshoot with Java, I can do that, but it seemed prudent to start with thunderbird.
James shows the login attempts as:
root#dur:~/apache-james-3.0-beta4.derby#
root#dur:~/apache-james-3.0-beta4.derby# tail log/james-server.log
INFO 03:38:56,180 | james.imapserver | ID=10307467 Connection closed for 127.0.0.1
INFO 03:39:42,277 | james.imapserver | ID=18745390 Connection established from 127.0.0.1
INFO 03:40:16,779 | james.imapserver | ID=18745390 Too many authentication failures. Closing connection.
INFO 03:40:16,801 | james.imapserver | ID=18745390 Connection closed for 127.0.0.1
INFO 03:40:16,854 | james.imapserver | ID=18407750 Connection established from 127.0.0.1
INFO 03:40:20,028 | james.imapserver | ID=18407750 Connection closed for 127.0.0.1
INFO 03:42:04,682 | james.imapserver | ID=295845 Connection established from 127.0.0.1
INFO 03:42:14,286 | james.imapserver | ID=295845 Connection closed for 127.0.0.1
INFO 03:48:17,081 | james.imapserver | ID=9571677 Connection established from 127.0.0.1
INFO 03:48:17,143 | james.imapserver | ID=9571677 Connection closed for 127.0.0.1
root#dur:~/apache-james-3.0-beta4.derby#

Your server name should be as is, without any prefixes. It would be best to put there real server name. In your case "dur.bounceme.net".
Or you can play with "hosts" file and assign an alias to your server (i.e. you can add smtp and imap, or just mail prefixes to an alias of the server if you like). For a linux machine you can find it in /etc/hosts and add e.g.:
127.0.0.1 imap.localhost
127.0.0.1 smtp.localhost
or:
<server's IP> <server alias>
This way you can have two additional aliases for the same machine if you would like that, but it is not needed.

Related

RedisInsights unable to connect to redis cluster

I am trying to connect my RedisInsightsv2 client to a cluster of redis instances.
When the redis instance hasn't joined the cluster yet, redisinsights is able to make a connection.
After the cluster is created however, new connections from the GUI, just fail.
I have 3 shards with 1 replica each:
redis-cli -h 10.9.9.4 -p 7001 --cluster create 10.9.9.4:7001 10.9.9.5:7002 10.9.9.6:7003 10.9.9.4:7004 10.9.9.5:7005 10.9.9.6:7006 --cluster-replicas 1 -a Password
The cluster gets successfully created with the right shards and everything.
I can even verify using the CLUSTER NODES command
root ➜ ~ $ redis-cli -h 10.9.9.4 -p 7004 -a Password
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
10.9.9.4:7004> CLUSTER NODES
5b77b776f0ed08b4f34b0fe3e48b609e4bd8400e 10.9.9.6:7003#17003 master - 0 1662318446553 3 connected 10923-16383
a42f44163b046273ca02b1fc99ed93cf6188f65e 10.9.9.5:7002#17002 master - 0 1662318446755 2 connected 5461-10922
d2b21a37b62283a6cfbd5fb436df505ddc31aea8 10.1.1.10:7001#17001 master - 0 1662318445549 1 connected 0-5460
2cd5783411ceea96b4006b596942cc49484884ab 10.9.9.5:7005#17005 slave d2b21a37b62283a6cfbd5fb436df505ddc31aea8 0 1662318445750 1 connected
61541ad0455539335f27d5a90a5a8e504b3dea5f 10.1.1.11:7004#17004 myself,slave 5b77b776f0ed08b4f34b0fe3e48b609e4bd8400e 0 1662318445000 3 connected
c00d264a625998e89becb9334a1f4ea9d2057a0d 10.9.9.6:7006#17006 slave a42f44163b046273ca02b1fc99ed93cf6188f65e 0 1662318445550 2 connected
10.9.9.4:7004>
However, when trying to connect to any of these in the UI I get the following errors:
9/4/2022, 12:03:31 PM | ERROR | TimeoutInterceptor | Request Timeout. GET /api/instance/9e253e74-0091-44b8-bf8c-29ff0f4f0275/connect | {"stack":[{}]}
9/4/2022, 12:03:41 PM | ERROR | TimeoutInterceptor | Request Timeout. GET /api/instance/9e253e74-0091-44b8-bf8c-29ff0f4f0275/connect | {"stack":[{}]}
OR
9/4/2022, 12:16:17 PM | ERROR | KeysBusinessService | Failed to get keys with details info. Connection is closed.. | {"stack":[{}]}
9/4/2022, 12:16:18 PM | ERROR | ExceptionsHandler | Connection is closed. | {"stack":[{}]}
9/4/2022, 12:16:23 PM | ERROR | ExceptionsHandler | Connection is closed. | {"stack":[{}]}
This is the redis.conf that I use for 10.9.9.5:
port 7002
loadmodule /opt/redis-stack/lib/redisearch.so
loadmodule /opt/redis-stack/lib/redisgraph.so
loadmodule /opt/redis-stack/lib/redistimeseries.so
loadmodule /opt/redis-stack/lib/rejson.so
loadmodule /opt/redis-stack/lib/redisbloom.so
cluster-enabled yes
cluster-config-file cluster-node-2.conf
cluster-node-timeout 5000
dbfilename dump-2.rdb
maxmemory 1862mb
maxmemory-policy allkeys-lru
requirepass Password
masterauth Password
I've done a bunch of googling but I'm not able to determine why this is failing. Any help is appreciated!
RedisInsight version: 2.8.0
Running on: Windows 11
Cluster is running on remote machines part of my local network i.e.
10.9.9.0/24
please specify additional information:
what is your OS
what is the version of RedisInsight? (2.8.0?)
where is your cluster running? (is it local? k8s? any SSH tunnels?)
Can you try and see if you are able to connect using this debug build: https://drive.google.com/file/d/1od2uClDKb0649ixkgyRwXfqj8QLr0GXw/view?usp=sharing
Also please check and comment the logs if it is not working

Cannot connect to local vhosts via cURL (error 7) while Apache, ping, etc. work

I'm desperate for help. I have spent almost a day now trying to figure out why cURL is suddently throwing curl: (7) Failed to connect to magento.localhost port 80: Connection refused on local vhosts after I restarted macOS High Sierra.
My setup worked without problems before – ping still works, opening the domain in the browser also works as expected. What is going on??
ping magento.localhost
PING magento.localhost (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.034 ms
host magento.localhost
magento.localhost has address 127.0.0.1
magento.localhost has IPv6 address ::1
scutil -r magento.localhost
Reachable
apachectl configtest
Syntax OK
netstat -a | grep http | grep LISTEN
tcp46 0 0 *.http . LISTEN
curl -v magento.localhost
Rebuilt URL to: magento.localhost/
Trying 127.0.0.1...
TCP_NODELAY set
Connection failed
connect to 127.0.0.1 port 80 failed: Connection refused
Failed to connect to magento.localhost port 80: Connection refused
Closing connection 0
curl: (7) Failed to connect to magento.localhost port 80: Connection refused
I have tried every suggestions I found! - thank you so much for your help!
Nic3500, you saved my life! After your comment I found out that my vhosts produced different results than localhost itself.
telnet magento.localhost 80
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection
refused telnet: Unable to connect to remote host
telnet localhost 80
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
So I have changed /usr/local/etc/dnsmasq.conf to address=/localhost/::1 and
/private/etc/resolver/localhost to nameserver ::1 and now cURL is working alongside with everything else.
Thank you very much!

Cant acces rabbitmq through the web interface?

I just installed rabbitmq on a 14 ubuntu, adjusted the hostname in the /etc/hosts files, in the following format 127.0.0.1 hostname.
I can see the web console with curl localhost:15672, but when I try to access it with the browser, it just won't open?
I can see the port with netstat:
netstat -nptl | grep 15672
tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 29997/beam
But I can't see it with nmap:
nmap -sT -O localhost
Starting Nmap 6.40 ( http://nmap.org ) at 2017-09-16 19:52 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00022s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
631/tcp open ipp
I also enabled the web interface in rabbitmq, made the user and all that, but when I try to access it through the browser http:/my-ip-address:15672(5672), the web page just times out?
Tnx,
Tom

~/.ssh/config deposited hosts not known

I a experiencing some trouble using ssh, which I can't figure out by myself.
My ~/.ssh/config file looks like this:
Host server
HostName xxx.xxx.xxx.xxx
User user
ForwardX11 yes
LocalForward 8000 127.0.0.1:8000
LocalForward 6080 127.0.0.1:6080
LocalForward 8022 192.168.122.100:22
LocalForward 7777 192.168.122.100:7777
Compression yes
ServerAliveInterval 5
ServerAliveCountMax 3
Manuel connect using ssh user#xxx.xxx.xxx.xxx works fine, yet ssh server does not because zsh "could not resolve hostname".
Do you have any ideas?
Does this problem occour because I use zsh?
Since the ssh gets called by a lot of bash scripts I am forced to use the config file.
Looks like "server" is not being resolved by DNS.
On the system you are sshing from, add something like this to /etc/hosts:
xxx.xxx.xxx.xxx server.domain.com server
Then try ssh again.

Cannot access remote application over my vpn

I am running a java application on a remote server that opens port 7462 for a telnet connection to issue simple commands. I have established a VPN connection (using openvpn) between my local machine and the remote server, but cannot telnet from my local machine to port 7462. The IP address of my vpn server is 10.8.0.1. I am also running postfix on my remote server and am able to telnet to port 25 without any issues. The following commands yield the below results:
On my local machine:
$ telnet 10.8.0.1 25
Trying 10.8.0.1...
Connected to 10.8.0.1.
Escape character is '^]'.
220 xxxxx.com ESMTP Postfix (Debian/GNU)
quit
221 2.0.0 Bye
Connection closed by foreign host.
$ telnet 10.8.0.1 7462
Trying 10.8.0.1...
Connected to 10.8.0.1.
Escape character is '^]'.
Connection closed by foreign host.
$
On the remote server:
$ netstat -plnt | grep -P "7462|25"
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN -
tcp 0 0 10.8.0.1:7462 0.0.0.0:* LISTEN 6463/java
tcp6 0 0 :::25 :::* LISTEN -
$ telnet 10.8.0.1 7462
Trying 10.8.0.1...
Connected to 10.8.0.1.
Escape character is '^]'.
exit
OK Goodbye
Connection closed by foreign host.
An iptables -L command on both the local and remote machine show that I have no firewall rules established and I have not specifically configured any routes.
I can't figure out why I can connect to the remote server's port 25 from my local machine, but not port 7462. From the remote server though I can connect to port 7462 using the 10.8.0.1 IP address. I'd be happy to provide any additional information and thanks in advance for you help
-Nathan
I figured out my problem. The application was limiting the IP addresses that could connect on the 7462 port and it was a configuration item that needed to be set (default was just localhost). I feel a little silly for such a simple answer, but thanks for the suggestions!
I figured out my problem. The application was limiting the IP addresses that could connect on the 7462 port and it was an (obscure) configuration item that needed to be set (default was just localhost). I feel a little silly for such a simple answer, but thanks for the suggestions!