Search Results

Search found 10169 results on 407 pages for 'port'.

Page 26/407 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Trunking at Router Port

    - by singh
    After reading a bit about interVLAN routing got a doubt regarding how trunking takes place at router and at switch.In case of switch we configure a port interface as trunk port and say all vlan's are allowed here but in case of router we configure sub interface as trunk saying particular vlan belongs to particular subinterface .Can't we configure only a single port interface on router just like Switch and say all vlan's are allowed here on this interface ,why to go for sub interfaces? Hope I'm able to put my question in right way.

    Read the article

  • identify a router that cuts certain port

    - by Sergiks
    Is there a way to identify which particular router between me and some server blocks connections on certain port? I am in a hotel in Thailand, where they have recently changed some settings in their equipment, and now I cannot reach any of my servers in Europe and USA by SSH / port 22. More traditional ports like 80 or 21 are open. traceroute command shows each particular router in the middle. But is there a way to identify one that filters out port 22?

    Read the article

  • Iptables - Open Port Only for one Server IP (allow connections from a specific range)

    - by user1015314
    My server has multiple IPs, 1.1.1.1 1.1.1.2 and i have a service which listens to a port e.g. 88 Now i want, when somebody from outside, wants to connect to the port, that he can only connect, to that port, if he connects to the ip 1.1.1.2:88 but if he tries to connect to 1.1.1.1:88 it should not react and it should look like that it dont exists and drops all connections. Ok, than i need for 1.1.1.2:88 that only allows a specific ip range outside connecters. for example only 9.*.*.* can connect to that port and ip. I'm using Centos. Thank you for your help.

    Read the article

  • Redirect with iptables if destination port is not listened

    - by PoltoS
    I've a server listening on port 10000. But this server is running only in a special case (then some third service is available). Otherwise the port is not listened. Is it possible to redirect the client to another port if 10000 is not listening? I see two solutions: 1) insert/remove iptables rules on server start/stop, but since the server may be killed, it may not insert the correct iptable redirect rule before dieing. 2) make a permanent userspace rule that checks if the port is listening and redirects the packet if not listened. How to do 2) ? Do someone have recipes for ipq? May be someone can suggest me a better way? It is something like fallback redirect: I'll have thousand of clients with different ports (10000-11000) and if their instance of server is not running, whey should be redirected to some page explaining why they don't have and instance connected.

    Read the article

  • Can not open port 3306 on Ubuntu using iptables

    - by user94626
    I am trying to open port 3306 (for remote mysql connections) on my ubuntu 12.04 server machine but for the life of me can't get the damned thing to work! Here is what I did: 1) list current firewall rules: $> sudo iptables -nL -v output: Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 225 16984 fail2ban-ssh tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22 220 69605 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0 0 0 REJECT all -- lo * 0.0.0.0/0 127.0.0.0/8 reject-with icmp-port-unreachable 486 54824 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 19 988 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 1 52 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8 4 208 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 5/min burst 5 LOG flags 0 level 7 prefix "iptables denied: " 4 208 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 735 182K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 Chain fail2ban-ssh (1 references) pkts bytes target prot opt in out source destination 225 16984 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 2) try to connect from remote machine: $> mysql -u root -p -h x.x.x.x output: timeout.... failed to connect 3) try to add a new rule to iptables: iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT 4) make sure the new rule is added: $> sudo iptables -nL -v output: Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 359 25972 fail2ban-ssh tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22 251 78665 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0 0 0 REJECT all -- lo * 0.0.0.0/0 127.0.0.0/8 reject-with icmp-port-unreachable 628 64420 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 1 60 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 19 988 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 1 52 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8 5 260 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 5/min burst 5 LOG flags 0 level 7 prefix "iptables denied: " 5 260 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable 0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306 Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination 919 213K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 Chain fail2ban-ssh (1 references) pkts bytes target prot opt in out source destination 359 25972 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 which appears to be the case (last line in "Chain INPUT" section). 5) try to connect again from remote machine: $> mysql -u root -p -h x.x.x.x output: timeout.... failed to connect which is failing again. 6) try to flush all rules: $> sudo iptables -F 7) this time I CAN CONNECT. 8) reboot server and try to connect, FAILURE. I suspect since the new rule is being appended at the end it will have no effect as there appears to be a "reject all" sort of rule before it. If this is the case, how to make sure the new rule is added in the right order? Otherwise, what am I missing? Please help.

    Read the article

  • how to monitor traffic at port 53 (DNS)

    - by Registered User
    I am a bit confused with the abundant tcpdump tutorials on internet. I am having a few of the virtual machines running on a virtualization server.Where I am debugging a problem.Port 53 is the one in problem. I have a bridged setup where out of 4 LAN cards on the machine in question one is active and it is xen-br0 I want to check if there is any request coming on port 53 on the server by other machines on LAN in question. I also want to see if the guest operating systems on LAN or any other machine is sending traffic at port 53.Due to abundant messages being generated via tcpdump I am finding it difficult to grep the output at desired port. So how can I use it if some one can give an example that would be helpful. Thanks in advance.

    Read the article

  • USB 3.0 port with USB 3.0 device in Ubuntu 12.10

    - by fernando garcía
    When I try to connect a USB 3.0 device in Ubuntu 12.10 (ASUS K55VD, kernel 3.5.0-19-generic #30-Ubuntu SMP), the system says [ 74.747832] hub 3-0:1.0: unable to enumerate USB device on port 1 [ 74.931957] usb 4-1: new SuperSpeed USB device number 2 using xhci_hcd [ 74.949390] usb 4-1: New USB device found, idVendor=05e3, idProduct=0731 [ 74.949396] usb 4-1: New USB device strings: Mfr=0, Product=1, SerialNumber=2 [ 74.949400] usb 4-1: Product: USB Storage [ 74.949403] usb 4-1: SerialNumber: 0000000000000033 [ 75.033327] usbcore: registered new interface driver uas [ 75.038548] Initializing USB Mass Storage driver... [ 75.038651] scsi7 : usb-storage 4-1:1.0 [ 75.038700] usbcore: registered new interface driver usb-storage [ 75.038701] USB Mass Storage support registered. but it does not recognize the device, and the disks applications (gparted, nautilus) act as if nothing had been connected. I have checked other questions, but either they have no answers or they told about previous Ubuntu version with 3.0.x kernels. A USB 2.0 device will work in the USB 3.0 ports. A USB 3.0 device will work (at USB 2.0 speeds) in the USB 2.0 ports. The problem, as I wrote, is between USB 3.0 devices and USB 3.0 ports. I have my USB 3.0 ports configured without legacy support via the BIOS (the way they should be, I suppose). But I also have tried to configure them with XHCI Preboot mode disabled. Have any one solved a similar problem? Thanks in advance.

    Read the article

  • How to port email from evolution to thunderbird?

    - by jim
    I updated ubuntu to 11.10 using the update notification. I am also switching from Xubuntu to ubuntu - gnome interface. I have been using evolution for years and would like to port the emails to thunderbird. I have looked at the similar questions with no luck and the thunderbird help on manually importing. Most of these assume that the evolution file structure is similar to the evolution file structure. When I set up thunderbird it seems to have imported the contacts from evolution (and actually removed them from evolution. However no mail got transferred. I found the evolution mail in ~/.local/share/evolution/mail/local . this has folders.db and 3 directories - cur ,tmp, and new. then there are the hidden files and directories. Each directory has three related files with extensions .cmeta, .ibex.index, and .ibex.index.data. Then all the directories had files that seem to contain the individual messages. I have not looked at rhyme or reason to the file numbering/naming scheme. is there a nice way to import these files?

    Read the article

  • Cannot start tor with vidalia, failed to bind listening port because of tor-socks running

    - by ganjan
    I get these errors trying to run tor with vidalia Apr 19 21:55:15.371 [Notice] Tor v0.2.1.30. This is experimental software. Do not rely on it for strong anonymity. (Running on Linux i686) Apr 19 21:55:15.372 [Notice] Initialized libevent version 1.4.13-stable using method epoll. Good. Apr 19 21:55:15.373 [Notice] Opening Socks listener on 127.0.0.1:9050 Apr 19 21:55:15.373 [Warning] Could not bind to 127.0.0.1:9050: Address already in use. Is Tor already running? Apr 19 21:55:15.373 [Warning] Failed to parse/validate config: Failed to bind one of the listener ports. Apr 19 21:55:15.373 [Error] Reading config failed--see warnings above. I don't think tor is running. Here is a nmap scan of my localhost Starting Nmap 5.21 ( http://nmap.org ) at 2011-04-19 21:59 CEST Nmap scan report for localhost (127.0.0.1) Host is up (0.0000050s latency). Hostname localhost resolves to 2 IPs. Only scanned 127.0.0.1 rDNS record for 127.0.0.1: localhost.localdomain Not shown: 989 closed ports PORT STATE SERVICE 22/tcp open ssh 53/tcp open domain 80/tcp open http 139/tcp open netbios-ssn 445/tcp open microsoft-ds 631/tcp open ipp 3128/tcp open squid-http 3306/tcp open mysql 9000/tcp open cslistener 9050/tcp open tor-socks 10000/tcp open snet-sensor-mgmt I see tor-socks is running here, probably be the cause of the problem. How do I stop this from starting up? I want to use vidalia so I can monitor whats going on.

    Read the article

  • Error while running Jetty Server on port 80 as non root user

    - by user75016
    All, I was trying to setup jetty on port 80 but its giving exception saying permission denied as below. I have setup jetty to work with setuid and configured start.ini as follows: OPTIONS=Server,jsp,jmx,resources,websocket,ext,plus,annotations,jta,jdbc,setuid (below as first configuration file in start.ini) etc/jetty-setuid.xml and jetty-setuid.xml file with username and group name of non root user. 2012-07-03 15:29:02.411:INFO:oejdp.ScanningAppProvider:Deployment monitor /opt/jetty-hightide-8.1.3.v20120416/contexts at interval 1 2012-07-03 15:29:02.454:WARN:oejuc.AbstractLifeCycle:FAILED [email protected]:80: java.net.SocketException: Permission denied java.net.SocketException: Permission denied at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:182) at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:311) at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.server.Server.doStart(Server.java:273) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1215) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1138) 2012-07-03 15:29:02.455:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.Server@66da9ea4: java.net.SocketException: Permission denied java.net.SocketException: Permission denied

    Read the article

  • Sharing an internet connection through the Ethernet port

    - by Bob Cunningham
    I have a small living room PC (Bohica, running fully-updated Ubuntu 10.10/Maverick) connected to my HDTV that I use for web browsing and media streaming. It connects via WiFi (wlan0) to my Fedora server (Snafu) that in turn connects to the internet. I use static addressing, and everything has been working fine. I just got a Blu-ray player, and I'd like to give it wired network access to the internet via Bohica's available wired ethernet port (eth0). So far, I haven't been to get eth0 and the network configured to get the Blu-ray player talking to the internet. Here's my wlan0 configuration: ip4 addr: 192.168.0.100 mask: /24 (255.255.255.0) gateway: 192.168.0.4 (fedora box) The Blu-ray player is set to an IP of 192.168.0.98/24, with the same gateway as above. I want eth0 set to an IP of 192.168.0.99/24, but when I do this using nm-connection-editor I lose internet access (the system tries to use eth0 as the default internet access interface). How do I get my blu-ray player to talk to the internet through Bohica, and do so without disrupting my current (working) network? Thanks. Edit: Here's the relevant output from nm-tool with the Blu-ray player connected: $ nm-tool NetworkManager Tool State: connected - Device: eth0 Type: Wired Driver: forcedeth State: disconnected Default: no HW Address: 90:FB:A6:2C:94:32 Capabilities: Carrier Detect: yes Speed: 100 Mb/s Wired Properties Carrier: on - Device: wlan0 [wlan0] Type: 802.11 WiFi Driver: ndiswrapper State: connected Default: yes HW Address: 00:26:5A:C0:D0:05 IPv4 Settings: Address: 192.168.0.100 Prefix: 24 (255.255.255.0) Gateway: 192.168.0.4

    Read the article

  • port opengl2.x to opengl 3.x

    - by user46759
    I'm trying to port opencloth example to OpenGL 3.x. I've mostly done it to the shaders but I'm not sure of this part : glEnableClientState(GL_VERTEX_ARRAY); glBindBuffer(GL_ARRAY_BUFFER, vboID); glVertexPointer(4, GL_FLOAT, 0,0); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glBindBuffer(GL_ARRAY_BUFFER, vboTexID); glTexCoordPointer(2, GL_FLOAT,0, 0); glEnableClientState(GL_NORMAL_ARRAY); glBindBuffer(GL_ARRAY_BUFFER, vboNormID); glNormalPointer(GL_FLOAT,sizeof(float)*4, 0); maybe glEnableVertexAttriArray somewhere ? any clue ? thanx edit : maybe something like that ? glEnableVertexAttribArray (2) ; // Ou glEnableVertexAttribArray (positionIndex) ; glBindBuffer(GL_ARRAY_BUFFER, vboTexID); glVertexAttribPointer (2, 2, GL_FLOAT, GL_FALSE, 0, 0) ; glEnableVertexAttribArray (3) ; // Ou glEnableVertexAttribArray (positionIndex) ; glBindBuffer(GL_ARRAY_BUFFER, vboNormID); glVertexAttribPointer (3, 4, GL_FLOAT, GL_FALSE, sizeof (float) * 4, 0) ;

    Read the article

  • HDMI & Display Port stopped work on 11.10

    - by dizzy
    After upgraded two laptops to 11.10, HDMI and Display ports stopped to work. Symptoms on each (btw. it used to work with 11.04 on both): laptop Dell Inspiron 1525 (HDMI, Intel GMX 3100): after HDMI cable is plugged in, screen is corrupted (no panel, no icons), system is unresponsive, TV set receives some signal, but only blue screen and some regular ticks can be heard. Unplugging the cable system recovers. No logs were checked. Thinkpad W510 (DisplayPort, NVidia). Simple "Screens" utility does not recognizes TV set, but this is something to do with the differences between Nvidia driver API and the one expected from the utility, as far I could spot on the net. However, using Nvidia-settings, TV is recognized, but cannot be enabled and used. Beside that, touch pad freezes after HDMI2DisplayPort connector is plugged in the laptop (not immediately, but after few seconds - probably after some handshake with the TV set crashes). It is strange that no such bug reports can be found on the net. So, I guess it is something wrong on our laptops only, but would appreciate some hints (i.e. any known changes recently related to HDMI, Display Port, X-Windows, kernel... wherever I should take a look and fix the issue).

    Read the article

  • vSphere Promiscuous mode only receiving packets one way from network switch

    - by steve.lippert
    We have two network switches, a POE switch (SwitchA) to power our phones / users computers and a non-POE switch (SwitchB for the rest network.) Each switch is setup to do port mirroring to support our VoIP recording system. SwitchA does port mirroring on specific ports if we need to record a user. SwitchB mirrors one port to monitor our work at home users (Internet comes in from managed router, to switch, back out to our firewall.) These two port mirroring setups feed into one vmware vSphere 4.1 server, it has four total physical cards. The other two NICs feed into an unmanaged switch for connecting to the rest of the network. Once into the vSphere server all network ports go into a vSwitch, and then one of the servers (Windows 2008 R2) sniffs them out and does its thing. Everything is working fine and dandy from SwitchB. But on SwitchA we only receive one side of the VoIP packets (going out to the phone, nothing coming in from the phone). Troubleshooting steps I have taken so far: I hooked up my laptop to the monitor port on SwitchB and I see both sides of the packets. I swapped which network interface is plugged into the monitor port on SwitchA. Because everything feeds into one vSwitch / vNetwork and both sides of the conversation arrive just fine from SwitchB I believe everything is configured correctly on the vSphere server/guest. What could be causing one way packets to arrive on my guest machine from only one interface, but not the other? Could a bad cable be causing the problems from SwitchB?

    Read the article

  • Dealing with unwanted port numbers on localhost when debugging in Visual Studio

    - by Dan Bailiff
    So when I'm trying to debug a project in Visual Studio, I'll often have 1 or more services that I need to call. These services are separate projects and I'll launch them in separate instances of VS. ASP dev server kindly launches them with temporary port numbers attached. This would be fine except for my programs are looking for an IP without a port attached. (Typically it's as simple as "localhost"!) I've coped by using web config settings and changing the xml to use the port number while debugging. This still doesn't always work and occasionally I'll still have to fudge it and insert port numbers as strings in code! UGH! Then I have to remember to undo all the port herding code before deployment... I want to stop doing this: string _strBaseURL = String.Format("http://{0}:2277", ConfigurationManager.AppSettings["myservice_ip"].ToString()); What is the best practice here? Am I doomed to port herding while debugging VS apps?

    Read the article

  • Did test server port change in Rails 2.3?

    - by kareem
    I upgraded rails to 2.3.2 from 2.1.1 yesterday and a bunch of my tests started failing. When I was running under 2.1.1, the test server was running on port 3000 so I had a HOST_DOMAIN variable that included the port - HOST_DOMAIN = "localhost.tst:3000". This is so my assert_redirected_to's would succeed. Now, however, it seems that the test server is running on port 80, so the port in HOST_DOMAIN is causing tests to fail. There's no specific reason I'm keeping the port in HOST_DOMAIN. I more want to know whether something in Rails 2.3 changed the port the test server runs on and where I can read more about why. I've searched a ton and can't find anything, so I'm going to my go-to place to ask development questions :) Thanks in advance.

    Read the article

  • C, Linux: Receiving data from multiple multicast address on same port - how to distinguish them?

    - by Gigi
    2 vote down star I have an application that is receiving data from multiple multicast sources on the same port. I am able to receive the data. However, I am trying to account for statistics of each group (i.e. msgs received, bytes received) and all the data is getting mixed up. Does anyone know how to solved this problem? If I try to look at the sender's address, it is not the multicast address, but rather the IP of the sending machine. I am using the following socket options: struct ip_mreq mreq; mreq.imr_multiaddr.s_addr = inet_addr("224.1.2.3"); mreq.imr_interface.s_addr = INADDR_ANY; setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); and also: setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &reuse, sizeof(reuse)); I appreciate any help!!!

    Read the article

  • How to rebind another UDP socket port properly?

    - by Jollian
    When my client application launchs, it binds the UDP port like this: this.BindPort(5001); The BindPort method implement blow: public void BindPort(int port) { m_listener = new Socket( AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp ); IPEndPoint Point = new IPEndPoint( IPAddress.Any, Port ); m_listener.Bind( port); m_listener.BeginReceive( buff, 0, buff.Length, SocketFlags.None, new AsyncCallback( DataReceived ), buff ); } And when my server application commands client to bind to another UDP port(e.g. 5005). I call the same BindPort method in client. Then a exception occurs at DataReceived method. I think there must be a problem that I don't close the UDP port properly. But how can i close the UDP socket properly and rebind to another one. Thanks.

    Read the article

  • How to tell which port a USB device is plugged into?

    - by Ted N
    My c# app must manage multiple USB devices which are the identical product from the same manufacturer. If the user plugs 3 of my devices in, and then unplugs one of them, I need to know which of the 3 devices was unplugged. However, when I register the devices and receive the WM_DEVICECHANGE notifications, the data returned from the DBT_DEVTYP_DEVICEINTERFACE is identical for each of the devices. If I could get the USB port info when the devices arrive or are removed it would solve my problem, but I can't find a way to do this. Any suggestions?

    Read the article

  • Python: Matching & Stripping port number from socket data

    - by tobywuk
    Hello, I have data coming in to a python server via a socket. Within this data is the string '<port>80</port>' or which ever port is being used. I wish to extract the port number into a variable. The data coming in is not XML, I just used the tag approach to identifying data for future XML use if needed. I do not wish to use an XML python library, but simply use something like regexp and strings. What would you recommend is the best way to match and strip this data? I am currently using this code with no luck: p = re.compile('<port>\w</port>') m = p.search(data) print m Thank you :)

    Read the article

  • How I can fix this code to allow my AVR to talk over serial port?

    - by samoz
    Hi guys, I've been pulling my hair out lately trying to get an ATmega162 on my STK200 to talk to my computer over RS232. I checked and made sure that the STK200 contains a MAX202CPE chip. I've configured the chip to use its internal 8MHz clock and divided it by 8. I've tried to copy the code out of the data sheet (and made changes where the compiler complained), but to no avail. My code is below, could someone please help me fix the problems that I'm having? I've confirmed that my serial port works on other devices and is not faulty. Thanks! #include <avr/io.h> #include <avr/iom162.h> #define BAUDRATE 4800 void USART_Init(unsigned int baud) { UBRR0H = (unsigned char)(baud >> 8); UBRR0L = (unsigned char)baud; UCSR0B = (1 << RXEN0) | (1 << TXEN0); UCSR0C = (1 << URSEL0) | (1 << USBS0) | (3 << UCSZ00); } void USART_Transmit(unsigned char data) { while(!(UCSR0A & (1 << UDRE0))); UDR0 = data; } unsigned char USART_Receive() { while(!(UCSR0A & (1 << RXC0))); return UDR0; } int main() { USART_Init(BAUDRATE); unsigned char data; // all are 1, all as output DDRB = 0xFF; while(1) { data = USART_Receive(); PORTB = data; USART_Transmit(data); } }

    Read the article

  • Java sockets: multiple client threads on same port on same machine?

    - by espcorrupt
    I am new to Socket programming in Java and was trying to understand if the below code is not a wrong thing to do. My question is: Can I have multiple clients on each thread trying to connect to a server instance in the same program and expect the server to read and write data with isolation between clients" public class Client extends Thread { ... void run() { Socket socket = new Socket("localhost", 1234); doIO(socket); } } public class Server extends Thread { ... void run() { // serverSocket on "localhost", 1234 Socket clientSock = serverSocket.accept(); executor.execute(new ClientWorker(clientSock)); } } Now can I have multiple Client instances on different threads trying to connect on the same port of the current machine? For example, Server s = new Server("localhost", 1234); s.start(); Client[] c = new Client[10]; for (int i = 0; i < c.length; ++i) { c.start(); }

    Read the article

  • Outbound traffic being blocked for MIP/VIPped servers (Juniper SSG5)

    - by Mark S. Rasmussen
    As we've been having some problems with sporadic packet loss, I've been preparing a replacement router (also an SSG5) for our current Juniper SSG5. I've setup the new SSG5 identically to the old one. We have a /29 IP range with a single IP setup as a MIP map to a server and two others being used for VIP maps. Each VIP/MIP is accompanied by relevant policies. Long story short - we tried connected the new SSG5 and some things were not working as they should. No problem, I just reconnected the old one. However, some things are still broken, even when I reconnected the old one. I fear I may have inadvertently changed some settings while browsing through old settings in my attempt to reconfigure the new SSG5 unit. All inbound traffic seems to work as expected. However, the 192.168.2.202 server can't initiate any outbound connections. It works perfectly on the local network, but any pings or DNS lookups to external IP's fail. The MIP & VIP map to it works perfectly - I can access it through HTTP and RDP without issues. Any tips on what to debug, or where I've messed up my config? I've attached the full config here (with anonymized IPs): set clock timezone 1 set vrouter trust-vr sharable set vrouter "untrust-vr" exit set vrouter "trust-vr" unset auto-route-export exit set service "MyVOIP_UDP4569" protocol udp src-port 0-65535 dst-port 4569-4569 set service "MyVOIP_TCP22" protocol tcp src-port 0-65535 dst-port 22-22 set service "MyRDP" protocol tcp src-port 0-65535 dst-port 3389-3389 set service "MyRsync" protocol tcp src-port 0-65535 dst-port 873-873 set service "NZ_FTP" protocol tcp src-port 0-65535 dst-port 40000-41000 set service "NZ_FTP" + tcp src-port 0-65535 dst-port 21-21 set service "PPTP-VPN" protocol 47 src-port 2048-2048 dst-port 2048-2048 set service "PPTP-VPN" + tcp src-port 1024-65535 dst-port 1723-1723 set service "NZ_FMS_1935" protocol tcp src-port 0-65535 dst-port 1935-1935 set service "NZ_FMS_1935" + udp src-port 0-65535 dst-port 1935-1935 set service "NZ_FMS_8080" protocol tcp src-port 0-65535 dst-port 8080-8080 set service "CrashPlan Server" protocol tcp src-port 0-65535 dst-port 4280-4280 set service "CrashPlan Console" protocol tcp src-port 0-65535 dst-port 4282-4282 unset alg sip enable set auth-server "Local" id 0 set auth-server "Local" server-name "Local" set auth default auth server "Local" set auth radius accounting port 1646 set admin auth timeout 10 set admin auth server "Local" set admin format dos set vip multi-port set zone "Trust" vrouter "trust-vr" set zone "Untrust" vrouter "trust-vr" set zone "DMZ" vrouter "trust-vr" set zone "VLAN" vrouter "trust-vr" set zone "Untrust-Tun" vrouter "trust-vr" set zone "Trust" tcp-rst set zone "Untrust" block unset zone "Untrust" tcp-rst set zone "DMZ" tcp-rst set zone "VLAN" block unset zone "VLAN" tcp-rst set zone "Untrust" screen tear-drop set zone "Untrust" screen syn-flood set zone "Untrust" screen ping-death set zone "Untrust" screen ip-filter-src set zone "Untrust" screen land set zone "V1-Untrust" screen tear-drop set zone "V1-Untrust" screen syn-flood set zone "V1-Untrust" screen ping-death set zone "V1-Untrust" screen ip-filter-src set zone "V1-Untrust" screen land set interface ethernet0/0 phy full 100mb set interface ethernet0/3 phy full 100mb set interface ethernet0/4 phy full 100mb set interface ethernet0/5 phy full 100mb set interface ethernet0/6 phy full 100mb set interface "ethernet0/0" zone "Untrust" set interface "ethernet0/1" zone "Null" set interface "bgroup0" zone "Trust" set interface "bgroup1" zone "Trust" set interface "bgroup2" zone "Trust" set interface bgroup2 port ethernet0/2 set interface bgroup0 port ethernet0/3 set interface bgroup0 port ethernet0/4 set interface bgroup1 port ethernet0/5 set interface bgroup1 port ethernet0/6 unset interface vlan1 ip set interface ethernet0/0 ip 212.242.193.18/29 set interface ethernet0/0 route set interface bgroup0 ip 192.168.1.1/24 set interface bgroup0 nat set interface bgroup1 ip 192.168.2.1/24 set interface bgroup1 nat set interface bgroup2 ip 192.168.3.1/24 set interface bgroup2 nat set interface ethernet0/0 gateway 212.242.193.17 unset interface vlan1 bypass-others-ipsec unset interface vlan1 bypass-non-ip set interface ethernet0/0 ip manageable set interface bgroup0 ip manageable set interface bgroup1 ip manageable set interface bgroup2 ip manageable set interface bgroup0 manage mtrace unset interface bgroup1 manage ssh unset interface bgroup1 manage telnet unset interface bgroup1 manage snmp unset interface bgroup1 manage ssl unset interface bgroup1 manage web unset interface bgroup2 manage ssh unset interface bgroup2 manage telnet unset interface bgroup2 manage snmp unset interface bgroup2 manage ssl unset interface bgroup2 manage web set interface ethernet0/0 vip 212.242.193.19 2048 "PPTP-VPN" 192.168.1.131 set interface ethernet0/0 vip 212.242.193.19 + 4280 "CrashPlan Server" 192.168.1.131 set interface ethernet0/0 vip 212.242.193.19 + 4282 "CrashPlan Console" 192.168.1.131 set interface ethernet0/0 vip 212.242.193.22 22 "MyVOIP_TCP22" 192.168.2.127 set interface ethernet0/0 vip 212.242.193.22 + 4569 "MyVOIP_UDP4569" 192.168.2.127 set interface ethernet0/0 vip 212.242.193.22 + 3389 "MyRDP" 192.168.2.202 set interface ethernet0/0 vip 212.242.193.22 + 873 "MyRsync" 192.168.2.201 set interface ethernet0/0 vip 212.242.193.22 + 80 "HTTP" 192.168.2.202 set interface ethernet0/0 vip 212.242.193.22 + 2048 "PPTP-VPN" 192.168.2.201 set interface ethernet0/0 vip 212.242.193.22 + 8080 "NZ_FMS_8080" 192.168.2.216 set interface ethernet0/0 vip 212.242.193.22 + 1935 "NZ_FMS_1935" 192.168.2.216 set interface bgroup0 dhcp server service set interface bgroup1 dhcp server service set interface bgroup2 dhcp server service set interface bgroup0 dhcp server auto set interface bgroup1 dhcp server auto set interface bgroup2 dhcp server auto set interface bgroup0 dhcp server option domainname iplan set interface bgroup0 dhcp server option dns1 192.168.1.131 set interface bgroup1 dhcp server option domainname nzlan set interface bgroup1 dhcp server option dns1 192.168.2.202 set interface bgroup2 dhcp server option dns1 8.8.8.8 set interface bgroup2 dhcp server option wins1 8.8.4.4 set interface bgroup0 dhcp server ip 192.168.1.2 to 192.168.1.116 set interface bgroup1 dhcp server ip 192.168.2.2 to 192.168.2.116 set interface bgroup2 dhcp server ip 192.168.3.2 to 192.168.3.126 unset interface bgroup0 dhcp server config next-server-ip unset interface bgroup1 dhcp server config next-server-ip unset interface bgroup2 dhcp server config next-server-ip set interface "ethernet0/0" mip 212.242.193.21 host 192.168.2.202 netmask 255.255.255.255 vr "trust-vr" set interface "serial0/0" modem settings "USR" init "AT&F" set interface "serial0/0" modem settings "USR" active set interface "serial0/0" modem speed 115200 set interface "serial0/0" modem retry 3 set interface "serial0/0" modem interval 10 set interface "serial0/0" modem idle-time 10 set pak-poll p1queue pak-threshold 96 set pak-poll p2queue pak-threshold 32 set flow tcp-mss unset flow tcp-syn-check set dns host dns1 0.0.0.0 set dns host dns2 0.0.0.0 set dns host dns3 0.0.0.0 set address "Trust" "192.168.1.0/24" 192.168.1.0 255.255.255.0 set address "Trust" "192.168.2.0/24" 192.168.2.0 255.255.255.0 set address "Trust" "192.168.3.0/24" 192.168.3.0 255.255.255.0 set ike respond-bad-spi 1 unset ike ikeid-enumeration unset ike dos-protection unset ipsec access-session enable set ipsec access-session maximum 5000 set ipsec access-session upper-threshold 0 set ipsec access-session lower-threshold 0 set ipsec access-session dead-p2-sa-timeout 0 unset ipsec access-session log-error unset ipsec access-session info-exch-connected unset ipsec access-session use-error-log set l2tp default ppp-auth chap set url protocol websense exit set policy id 1 from "Trust" to "Untrust" "Any" "Any" "ANY" permit traffic set policy id 1 exit set policy id 2 from "Untrust" to "Trust" "Any" "VIP(212.242.193.19)" "PPTP-VPN" permit traffic set policy id 2 exit set policy id 3 from "Untrust" to "Trust" "Any" "VIP(212.242.193.22)" "HTTP" permit traffic priority 0 set policy id 3 set service "MyRDP" set service "MyRsync" set service "MyVOIP_TCP22" set service "MyVOIP_UDP4569" exit set policy id 6 from "Trust" to "Trust" "192.168.1.0/24" "192.168.2.0/24" "ANY" deny set policy id 6 exit set policy id 7 from "Trust" to "Trust" "192.168.2.0/24" "192.168.1.0/24" "ANY" deny set policy id 7 exit set policy id 8 from "Trust" to "Trust" "192.168.3.0/24" "192.168.1.0/24" "ANY" deny set policy id 8 exit set policy id 9 from "Trust" to "Trust" "192.168.3.0/24" "192.168.2.0/24" "ANY" deny set policy id 9 exit set policy id 10 from "Untrust" to "Trust" "Any" "MIP(212.242.193.21)" "NZ_FTP" permit set policy id 10 exit set policy id 11 from "Untrust" to "Trust" "Any" "VIP(212.242.193.22)" "PPTP-VPN" permit set policy id 11 exit set policy id 12 from "Untrust" to "Trust" "Any" "VIP(212.242.193.22)" "NZ_FMS_1935" permit set policy id 12 set service "NZ_FMS_8080" exit set policy id 13 from "Untrust" to "Trust" "Any" "VIP(212.242.193.19)" "CrashPlan Console" permit set policy id 13 set service "CrashPlan Server" exit set nsmgmt bulkcli reboot-timeout 60 set ssh version v2 set config lock timeout 5 set snmp port listen 161 set snmp port trap 162 set vrouter "untrust-vr" exit set vrouter "trust-vr" unset add-default-route exit set vrouter "untrust-vr" exit set vrouter "trust-vr" exit

    Read the article

  • C# serial port driver wrapper class code and concept quality

    - by Ruben Trancoso
    Hi folks, Would like to know from all you guys what you think about my Serial Wrapper class. Had be a while I've beem working with serial port but never shared the code what somekind make closed to my very own vision. Would like to know if it's a good/bad approach, if the interface is enough and what more you see on it. I know that Stackoverflow is for question but at the same time there's a lot of very good skilled people here and share code and opinion can also bennefit everybody, it's why I decided to post it anyway. thanks! using System.Text; using System.IO; using System.IO.Ports; using System; namespace Driver { class SerialSingleton { // The singleton instance reference private static SerialSingleton instance = null; // System's serial port interface private SerialPort serial; // Current com port identifier private string comPort = null; // Configuration parameters private int confBaudRate; private int confDataBits; private StopBits confStopBits; private Parity confParityControl; ASCIIEncoding encoding = new ASCIIEncoding(); // ================================================================================== // Constructors public static SerialSingleton getInstance() { if (instance == null) { instance = new SerialSingleton(); } return instance; } private SerialSingleton() { serial = new SerialPort(); } // =================================================================================== // Setup Methods public string ComPort { get { return comPort; } set { if (value == null) { throw new SerialException("Serial port name canot be null."); } if (nameIsComm(value)) { close(); comPort = value; } else { throw new SerialException("Serial Port '" + value + "' is not a valid com port."); } } } public void setSerial(string baudRate, int dataBits, StopBits stopBits, Parity parityControl) { if (baudRate == null) { throw new SerialException("Baud rate cannot be null"); } string[] baudRateRef = { "300", "600", "1200", "1800", "2400", "3600", "4800", "7200", "9600", "14400", "19200", "28800", "38400", "57600", "115200" }; int confBaudRate; if (findString(baudRateRef, baudRate) != -1) { confBaudRate = System.Convert.ToInt32(baudRate); } else { throw new SerialException("Baurate parameter invalid."); } int confDataBits; switch (dataBits) { case 5: confDataBits = 5; break; case 6: confDataBits = 6; break; case 7: confDataBits = 7; break; case 8: confDataBits = 8; break; default: throw new SerialException("Databits parameter invalid"); } if (stopBits == StopBits.None) { throw new SerialException("StopBits parameter cannot be NONE"); } this.confBaudRate = confBaudRate; this.confDataBits = confDataBits; this.confStopBits = stopBits; this.confParityControl = parityControl; } // ================================================================================== public string[] PortList { get { return SerialPort.GetPortNames(); } } public int PortCount { get { return SerialPort.GetPortNames().Length; } } // ================================================================================== // Open/Close Methods public void open() { open(comPort); } private void open(string comPort) { if (isOpen()) { throw new SerialException("Serial Port is Already open"); } else { if (comPort == null) { throw new SerialException("Serial Port not defined. Cannot open"); } bool found = false; if (nameIsComm(comPort)) { string portId; string[] portList = SerialPort.GetPortNames(); for (int i = 0; i < portList.Length; i++) { portId = (portList[i]); if (portId.Equals(comPort)) { found = true; break; } } } else { throw new SerialException("The com port identifier '" + comPort + "' is not a valid serial port identifier"); } if (!found) { throw new SerialException("Serial port '" + comPort + "' not found"); } serial.PortName = comPort; try { serial.Open(); } catch (UnauthorizedAccessException uaex) { throw new SerialException("Cannot open a serial port in use by another application", uaex); } try { serial.BaudRate = confBaudRate; serial.DataBits = confDataBits; serial.Parity = confParityControl; serial.StopBits = confStopBits; } catch (Exception e) { throw new SerialException("Serial port parameter invalid for '" + comPort + "'.\n" + e.Message, e); } } } public void close() { if (serial.IsOpen) { serial.Close(); } } // =================================================================================== // Auxiliary private Methods private int findString(string[] set, string search) { if (set != null) { for (int i = 0; i < set.Length; i++) { if (set[i].Equals(search)) { return i; } } } return -1; } private bool nameIsComm(string name) { int comNumber; int.TryParse(name.Substring(3), out comNumber); if (name.Substring(0, 3).Equals("COM")) { if (comNumber > -1 && comNumber < 256) { return true; } } return false; } // ================================================================================= // Device state Methods public bool isOpen() { return serial.IsOpen; } public bool hasData() { int amount = serial.BytesToRead; if (amount > 0) { return true; } else { return false; } } // ================================================================================== // Input Methods public char getChar() { int data = serial.ReadByte(); return (char)data; } public int getBytes(ref byte[] b) { int size = b.Length; char c; int counter = 0; for (counter = 0; counter < size; counter++) { if (tryGetChar(out c)) { b[counter] = (byte)c; } else { break; } } return counter; } public string getStringUntil(char x) { char c; string response = ""; while (tryGetChar(out c)) { response = response + c; if (c == x) { break; } } return response; } public bool tryGetChar(out char c) { c = (char)0x00; byte[] b = new byte[1]; long to = 10; long ft = System.Environment.TickCount + to; while (System.Environment.TickCount < ft) { if (hasData()) { int data = serial.ReadByte(); c = (char)data; return true; } } return false; } // ================================================================================ // Output Methods public void sendString(string data) { byte[] bytes = encoding.GetBytes(data); serial.Write(bytes, 0, bytes.Length); } public void sendChar(char c) { char[] data = new char[1]; data[0] = c; serial.Write(data, 0, 1); } public void sendBytes(byte[] data) { serial.Write(data, 0, data.Length); } public void clearBuffer() { if (serial.IsOpen) { serial.DiscardInBuffer(); serial.DiscardOutBuffer(); } } } }

    Read the article

  • Can't launch glassfish on ec2 - can't open port

    - by orange80
    I'm trying to start glassfish on an EBS-based AMI of Ubuntu 10.04 64-bit. I have used glassfish on non-ec2 servers with no problems, but on ec2 I get this message: $ sudo -u glassfish bin/asadmin start-domain domain1 There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server. Command start-domain failed. I know that ec2 has requires that firewall rules be modified using ec2-authorize to let outside traffic thru the firewall, as I had to do to make ssh work. This still doesn't explain the port error when all I'm trying to do is start glassfish so I can try $ wget localhost:8080and make sure it's working. This is very frustrating and I'd really appreciate any help. Thanks. FINAL UPDATE: Sorry if you came here looking for answers. I never figured out what was causing the problem. I created another fresh instance, installed the same stuff, and Glassfish worked perfectly. Something obviously got boned during installation, but I have no idea what. I guess it will remain a mystery. UPDATE: Here's what I get from netstat: # netstat -nuptl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 462/sshd tcp6 0 0 :::22 :::* LISTEN 462/sshd udp 0 0 0.0.0.0:5353 0.0.0.0:* 483/avahi-daemon: r udp 0 0 0.0.0.0:1194 0.0.0.0:* 589/openvpn udp 0 0 0.0.0.0:37940 0.0.0.0:* 483/avahi-daemon: r udp 0 0 0.0.0.0:68 0.0.0.0:* 377/dhclient3 UPDATE: One more thing... I know that the "net.ipv6.bindv6only" kernel option can cause problems with java networking, so I did set this: # sysctl -w net.ipv6.bindv6only=0 UPDATE: I also verified that it has nothing at all to do with the port number (4848). As you can see here, when I changed the admin-listener port in domain.xml to 4949, I get a similar message: # sudo -u glassfish bin/asadmin start-domain domain1 There is a process already using the admin port 4949 -- it probably is another instance of a GlassFish server. Command start-domain failed. UPDATE: Here are the contents of /etc/hosts: 127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts I should mention that I have another Ubuntu Lucid 10.04 64-bit slice that is NOT hosted on ec2, and set it up the exact same way with no problems whatsoever. Also server.log doesn't offer much insight either: # cat ./server.log Nov 20, 2010 8:46:49 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info INFO: JVM invocation command line: /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -cp /opt/glassfishv3/glassfish/modules/glassfish.jar -XX:+UnlockDiagnosticVMOptions -XX:MaxPermSize=192m -XX:NewRatio=2 -XX:+LogVMOutput -XX:LogFile=/opt/glassfishv3/glassfish/domains/domain1/logs/jvm.log -Xmx512m -client -javaagent:/opt/glassfishv3/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true -Dosgi.shell.telnet.maxconn=1 -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver -Dfelix.fileinstall.dir=/opt/glassfishv3/glassfish/modules/autostart/ -Djavax.net.ssl.keyStore=/opt/glassfishv3/glassfish/domains/domain1/config/keystore.jks -Dosgi.shell.telnet.port=6666 -Djava.security.policy=/opt/glassfishv3/glassfish/domains/domain1/config/server.policy -Dfelix.fileinstall.poll=5000 -Dcom.sun.aas.instanceRoot=/opt/glassfishv3/glassfish/domains/domain1 -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory -Dosgi.shell.telnet.ip=127.0.0.1 -Djava.endorsed.dirs=/opt/glassfishv3/glassfish/modules/endorsed:/opt/glassfishv3/glassfish/lib/endorsed -Dcom.sun.aas.installRoot=/opt/glassfishv3/glassfish -Djava.ext.dirs=/usr/lib/jvm/java-6-sun-1.6.0.22/lib/ext:/usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/ext:/opt/glassfishv3/glassfish/domains/domain1/lib/ext -Dfelix.fileinstall.bundles.new.start=true -Djavax.net.ssl.trustStore=/opt/glassfishv3/glassfish/domains/domain1/config/cacerts.jks -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as -Djava.security.auth.login.config=/opt/glassfishv3/glassfish/domains/domain1/config/login.conf -DANTLR_USE_DIRECT_CLASS_LOADING=true -Dfelix.fileinstall.debug=1 -Dorg.glassfish.web.rfc2109_cookie_names_enforced=false -Djava.library.path=/opt/glassfishv3/glassfish/lib:/usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.22/lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib com.sun.enterprise.glassfish.bootstrap.ASMain -domainname domain1 -asadmin-args start-domain,,,domain1 -instancename server -verbose false -debug false -asadmin-classpath /opt/glassfishv3/glassfish/modules/admin-cli.jar -asadmin-classname com.sun.enterprise.admin.cli.AsadminMain -upgrade false -domaindir /opt/glassfishv3/glassfish/domains/domain1 -read-stdin true

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >