Précédent   Forum des professionnels en informatique > Systèmes > Linux
Linux Forum d'entraide sur le système Linux. Avant de poster -> Tutoriels Linux, F.A.Q Linux
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 26/07/2011, 18h29   #1
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
Par défaut problème d'envoi des sms avec Linux

Salut,
J'ai un module d'envoi des sms, à l'aide de l'API SmsLib et d'un modem , qui marche très bien sur windows(dans un programme java et dans un projet war sous jboss),mais sur linux c pas pareil; le programme java fonctionne bien alors que j'ai trouvé des problèmes avec le projet war sous jboss et sous tomcat aussi;il m'affiche l'erreur suivante lors de l'envoi du sms(jboss ou tomcat sous linux):
Code :
1
2
3
4
5
 org.smslib.GatewayException: Comm library exception: java.lang.RuntimeException: gnu.io.NoSuchPortException
2011-07-26 16:34:45,676 INFO  [STDOUT]  at org.smslib.modem.SerialModemDriver.connectPort(SerialModemDriver.java:97)
2011-07-26 16:34:45,676 INFO  [STDOUT]  at org.smslib.modem.AModemDriver.connect(AModemDriver.java:113)
2011-07-26 16:34:45,677 INFO  [STDOUT]  at org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:187)
2011-07-26 16:34:45,677 INFO  [STDOUT]  at org.smslib.Service$1Starter.run(Service.java:321)
Cette erreur s'affiche aussi lorsque je débranche le modem(si j'exécute le programme java). J'ai posté l'erreur sur le forum de SmsLib mais j'ai pas trouvé des solutions et à mon avis et d'après les tests que j'ai effectués, le problème ne provient pas de l'API.
j'espère que je trouve la solution sur ce forum.
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 01/08/2011, 13h08   #2
Rédacteur/Modérateur
 
Avatar de Siguillaume
 
Homme Guillaume SIGUI
Chef de projet en SSII
Inscription : août 2007
Messages : 2 388
Détails du profil
Informations personnelles :
Nom : Homme Guillaume SIGUI
Localisation : Côte d'Ivoire

Informations professionnelles :
Activité : Chef de projet en SSII
Secteur : High Tech - Produits et services télécom et Internet

Informations forums :
Inscription : août 2007
Messages : 2 388
Points : 3 190
Points : 3 190
Envoyer un message via Yahoo à Siguillaume Envoyer un message via Skype™ à Siguillaume
Bonjour, je ne connais pas les spécificités de ce que tu veux faire, mais l'envoi et la réception des SMS sont bien gérés par des outils tels que Kannel.
__________________
Un gros problème est la somme de plusieurs petits problèmes.
Resolvez chacun des petits problèmes: vous aurez resolu le gros problème!
Mes tutos || Mon blog || Développeurs ivoiriens
Siguillaume est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 02/08/2011, 16h30   #3
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
Bonjour,
J'ai une application qui est composé de plusieurs modules, parmis les quels j'ai le module d'envoi des sms, donc je pense que ces outils ne me servent à rien
mon problème est sur Linux, sur windows tout marche bien
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 02/08/2011, 17h19   #4
Membre Expert
 
Avatar de Loceka
 
Tlouye Ci
Inscription : mars 2004
Messages : 1 450
Détails du profil
Informations personnelles :
Nom : Tlouye Ci

Informations forums :
Inscription : mars 2004
Messages : 1 450
Points : 2 149
Points : 2 149
Citation:
Envoyé par ja1985va Voir le message
Code :
 org.smslib.GatewayException: Comm library exception: java.lang.RuntimeException: gnu.io.NoSuchPortException
Le problème ne viendrait pas d'un port non ouvert, comme le dit l'exception ?
Loceka est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 03/08/2011, 10h06   #5
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
non, le port est ouvert, et cette exception c comme si le modem n'est pas branché
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 03/08/2011, 12h57   #6
Rédacteur/Modérateur
 
Avatar de Siguillaume
 
Homme Guillaume SIGUI
Chef de projet en SSII
Inscription : août 2007
Messages : 2 388
Détails du profil
Informations personnelles :
Nom : Homme Guillaume SIGUI
Localisation : Côte d'Ivoire

Informations professionnelles :
Activité : Chef de projet en SSII
Secteur : High Tech - Produits et services télécom et Internet

Informations forums :
Inscription : août 2007
Messages : 2 388
Points : 3 190
Points : 3 190
Envoyer un message via Yahoo à Siguillaume Envoyer un message via Skype™ à Siguillaume
Citation:
Envoyé par ja1985va Voir le message
c comme si le modem n'est pas branché
Tu as fait un dmesg pour voir si le modem est branché et reconnu par le système?
__________________
Un gros problème est la somme de plusieurs petits problèmes.
Resolvez chacun des petits problèmes: vous aurez resolu le gros problème!
Mes tutos || Mon blog || Développeurs ivoiriens
Siguillaume est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/08/2011, 13h31   #7
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
oui le modem est bien reconnu voilà le resultat de dmesg:
Code :
1
2
3
4
5
6
usb 7-2: FTDI USB Serial Device converter now attached to ttyUSB0
usb 7-2: New USB device found, idVendor=0403, idProduct=6001
usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 7-2: Product: Teltonika ModemUSB/G10
usb 7-2: Manufacturer: Teltonika
usb 7-2: SerialNumber: 00253161
j'ai déjà envoyé un sms avec du programme java (en exécutant un .jar), le problème dans le projet web sous tomcat et jboss
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/08/2011, 13h39   #8
Expert Confirmé Sénior
 
Homme Laurent Willems
Expert Stop/Start
Inscription : septembre 2002
Messages : 2 551
Détails du profil
Informations personnelles :
Nom : Homme Laurent Willems
Âge : 33
Localisation : Belgique

Informations professionnelles :
Activité : Expert Stop/Start

Informations forums :
Inscription : septembre 2002
Messages : 2 551
Points : 4 271
Points : 4 271
Salut,

Vérifier ce point.

http://smslib.org/doc/smslib/trouble...tectable_ports

Citation:
Linux and undetectable ports
If you using USB/Bluetooth/IrDA connections on Linux, RxTx may not recognize your serial device / port. You may get a NoSuchPortException.

Assuming that your port is named /dev/xyz-port , you can:

Either set the gnu.io.rxtx.SerialPorts system property with your device name.
Create a symbolic link of your /dev/xyz-port to something resembling a standard serial port, like /dev/ttyS20, and use this one instead
__________________
Alea Jacta Test!
Mygale1978 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/08/2011, 15h47   #9
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
oui j'ai testé la deuxième solution (lien symbolique) mais j'ai toujours la même exception
il faut trouver un moyen pour verifier si tomcat se connect au port "/dev/ttyUSB0" ou non
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/08/2011, 14h10   #10
Expert Confirmé Sénior
 
Homme Laurent Willems
Expert Stop/Start
Inscription : septembre 2002
Messages : 2 551
Détails du profil
Informations personnelles :
Nom : Homme Laurent Willems
Âge : 33
Localisation : Belgique

Informations professionnelles :
Activité : Expert Stop/Start

Informations forums :
Inscription : septembre 2002
Messages : 2 551
Points : 4 271
Points : 4 271
Re,

Peux-tu fournir le résultat de cette commande?

Code :
1
2
 
 ls -l /dev/ttyUSB0
Avec quelle user démarres-tu tes instances jboss ou tomcat? root aussi?

As-tu un caused by dans ta stacktrace?
__________________
Alea Jacta Test!
Mygale1978 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/08/2011, 15h04   #11
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
salut,
voilà le résultat de la command
Code :
crw-rw---- 1 root uucp 188, 0 août  3 09:19 /dev/ttyUSB0
les instances jboss et tomcat sont démarrés par root.
ya pas caused by dans l'exception.
D'autre part, j'ai essayé de se connecter au port /dev/ttyUSB0 dans la servlet au lieu d'envoyer un sms avec le code suivant:
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
private SerialPort serialPort;
	    private OutputStream outStream;
	    private InputStream inStream;
 
	    public void connect() throws IOException {
	        try {
	            // Obtain a CommPortIdentifier object for the port you want to open
	            CommPortIdentifier portId =
	                    CommPortIdentifier.getPortIdentifier("/dev/ttyUSB0");
 
	            // Get the port's ownership
	            serialPort =
	                    (SerialPort) portId.open("Demo application", 5000);
 
	            // Set the parameters of the connection.
	            setSerialPortParameters();
 
	            // Open the input and output streams for the connection. If they won't
	            // open, close the port before throwing an exception.
	            outStream = serialPort.getOutputStream();
	            System.out.println("outStream: "+outStream.toString());
	            inStream = serialPort.getInputStream();
	        } catch (Exception e) {
	            e.printStackTrace();
	            serialPort.close();
	            //throw e;
	        }
	    }
 
	    /**
	     * Get the serial port input stream
	     * @return The serial port input stream
	     */
	    public InputStream getSerialInputStream() {
	        return inStream;
	    }
 
	    /**
	     * Get the serial port output stream
	     * @return The serial port output stream
	     */
	    public OutputStream getSerialOutputStream() {
	        return outStream;
	    }
 
	    /**
	     * Sets the serial port parameters
	     */
	    private void setSerialPortParameters() throws IOException {
	        int baudRate = 115200; // 57600bps
 
	        try {
	            // Set serial port to 57600bps-8N1..my favourite
	            serialPort.setSerialPortParams(
	                    baudRate,
	                    SerialPort.DATABITS_8,
	                    SerialPort.STOPBITS_1,
	                    SerialPort.PARITY_NONE);
 
	            serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_IN);
	        } catch (Exception ex) {
	            throw new IOException("Unsupported serial port parameter");
	        }
	    }
il affiche la même exception:

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
java.lang.RuntimeException: java.lang.RuntimeException: gnu.io.NoSuchPortException
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.smslib.helper.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:212)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at servlet.OpenSerialPort.connect(OpenSerialPort.java:21)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at servlet.SendSms.Process(SendSms.java:42)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at servlet.SendSms.doGet(SendSms.java:25)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
2011-08-04 13:25:18,843 INFO  [STDOUT]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
2011-08-04 13:25:18,844 INFO  [STDOUT]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
2011-08-04 13:25:18,844 INFO  [STDOUT]  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
2011-08-04 13:25:18,844 INFO  [STDOUT]  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
2011-08-04 13:25:18,844 INFO  [STDOUT]  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
2011-08-04 13:25:18,844 INFO  [STDOUT]  at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
2011-08-04 13:25:18,844 INFO  [STDOUT]  at java.lang.Thread.run(Thread.java:619)
2011-08-04 13:25:18,844 INFO  [STDOUT] Caused by: java.lang.RuntimeException: gnu.io.NoSuchPortException
2011-08-04 13:25:18,844 INFO  [STDOUT]  ... 25 more
2011-08-04 13:25:18,845 INFO  [STDOUT] java.lang.NullPointerException
2011-08-04 13:25:18,845 INFO  [STDOUT]  at servlet.OpenSerialPort.connect(OpenSerialPort.java:37)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at servlet.SendSms.Process(SendSms.java:42)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at servlet.SendSms.doGet(SendSms.java:25)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
2011-08-04 13:25:18,845 INFO  [STDOUT]  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
2011-08-04 13:25:18,846 INFO  [STDOUT]  at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
2011-08-04 13:25:18,846 INFO  [STDOUT]  at java.lang.Thread.run(Thread.java:619)
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/08/2011, 11h33   #12
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
J'ai essayé aussi d'afficher les ports disponibles avec le code suivant:
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
public class CommTest
{
	static CommPortIdentifier portId;
	static Enumeration portList;
	static int bauds[] = { 19200, 38400, 115200 };
 
	public void foundPort(){
		portList = CommPortIdentifier.getPortIdentifiers();
		while (portList.hasMoreElements())
		{
			portId = (CommPortIdentifier) portList.nextElement();
			if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL)
			{
				System.out.println("Found port: " + portId.getName());
				for (int i = 0; i < bauds.length; i++)
				{
					System.out.print("	Trying at " + bauds[i] + "...");
					try
					{
						SerialPort serialPort;
						InputStream inStream;
						OutputStream outStream;
						int c;
						String response;
						serialPort = (SerialPort) portId.open("SMSLibCommTester", 1971);
						serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_IN);
						serialPort.setSerialPortParams(bauds[i], SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
						inStream = serialPort.getInputStream();
						outStream = serialPort.getOutputStream();
						serialPort.enableReceiveTimeout(2000);
						c = inStream.read();
						while (c != -1)
							c = inStream.read();
						outStream.write('A');
						outStream.write('T');
						outStream.write('\r');
						outStream.write('A');
						outStream.write('T');
						outStream.write('\r');
						outStream.write('A');
						outStream.write('T');
						outStream.write('\r');
						try { Thread.sleep(1000); } catch (Exception e) {}
						response = "";
						c = inStream.read();
						while (c != -1)
						{
							response += (char) c;
							c = inStream.read();
						}
						serialPort.close();
						if (response.indexOf("OK") >= 0)
						{
							System.out.print("  Getting Info...");
							Service srv = new Service();
							SerialModemGateway gateway = new SerialModemGateway("modem.com3",portId.getName(), bauds[i], "", "");
							try
							{   
								srv.addGateway(gateway);
								srv.startService();
								System.out.println("  Found: " + srv.getSettings());
								srv.stopService();
							}
							catch (Exception e)
							{
								System.out.println("  Nobody here!");
							}
							srv = null;
						}
						else System.out.println("  Nobody here!");
					}
					catch (Exception e)
					{
						System.out.println("  Nobody here!");
					}
				}
			}
		}
 
	}
}
dans un programme java (.jar), voilà le résultat:
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
Found port: /dev/ttyUSB0
        Trying at 19200...  Nobody here!
        Trying at 38400...  Nobody here!
        Trying at 115200...  Getting Info...log4j:WARN No appenders could be found for logger (smslib).
log4j:WARN Please initialize the log4j system properly.
Found port: /dev/ttyS0
        Trying at 19200...  Nobody here!
        Trying at 38400...  Nobody here!
        Trying at 115200...  Nobody here!
c clair ici,il a trouvé le modem sur le port /dev/ttyUSB0 avec baudRate = 115200
mais dans la servlet du projet web il n'a rien affiché
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/08/2011, 14h19   #13
Expert Confirmé Sénior
 
Homme Laurent Willems
Expert Stop/Start
Inscription : septembre 2002
Messages : 2 551
Détails du profil
Informations personnelles :
Nom : Homme Laurent Willems
Âge : 33
Localisation : Belgique

Informations professionnelles :
Activité : Expert Stop/Start

Informations forums :
Inscription : septembre 2002
Messages : 2 551
Points : 4 271
Points : 4 271
Salut,

Peux-tu lister les process du serveur applicatif que tu utilises(tomcat ou jboss)?
__________________
Alea Jacta Test!
Mygale1978 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/08/2011, 14h46   #14
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
comment ça?
j'ai pas compris !!!
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/08/2011, 14h51   #15
Expert Confirmé Sénior
 
Homme Laurent Willems
Expert Stop/Start
Inscription : septembre 2002
Messages : 2 551
Détails du profil
Informations personnelles :
Nom : Homme Laurent Willems
Âge : 33
Localisation : Belgique

Informations professionnelles :
Activité : Expert Stop/Start

Informations forums :
Inscription : septembre 2002
Messages : 2 551
Points : 4 271
Points : 4 271
Code :
1
2
 
ps -ef | egrep 'jboss|tomcat|java'
__________________
Alea Jacta Test!
Mygale1978 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/08/2011, 14h58   #16
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
ok voila
Code :
1
2
3
4
[root@yebnidata java]# ps -ef | egrep 'jboss'
jboss    23186     1  0 11:55 ?        00:00:00 /bin/sh /usr/local/jboss/bin/run.sh
jboss    23192 23186  0 11:55 ?        00:00:30 /usr/local/jdk1.6.0_18/bin/java -server -Xms512m -Xmx1024m -Dprogram.name=run.sh -Djava.endorsed.dirs=/usr/local/jboss/lib/endorsed -classpath /usr/local/jboss/bin/run.jar:/usr/local/jdk1.6.0_18/lib/tools.jar org.jboss.Main
root     23539 21869  0 13:54 pts/0    00:00:00 egrep jboss
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/08/2011, 15h18   #17
Expert Confirmé Sénior
 
Homme Laurent Willems
Expert Stop/Start
Inscription : septembre 2002
Messages : 2 551
Détails du profil
Informations personnelles :
Nom : Homme Laurent Willems
Âge : 33
Localisation : Belgique

Informations professionnelles :
Activité : Expert Stop/Start

Informations forums :
Inscription : septembre 2002
Messages : 2 551
Points : 4 271
Points : 4 271
A mon avis ça ne fonctionne pas pour la raison suivante

Le owner du process jboss est l'utilisateur jboss et non l'utilisateur root comme tu l'avais signalé précédemment.
Code :
1
2
jboss    23192 23186  0 11:55 ?        00:00:30 /usr/local/jdk1.6.0_18/bin/java -server -Xms512m -Xmx1024m -Dprogram.name=run.sh -Djava.endorsed.dirs=/usr/local/jboss/lib/endorsed -classpath /usr/local/jboss/bin/run.jar:/usr/local/jdk1.6.0_18/lib/tools.jar org.jboss.Mai
D'après les permissions que l'on peut voir sur le device /dev/ttyUSB0, seul le user root et les membres du groupe uucp peuvent accéder en lecture/écriture.

Code :
crw-rw---- 1 root uucp 188, 0 août  3 09:19 /dev/ttyUSB0
A titre de test pourrais-tu donc ajouter ton user jboss au groupe uucp et voir ce que ça donne?

Editer et rechercher la ligne contenant le groupe uucp dans le fichier /etc/group et ajouter jboss

__________________
Alea Jacta Test!
Mygale1978 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/08/2011, 15h35   #18
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
dans /etc/group, j'ai changé
à
mais rien n'est changé
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/08/2011, 15h37   #19
Expert Confirmé Sénior
 
Homme Laurent Willems
Expert Stop/Start
Inscription : septembre 2002
Messages : 2 551
Détails du profil
Informations personnelles :
Nom : Homme Laurent Willems
Âge : 33
Localisation : Belgique

Informations professionnelles :
Activité : Expert Stop/Start

Informations forums :
Inscription : septembre 2002
Messages : 2 551
Points : 4 271
Points : 4 271
Peux-tu redémarrer l'instance jboss et refaire le test?

peux-tu également renvoyer le résultat de la commande suivante?

__________________
Alea Jacta Test!
Mygale1978 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/08/2011, 15h49   #20
Candidat au titre de Membre du Club
 
Inscription : juin 2010
Messages : 63
Détails du profil
Informations forums :
Inscription : juin 2010
Messages : 63
Points : 12
Points : 12
j'ai déjà redemarré jboss avant de tester et toujours la même exception
la command:
Code :
1
2
[root@yebnidata java]# groups jboss
jboss : jboss uucp
ja1985va est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 07h49.


 
 
 
 
Partenaires

Hébergement Web