Unable to open GPIO export interface: Permission denied while accesing GPIO pins of Raspberry Pi

447 views
Skip to first unread message

avi...@gmail.com

unread,
May 26, 2014, 4:34:02 AM5/26/14
to pi...@googlegroups.com

hi ,
    I am trying to operate LED which is connected to Raspberry Pi form my web browser. for this i am using Pi4j and vaadin framework for UI. i have deployed WAR file of my project in tomcat server which is running on Raspberry Pi. when i run the url on my browser I am getting the following error 

HTTP Status 500 - java.lang.RuntimeException: Unable to open GPIO export interface: Permission denied

type Exception report

message java.lang.RuntimeException: Unable to open GPIO export interface: Permission denied

description The server encountered an internal error (java.lang.RuntimeException: Unable to open GPIO export interface: Permission denied ) that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.RuntimeException: Unable to open GPIO export interface: Permission denied

com.vaadin.server.VaadinServlet.handleServiceException(VaadinServlet.java:580)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:343)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

java.lang.RuntimeException: Unable to open GPIO export interface: Permission denied

com.pi4j.wiringpi.GpioUtil.export(Native Method)
com.pi4j.io.gpio.RaspiGpioProvider.export(RaspiGpioProvider.java:67)
com.pi4j.io.gpio.impl.GpioPinImpl.export(GpioPinImpl.java:165)
com.pi4j.io.gpio.impl.GpioControllerImpl.provisionPin(GpioControllerImpl.java:520)
com.pi4j.io.gpio.impl.GpioControllerImpl.provisionDigitalOutputPin(GpioControllerImpl.java:645)
com.pi4j.io.gpio.impl.GpioControllerImpl.provisionDigitalOutputPin(GpioControllerImpl.java:672)
com.pi4j.io.gpio.impl.GpioControllerImpl.provisionDigitalOutputPin(GpioControllerImpl.java:684)
com.example.raspberrypigpioexample01.Raspberrypigpioexample01UI.init(Raspberrypigpioexample01UI.java:19)
com.vaadin.ui.UI.doInit(UI.java:529)
com.vaadin.server.AbstractCommunicationManager.getBrowserDetailsUI(AbstractCommunicationManager.java:2468)
com.vaadin.server.AbstractCommunicationManager.handleBrowserDetailsRequest(AbstractCommunicationManager.java:2362)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:325)
com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.28 logs.

can any help me to solve this problem ?

Steve Swinsburg

unread,
May 26, 2014, 5:58:25 AM5/26/14
to avi...@gmail.com, pi...@googlegroups.com

Hi

What user are you running Tomcat as?

Cheers
Steve

sent from my mobile device

--
You received this message because you are subscribed to the Google Groups "Pi4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pi4j+uns...@googlegroups.com.
Visit this group at http://groups.google.com/group/pi4j.
To view this discussion on the web visit https://groups.google.com/d/msgid/pi4j/d71d7d06-f477-4809-acee-fa42c3891e1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

avi...@gmail.com

unread,
May 26, 2014, 6:02:46 AM5/26/14
to pi...@googlegroups.com, avi...@gmail.com
i am using root 
Reply all
Reply to author
Forward
0 new messages