respawn java process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I run a small java program called jredirect for forwarding a port. The
problem is after a while the process halts. I don't know why and there
aren't a lot of options, such as logging. 

It's run like this:
/usr/java/j2re1.4.2_03/bin/java -cp /usr/java/jredirect/jredirect.jar jredirect.Main --poolsize 50 host_ip:src_port-dst_ip:dst_port

So to forward 443 to a nonstandard port you could do:
/usr/java/j2re1.4.2_03/bin/java -cp /usr/java/jredirect/jredirect.jar jredirect.Main --poolsize 50 192.168.1.30:443-192.168.1.40:445

How could I set this up to respawn of the process goes away? 
AND
How quickly does something respawn? 


I've also tried to get port forwarding working with iptables, figuring
it would be more stable, but I could not get it to work. Even if I open
iptables wide open it doesn't work for me. Here are the commands I've
tried:

/sbin/iptables -t nat -A PREROUTING -p tcp -d 192.168.1.30 --dport 443 -j DNAT --to 192.168.1.40:445
/sbin/iptables -A FORWARD -p tcp -d 192.168.1.30 --dport 443 -j ACCEPT


The examples of forwarding I've seen usually include -i plus the
interface, like -i eth0. I do not have this in there because the address
I need it associated to is a virtual, so it's eth0:2 for example. After
running the commands above I can run iptables -L and it looks ok. 

Any suggestions or recommendations are appreciated. 

Thanks,
James

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux