EFAULT:系统调用参数中的地址错误Node.js中的错误

时间:2019-07-10 16:04:00

标签: node.js static

我用节点静态模块构建了一个Nodejs应用程序,以处理诸如CSS,外部JS文件和JSON文件之类的静态文件,但是每次“ EFAULT:系统调用参数错误的错误地址”都会在每次加载时发生。有人可以帮我解决这个问题吗? 我认为Http Header出现问题或我使用节点静态模块的方式导致了此错误。

public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
        try {
            Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
            Connection c = DriverManager.getConnection("jdbc:derby:freshDB1", "", "");
            request(c);
        } catch(SQLException s) {
             System.out.println("SQL: " + s.getMessage());
        }

    }

    private static void request(Connection c) throws SQLException, ClassNotFoundException {
        try {
            Statement request = c.createStatement();
            String command = "select * from freshSchema.ftable";
            ResultSet rs = request.executeQuery(c.nativeSQL(command));      
        } catch(SQLException s) {
            System.out.println("SQL: " + s.getMessage());
    }

这是导致错误的JS代码

0|index  | { Error: listen EFAULT: bad address in system call argument :::3300
0|index  |     at Server.setupListenHandle [as _listen2] (net.js:1279:14)
0|index  |     at listenInCluster (net.js:1327:12)
0|index  |     at Server.listen (net.js:1414:7)
0|index  |     at Object.<anonymous> (D:\CodeTest\codest_3\index.js:224:8)
0|index  |     at Module._compile (internal/modules/cjs/loader.js:776:30)
0|index  |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
0|index  |     at Module.load (internal/modules/cjs/loader.js:653:32)
0|index  |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
0|index  |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
0|index  |     at Object.<anonymous> (C:\Users\NINENORTH\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:27:21)
0|index  |   code: 'EFAULT',
0|index  |   errno: 'EFAULT',
0|index  |   syscall: 'listen',
0|index  |   address: '::',
0|index  |   port: 3300 }

0 个答案:

没有答案