AnsweredAssumed Answered

Linux Tomcat Alfresco.war email and CIFS issues

Question asked by craig@tobyhouse.com on Dec 10, 2007
Latest reply on Aug 11, 2009 by doiheartwentyone
Mostly working but it seems as though some problems that I can't resolve because user 'tomcat' simply doesn't have enough permissions.

*** Email ****
repository.properties is configured properly, I have to believe, and from the logs, that isn't my issue…when I try to send e-mail, catalina.out says…

11:44:51,787 ERROR [web.bean.TemplateMailHelperBean] Failed to send email to administrator@tobyhouse.com
org.springframework.mail.MailSendException; nested exceptions (0) are:
Caused by:
javax.mail.NoSuchProviderException: smtp
        at javax.mail.Session.getService(Session.java:764)
        at javax.mail.Session.getTransport(Session.java:689)
        at javax.mail.Session.getTransport(Session.java:632)
        at javax.mail.Session.getTransport(Session.java:612)
        at org.springframework.mail.javamail.JavaMailSenderImpl.getTransport(JavaMailSenderImpl.java:421)
        at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:381)

That's enough log, I'm sure that someone will get the idea.

**** CIFS ****
I can't seem to map iptables to adjust for the higher/untypical ports of SMB server configuration.

This is my SMB configuration from file-servers.xml (comments removed)

      <broadcast>192.168.3.255</broadcast>
      <bindto>192.168.3.8</bindto>
      <netBIOSSMB platforms="linux,solaris,macosx"/>
      <tcpipSMB platforms="linux,solaris,macosx"/>
      <netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,solaris,macosx"/>
      <tcpipSMB port="1445" platforms="linux,solaris,macosx"/>

and this is where I'm at with iptables now…

#!/bin/sh
#
echo 1 > /proc/sys/net/ipv4/ip_forward
modprobe iptable_nat
iptables -F
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

iptables -t nat -A PREROUTING -p tcp -d 192.168.3.8 –dport 445 \
-j REDIRECT –to-ports 1445
iptables -t nat -A PREROUTING -p tcp -d 192.168.3.8 –dport 139 \
-j REDIRECT –to-ports 1139
iptables -t nat -A PREROUTING -p udp -d 192.168.3.8 –dport 137 \
-j REDIRECT –to-ports 1137
iptables -t nat -A PREROUTING -p udp -d 192.168.3.8 –dport 138 \
-j REDIRECT –to-ports 1138

iptables -t nat -A OUTPUT -p tcp -d 192.168.3.8 –dport 445 \
-j REDIRECT –to-ports 1445
iptables -t nat -A OUTPUT -p tcp -d 192.168.3.8 –dport 139 \
-j REDIRECT –to-ports 1139
iptables -t nat -A OUTPUT -p udp -d 192.168.3.8 –dport 138 \
-j REDIRECT –to-ports 1138
iptables -t nat -A OUTPUT -p udp -d 192.168.3.8 –dport 137 -\
j REDIRECT –to-ports 1137

but the redirection doesn't help…

# smbclient -L 192.168.3.8
Error connecting to 192.168.3.8 (Connection refused)
Connection to 192.168.3.8 failed

# smbclient -L 192.168.3.8 -p 139
Error connecting to 192.168.3.8 (Connection refused)
Connection to 192.168.3.8 failed

# smbclient -L 192.168.3.8 -p 1445
session request to 192.168.3.8 failed (RAP code 32)
session request to 192 failed (RAP code 32)
session request to *SMBSERVER failed (RAP code 32)

# smbclient -L 192.168.3.8 -p 1139
Password:
Anonymous login successful
Domain=[TH] OS=[Java] Server=[Alfresco CIFS Server 3.5.1]

        Sharename       Type      Comment
        ———       —-      ——-
cli_rpc_pipe_open_noauth: rpc_pipe_bind for pipe \srvsvc failed with error NT_STATUS_BUFFER_TOO_SMALL
        Alfresco        Disk
        IPC$            IPC
Error connecting to 192.168.3.8 (Connection refused)
Connection to 192.168.3.8 failed
NetBIOS over TCP disabled – no workgroup available

How do I fix these issues?

Outcomes